[binutils-gdb] gdb: Convert language la_lookup_symbol_nonlocal field to a method

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[binutils-gdb] gdb: Convert language la_lookup_symbol_nonlocal field to a method

Sourceware - gdb-testers mailing list
*** TEST RESULTS FOR COMMIT a78a19b15254de31c3d38b7e27469aaef0a30e97 ***

commit a78a19b15254de31c3d38b7e27469aaef0a30e97
Author:     Andrew Burgess <[hidden email]>
AuthorDate: Mon Jun 1 22:17:59 2020 +0100
Commit:     Andrew Burgess <[hidden email]>
CommitDate: Wed Jun 17 09:25:12 2020 +0100

    gdb: Convert language la_lookup_symbol_nonlocal field to a method
   
    This commit changes the language_data::la_lookup_symbol_nonlocal
    function pointer member variable into a member function of
    language_defn.
   
    There should be no user visible changes after this commit.
   
    gdb/ChangeLog:
   
            * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
            ada_language::lookup_symbol_nonlocal.
            (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
            (ada_language::lookup_symbol_nonlocal): New member function,
            implementation from ada_lookup_symbol_nonlocal.
            * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
            initializer.
            (cplus_language_data): Delete la_lookup_symbol_nonlocal
            initializer.
            (cplus_language::lookup_symbol_nonlocal): New member function.
            (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
            (minimal_language_data) Likewise.
            * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
            * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
            initializer.
            (d_language::lookup_symbol_nonlocal): New member function.
            * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
            initializer.
            (f_language::lookup_symbol_nonlocal): New member function.
            * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
            initializer.
            * language.c (unknown_language_data): Likewise.
            (auto_language_data): Likewise.
            * language.h (language_data): Delete la_lookup_symbol_nonlocal
            field.
            (language_defn::lookup_symbol_nonlocal): New member function.
            * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
            initializer.
            * objc-lang.c (objc_language_data): Likewise.
            * opencl-lang.c (opencl_language_data): Likewise.
            * p-lang.c (pascal_language_data): Likewise.
            * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
            rust_language::lookup_symbol_nonlocal.
            (rust_language_data): Delete la_lookup_symbol_nonlocal
            initializer.
            (rust_language::lookup_symbol_nonlocal): New member function,
            implementation from rust_lookup_symbol_nonlocal.
            * symtab.c (lookup_symbol_aux): Update call to
            lookup_symbol_nonlocal.
            (basic_lookup_symbol_nonlocal): Rename to...
            (language_defn::lookup_symbol_nonlocal): ...this, and update
            header comment.  Remove language_defn parameter, and replace with
            uses of `this'.
            * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c58a91556d..f4d9eaa5b4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,50 @@
+2020-06-17  Andrew Burgess  <[hidden email]>
+
+ * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
+ ada_language::lookup_symbol_nonlocal.
+ (ada_language_data): Delete la_lookup_symbol_nonlocal initializer.
+ (ada_language::lookup_symbol_nonlocal): New member function,
+ implementation from ada_lookup_symbol_nonlocal.
+ * c-lang.c (c_language_data): Delete la_lookup_symbol_nonlocal
+ initializer.
+ (cplus_language_data): Delete la_lookup_symbol_nonlocal
+ initializer.
+ (cplus_language::lookup_symbol_nonlocal): New member function.
+ (asm_language_data): Delete la_lookup_symbol_nonlocal initializer.
+ (minimal_language_data) Likewise.
+ * cp-namespace.c (cp_lookup_nested_symbol): Update comment.
+ * d-lang.c (d_language_data): Delete la_lookup_symbol_nonlocal
+ initializer.
+ (d_language::lookup_symbol_nonlocal): New member function.
+ * f-lang.c (f_language_data): Delete la_lookup_symbol_nonlocal
+ initializer.
+ (f_language::lookup_symbol_nonlocal): New member function.
+ * go-lang.c (go_language_data): Delete la_lookup_symbol_nonlocal
+ initializer.
+ * language.c (unknown_language_data): Likewise.
+ (auto_language_data): Likewise.
+ * language.h (language_data): Delete la_lookup_symbol_nonlocal
+ field.
+ (language_defn::lookup_symbol_nonlocal): New member function.
+ * m2-lang.c (m2_language_data): Delete la_lookup_symbol_nonlocal
+ initializer.
+ * objc-lang.c (objc_language_data): Likewise.
+ * opencl-lang.c (opencl_language_data): Likewise.
+ * p-lang.c (pascal_language_data): Likewise.
+ * rust-lang.c (rust_lookup_symbol_nonlocal): Rename to
+ rust_language::lookup_symbol_nonlocal.
+ (rust_language_data): Delete la_lookup_symbol_nonlocal
+ initializer.
+ (rust_language::lookup_symbol_nonlocal): New member function,
+ implementation from rust_lookup_symbol_nonlocal.
+ * symtab.c (lookup_symbol_aux): Update call to
+ lookup_symbol_nonlocal.
+ (basic_lookup_symbol_nonlocal): Rename to...
+ (language_defn::lookup_symbol_nonlocal): ...this, and update
+ header comment.  Remove language_defn parameter, and replace with
+ uses of `this'.
+ * symtab.h (basic_lookup_symbol_nonlocal): Delete declaration.
+
 2020-06-17  Andrew Burgess  <[hidden email]>
 
  * ada-lang.c (ada_language_data): Delete la_value_print_inner
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index a3ce7c325b..d303915ebd 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -5764,46 +5764,6 @@ ada_lookup_symbol (const char *name, const struct block *block0,
   return info;
 }
 
-static struct block_symbol
-ada_lookup_symbol_nonlocal (const struct language_defn *langdef,
-    const char *name,
-                            const struct block *block,
-                            const domain_enum domain)
-{
-  struct block_symbol sym;
-
-  sym = ada_lookup_symbol (name, block_static_block (block), domain);
-  if (sym.symbol != NULL)
-    return sym;
-
-  /* If we haven't found a match at this point, try the primitive
-     types.  In other languages, this search is performed before
-     searching for global symbols in order to short-circuit that
-     global-symbol search if it happens that the name corresponds
-     to a primitive type.  But we cannot do the same in Ada, because
-     it is perfectly legitimate for a program to declare a type which
-     has the same name as a standard type.  If looking up a type in
-     that situation, we have traditionally ignored the primitive type
-     in favor of user-defined types.  This is why, unlike most other
-     languages, we search the primitive types this late and only after
-     having searched the global symbols without success.  */
-
-  if (domain == VAR_DOMAIN)
-    {
-      struct gdbarch *gdbarch;
-
-      if (block == NULL)
- gdbarch = target_gdbarch ();
-      else
- gdbarch = block_gdbarch (block);
-      sym.symbol = language_lookup_primitive_type_as_symbol (langdef, gdbarch, name);
-      if (sym.symbol != NULL)
- return sym;
-    }
-
-  return {};
-}
-
 
 /* True iff STR is a possible encoded suffix of a normal Ada name
    that is to be ignored for matching purposes.  Suffixes of parallel
@@ -13766,7 +13726,6 @@ extern const struct language_data ada_language_data =
   ada_print_typedef,            /* Print a typedef using appropriate syntax */
   NULL,                         /* name_of_this */
   true,                         /* la_store_sym_names_in_linkage_form_p */
-  ada_lookup_symbol_nonlocal,   /* Looking up non-local symbols.  */
   ada_op_print_tab,             /* expression operators for printing */
   0,                            /* c-style arrays */
   1,                            /* String lower bound */
@@ -14116,6 +14075,47 @@ public:
     return ada_value_print_inner (val, stream, recurse, options);
   }
 
+  /* See language.h.  */
+
+  struct block_symbol lookup_symbol_nonlocal
+ (const char *name, const struct block *block,
+ const domain_enum domain) const override
+  {
+    struct block_symbol sym;
+
+    sym = ada_lookup_symbol (name, block_static_block (block), domain);
+    if (sym.symbol != NULL)
+      return sym;
+
+    /* If we haven't found a match at this point, try the primitive
+       types.  In other languages, this search is performed before
+       searching for global symbols in order to short-circuit that
+       global-symbol search if it happens that the name corresponds
+       to a primitive type.  But we cannot do the same in Ada, because
+       it is perfectly legitimate for a program to declare a type which
+       has the same name as a standard type.  If looking up a type in
+       that situation, we have traditionally ignored the primitive type
+       in favor of user-defined types.  This is why, unlike most other
+       languages, we search the primitive types this late and only after
+       having searched the global symbols without success.  */
+
+    if (domain == VAR_DOMAIN)
+      {
+ struct gdbarch *gdbarch;
+
+ if (block == NULL)
+  gdbarch = target_gdbarch ();
+ else
+  gdbarch = block_gdbarch (block);
+ sym.symbol
+  = language_lookup_primitive_type_as_symbol (this, gdbarch, name);
+ if (sym.symbol != NULL)
+  return sym;
+      }
+
+    return {};
+  }
+
 protected:
   /* See language.h.  */
 
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index cead372ae6..64dfd71399 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -897,7 +897,6 @@ extern const struct language_data c_language_data =
   c_print_typedef, /* Print a typedef using appropriate syntax */
   NULL, /* name_of_this */
   true, /* la_store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   c_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
@@ -1006,7 +1005,6 @@ extern const struct language_data cplus_language_data =
   c_print_typedef, /* Print a typedef using appropriate syntax */
   "this",                       /* name_of_this */
   false, /* la_store_sym_names_in_linkage_form_p */
-  cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   c_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
@@ -1162,6 +1160,15 @@ public:
     return cp_class_name_from_physname (physname);
   }
 
+  /* See language.h.  */
+
+  struct block_symbol lookup_symbol_nonlocal
+ (const char *name, const struct block *block,
+ const domain_enum domain) const override
+  {
+    return cp_lookup_symbol_nonlocal (this, name, block, domain);
+  }
+
 protected:
 
   /* See language.h.  */
@@ -1203,7 +1210,6 @@ extern const struct language_data asm_language_data =
   c_print_typedef, /* Print a typedef using appropriate syntax */
   NULL, /* name_of_this */
   true, /* la_store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   c_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
@@ -1267,7 +1273,6 @@ extern const struct language_data minimal_language_data =
   c_print_typedef, /* Print a typedef using appropriate syntax */
   NULL, /* name_of_this */
   true, /* la_store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   c_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 81fb2ef67c..bf57e703d4 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -935,7 +935,7 @@ cp_lookup_nested_symbol (struct type *parent_type,
     case TYPE_CODE_ENUM:
     /* NOTE: Handle modules here as well, because Fortran is re-using the C++
        specific code to lookup nested symbols in modules, by calling the
-       function pointer la_lookup_symbol_nonlocal, which ends up here.  */
+       method lookup_symbol_nonlocal, which ends up here.  */
     case TYPE_CODE_MODULE:
       {
  int size;
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index dff9d470bc..5689b6ceaf 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -151,7 +151,6 @@ extern const struct language_data d_language_data =
    syntax.  */
   "this",
   false, /* la_store_sym_names_in_linkage_form_p */
-  d_lookup_symbol_nonlocal,
   d_op_print_tab, /* Expression operators for printing.  */
   1, /* C-style arrays.  */
   0, /* String lower bound.  */
@@ -265,6 +264,15 @@ public:
   {
     return d_value_print_inner (val, stream, recurse, options);
   }
+
+  /* See language.h.  */
+
+  struct block_symbol lookup_symbol_nonlocal
+ (const char *name, const struct block *block,
+ const domain_enum domain) const override
+  {
+    return d_lookup_symbol_nonlocal (this, name, block, domain);
+  }
 };
 
 /* Single instance of the D language class.  */
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index d5b2bf286d..db337be26b 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -572,7 +572,6 @@ extern const struct language_data f_language_data =
   f_print_typedef, /* Print a typedef using appropriate syntax */
   NULL,                     /* name_of_this */
   false, /* la_store_sym_names_in_linkage_form_p */
-  cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   f_op_print_tab, /* expression operators for printing */
   0, /* arrays are first-class (not c-style) */
   1, /* String lower bound */
@@ -705,6 +704,14 @@ public:
     return f_value_print_inner (val, stream, recurse, options);
   }
 
+  /* See language.h.  */
+
+  struct block_symbol lookup_symbol_nonlocal
+ (const char *name, const struct block *block,
+ const domain_enum domain) const override
+  {
+    return cp_lookup_symbol_nonlocal (this, name, block, domain);
+  }
 
 protected:
 
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index 9fdd45290f..7da9299fdd 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -536,7 +536,6 @@ extern const struct language_data go_language_data =
    syntax.  */
   NULL, /* name_of_this */
   false, /* la_store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal,
   go_op_print_tab, /* Expression operators for printing.  */
   1, /* C-style arrays.  */
   0, /* String lower bound.  */
diff --git a/gdb/language.c b/gdb/language.c
index d93b475670..0cbc7f0540 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -785,7 +785,6 @@ extern const struct language_data unknown_language_data =
   default_print_typedef, /* Print a typedef using appropriate syntax */
   "this",             /* name_of_this */
   true, /* store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   unk_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
@@ -870,7 +869,6 @@ extern const struct language_data auto_language_data =
   default_print_typedef, /* Print a typedef using appropriate syntax */
   "this",        /* name_of_this */
   false, /* store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   unk_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
diff --git a/gdb/language.h b/gdb/language.h
index 06978d7067..2149487dd7 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -285,16 +285,6 @@ struct language_data
 
     const bool la_store_sym_names_in_linkage_form_p;
 
-    /* This is a function that lookup_symbol will call when it gets to
-       the part of symbol lookup where C looks up static and global
-       variables.  */
-
-    struct block_symbol (*la_lookup_symbol_nonlocal)
-      (const struct language_defn *,
-       const char *,
-       const struct block *,
-       const domain_enum);
-
     /* Table for printing expressions.  */
 
     const struct op_print *la_op_print_tab;
@@ -522,6 +512,15 @@ struct language_defn : language_data
       (tracker, mode, name_match_type, text, word, "", code);
   }
 
+  /* This is a function that lookup_symbol will call when it gets to
+     the part of symbol lookup where C looks up static and global
+     variables.  This default implements the basic C lookup rules.  */
+
+  virtual struct block_symbol lookup_symbol_nonlocal
+ (const char *name,
+ const struct block *block,
+ const domain_enum domain) const;
+
   /* Return an expression that can be used for a location
      watchpoint.  TYPE is a pointer type that points to the memory
      to watch, and ADDR is the address of the watched memory.  */
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index 6bc4eb089e..356ed4c3bf 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -370,7 +370,6 @@ extern const struct language_data m2_language_data =
   m2_print_typedef, /* Print a typedef using appropriate syntax */
   NULL,                /* name_of_this */
   false, /* la_store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   m2_op_print_tab, /* expression operators for printing */
   0, /* arrays are first-class (not c-style) */
   0, /* String lower bound */
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 387c6ba7e1..1e4862fe3f 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -345,7 +345,6 @@ extern const struct language_data objc_language_data =
   c_print_typedef, /* Print a typedef using appropriate syntax */
   "self",        /* name_of_this */
   false, /* la_store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   objc_op_print_tab, /* Expression operators for printing */
   1, /* C-style arrays */
   0, /* String lower bound */
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 5cb9839000..2a83f51f5c 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -1024,7 +1024,6 @@ extern const struct language_data opencl_language_data =
   c_print_typedef, /* Print a typedef using appropriate syntax */
   NULL,                         /* name_of_this */
   false, /* la_store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   c_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 4c9d354fc0..5c1b273e7f 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -401,7 +401,6 @@ extern const struct language_data pascal_language_data =
   pascal_print_typedef, /* Print a typedef using appropriate syntax */
   "this",        /* name_of_this */
   false, /* la_store_sym_names_in_linkage_form_p */
-  basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   pascal_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index c2fd3ba594..d251dab29f 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -1961,51 +1961,6 @@ rust_operator_check (struct expression *exp, int pos,
 
 
 
-/* Implementation of la_lookup_symbol_nonlocal for Rust.  */
-
-static struct block_symbol
-rust_lookup_symbol_nonlocal (const struct language_defn *langdef,
-     const char *name,
-     const struct block *block,
-     const domain_enum domain)
-{
-  struct block_symbol result = {};
-
-  if (symbol_lookup_debug)
-    {
-      fprintf_unfiltered (gdb_stdlog,
-  "rust_lookup_symbol_non_local"
-  " (%s, %s (scope %s), %s)\n",
-  name, host_address_to_string (block),
-  block_scope (block), domain_name (domain));
-    }
-
-  /* Look up bare names in the block's scope.  */
-  std::string scopedname;
-  if (name[cp_find_first_component (name)] == '\0')
-    {
-      const char *scope = block_scope (block);
-
-      if (scope[0] != '\0')
- {
-  scopedname = std::string (scope) + "::" + name;
-  name = scopedname.c_str ();
- }
-      else
- name = NULL;
-    }
-
-  if (name != NULL)
-    {
-      result = lookup_symbol_in_static_block (name, block, domain);
-      if (result.symbol == NULL)
- result = lookup_global_symbol (name, block, domain);
-    }
-  return result;
-}
-
-
-
 static const struct exp_descriptor exp_descriptor_rust =
 {
   rust_print_subexp,
@@ -2042,7 +1997,6 @@ extern const struct language_data rust_language_data =
   rust_print_typedef, /* Print a typedef using appropriate syntax */
   NULL, /* name_of_this */
   false, /* la_store_sym_names_in_linkage_form_p */
-  rust_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
   c_op_print_tab, /* expression operators for printing */
   1, /* c-style arrays */
   0, /* String lower bound */
@@ -2147,6 +2101,47 @@ public:
   {
     return rust_value_print_inner (val, stream, recurse, options);
   }
+
+  /* See language.h.  */
+
+  struct block_symbol lookup_symbol_nonlocal
+ (const char *name, const struct block *block,
+ const domain_enum domain) const override
+  {
+    struct block_symbol result = {};
+
+    if (symbol_lookup_debug)
+      {
+ fprintf_unfiltered (gdb_stdlog,
+    "rust_lookup_symbol_non_local"
+    " (%s, %s (scope %s), %s)\n",
+    name, host_address_to_string (block),
+    block_scope (block), domain_name (domain));
+      }
+
+    /* Look up bare names in the block's scope.  */
+    std::string scopedname;
+    if (name[cp_find_first_component (name)] == '\0')
+      {
+ const char *scope = block_scope (block);
+
+ if (scope[0] != '\0')
+  {
+    scopedname = std::string (scope) + "::" + name;
+    name = scopedname.c_str ();
+  }
+ else
+  name = NULL;
+      }
+
+    if (name != NULL)
+      {
+ result = lookup_symbol_in_static_block (name, block, domain);
+ if (result.symbol == NULL)
+  result = lookup_global_symbol (name, block, domain);
+      }
+    return result;
+  }
 };
 
 /* Single instance of the Rust language class.  */
diff --git a/gdb/symtab.c b/gdb/symtab.c
index b0e22eeb38..19f078e36a 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2086,7 +2086,7 @@ lookup_symbol_aux (const char *name, symbol_name_match_type match_type,
   /* Now do whatever is appropriate for LANGUAGE to look
      up static and global variables.  */
 
-  result = langdef->la_lookup_symbol_nonlocal (langdef, name, block, domain);
+  result = langdef->lookup_symbol_nonlocal (name, block, domain);
   if (result.symbol != NULL)
     {
       if (symbol_lookup_debug)
@@ -2401,13 +2401,12 @@ lookup_symbol_via_quick_fns (struct objfile *objfile,
   return result;
 }
 
-/* See symtab.h.  */
+/* See language.h.  */
 
 struct block_symbol
-basic_lookup_symbol_nonlocal (const struct language_defn *langdef,
-      const char *name,
-      const struct block *block,
-      const domain_enum domain)
+language_defn::lookup_symbol_nonlocal (const char *name,
+       const struct block *block,
+       const domain_enum domain) const
 {
   struct block_symbol result;
 
@@ -2433,7 +2432,7 @@ basic_lookup_symbol_nonlocal (const struct language_defn *langdef,
  gdbarch = target_gdbarch ();
       else
  gdbarch = block_gdbarch (block);
-      result.symbol = language_lookup_primitive_type_as_symbol (langdef,
+      result.symbol = language_lookup_primitive_type_as_symbol (this,
  gdbarch, name);
       result.block = NULL;
       if (result.symbol != NULL)
diff --git a/gdb/symtab.h b/gdb/symtab.h
index bf02828d12..0b186554ea 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1644,16 +1644,6 @@ extern struct block_symbol lookup_symbol_search_name (const char *search_name,
       const struct block *block,
       domain_enum domain);
 
-/* A default version of lookup_symbol_nonlocal for use by languages
-   that can't think of anything better to do.
-   This implements the C lookup rules.  */
-
-extern struct block_symbol
-  basic_lookup_symbol_nonlocal (const struct language_defn *langdef,
- const char *,
- const struct block *,
- const domain_enum);
-
 /* Some helper functions for languages that need to write their own
    lookup_symbol_nonlocal functions.  */
 
Reply | Threaded
Open this post in threaded view
|

Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master

Sourceware - gdb-testers mailing list
Buildername:
        Ubuntu-Aarch64-native-extended-gdbserver-m64

Worker:
        ubuntu-aarch64

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/5/builds/3074

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.trace/pending.exp: ftrace resolved: single tracepoint info
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Ubuntu-Aarch64-native-extended-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-i686, branch master

gdb-buildbot-2
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-i686

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/18/builds/3478

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-i686/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-cc-with-index, branch master

gdb-buildbot-2
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-cc-with-index

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/20/builds/3426

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.base/options.exp: test-print: cmd complete "frame apply level 0 print "
PASS -> FAIL: gdb.base/options.exp: test-print: tab complete "frame apply level 0 print "
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: single_scope: first thread: print i3
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m32, branch master

gdb-buildbot-2
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-m32

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/17/builds/3472

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m64, branch master

gdb-buildbot-2
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-m64

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/3/builds/3535

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.base/step-over-syscall.exp: clone: displaced=off: single step over clone
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i02
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i12
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i22
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 3rd stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 3rd stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: single_scope: second thread: print i3
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master

gdb-buildbot-2
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m32

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/4/builds/3368

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
UNRESOLVED -> FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited
new FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only inferior 1 left
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master

gdb-buildbot-2
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-native-extended-gdbserver-m64

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/2/builds/3369

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=1: continue until exit
PASS -> FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=1: print re_run_var_2
new UNRESOLVED: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: delete all breakpoints in delete_breakpoints
PASS -> UNRESOLVED: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: setting breakpoint at all_started
PASS -> FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: inferior 1 exited
PASS -> FAIL: gdb.threads/fork-plus-threads.exp: detach-on-fork=off: only inferior 1 left
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 1st thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 1st thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 1st thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 1st stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 1st stop: print j
PASS -> FAIL: gdb.threads/thread-unwindonsignal.exp: continue until exit
new KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in multithreaded app
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m32, branch master

gdb-buildbot-2
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-native-gdbserver-m32

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/24/builds/3381

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.threads/interrupted-hand-call.exp: continue until exit
PASS -> FAIL: gdb.threads/thread-unwindonsignal.exp: continue until exit
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m64, branch master

gdb-buildbot-2
In reply to this post by Sourceware - gdb-testers mailing list
Buildername:
        Fedora-x86_64-native-gdbserver-m64

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/22/builds/3380

Author:
        Andrew Burgess <[hidden email]>

Commit tested:
        a78a19b15254de31c3d38b7e27469aaef0a30e97

Subject of commit:
        gdb: Convert language la_lookup_symbol_nonlocal field to a method

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 4th stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 4th stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: single_scope: second thread: print i3
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/a7/a78a19b15254de31c3d38b7e27469aaef0a30e97//xfail.table.gz>