* symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter.
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 19 May 2008 15:50:10 +0000 (15:50 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 19 May 2008 15:50:10 +0000 (15:50 +0000)
(lookup_symbol): Likewise.
* symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter.
(lookup_symbol): Likewise.
(search_symbols): Update.

* linespec.c (find_methods, collect_methods): Update.
(add_matching_methods, add_constructors): Update.
(decode_compound, decode_dollar, decode_variable): Update.
(lookup_prefix_sym): Update.

(symbol_found): Remove SYM_SYMTAB parameter.
Use SYMBOL_SYMTAB (sym) instead.

* gdbtypes.c (lookup_typename): Update.
(lookup_struct, lookup_union, lookup_enum): Update.
(lookup_template_type): Update.
(check_typedef): Update.
* language.c (lang_bool_type): Update.
* mdebugread.c (parse_procedure): Update.
* mi/mi-cmd-stack.c (list_args_or_locals): Update.
* parse.c (write_dollar_variable): Update.
* printcmd.c (address_info): Update.
* source.c (select_source_symtab): Update.
* stack.c (print_frame_args, print_frame_arg_vars): Update.
* valops.c (find_function_in_inferior): Update.
(value_struct_elt_for_reference): Update.
* value.c (value_static_field, value_fn_field): Update.

* alpha-mdebug-tdep.c (find_proc_desc): Update.
* arm-tdep.c (arm_skip_prologue): Update.
* mt-tdep.c (mt_skip_prologue): Update.
* xstormy16-tdep.c (xstormy16_skip_prologue): Update.

* ada-lang.h (struct ada_symbol_info): Remove SYMTAB member.
* ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter.
(add_defn_to_vec): Likewise.
(ada_add_block_symbols): Likewise.
(lookup_cached_symbol, cache_symbol): Likewise.
(standard_lookup): Update.
(ada_lookup_symbol_list): Update.

* c-valprint.c (c_val_print): Update.
* cp-support.c (cp_lookup_rtti_type): Update.
* jv-lang.c (java_lookup_class, get_java_object_type): Update.
* objc-lang.c (lookup_struct_typedef, find_imps): Update.
* p-valprint.c (pascal_val_print): Update.
* scm-lang.c (scm_lookup_name): Update.

* c-exp.y: Update.
* f-exp.y: Update.
* jv-exp.y: Update.
* m2-exp.y: Update.
* objc-exp.y: Update.
* p-exp.y: Update.

32 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/ada-lang.h
gdb/alpha-mdebug-tdep.c
gdb/arm-tdep.c
gdb/c-exp.y
gdb/c-valprint.c
gdb/cp-support.c
gdb/f-exp.y
gdb/gdbtypes.c
gdb/jv-exp.y
gdb/jv-lang.c
gdb/language.c
gdb/linespec.c
gdb/m2-exp.y
gdb/mdebugread.c
gdb/mi/mi-cmd-stack.c
gdb/mt-tdep.c
gdb/objc-exp.y
gdb/objc-lang.c
gdb/p-exp.y
gdb/p-valprint.c
gdb/parse.c
gdb/printcmd.c
gdb/scm-lang.c
gdb/source.c
gdb/stack.c
gdb/symtab.c
gdb/symtab.h
gdb/valops.c
gdb/value.c
gdb/xstormy16-tdep.c

index 3f7e92252a73ad612d9a783c802a76ef63bfbc6f..17962c8d73749c798cc8c0ca7ade38ed19e0cef4 100644 (file)
@@ -1,3 +1,61 @@
+2008-05-19  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter.
+       (lookup_symbol): Likewise.
+       * symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter.
+       (lookup_symbol): Likewise.
+       (search_symbols): Update.
+
+       * linespec.c (find_methods, collect_methods): Update.
+       (add_matching_methods, add_constructors): Update.
+       (decode_compound, decode_dollar, decode_variable): Update.
+       (lookup_prefix_sym): Update.
+
+       (symbol_found): Remove SYM_SYMTAB parameter.
+       Use SYMBOL_SYMTAB (sym) instead.
+
+       * gdbtypes.c (lookup_typename): Update.
+       (lookup_struct, lookup_union, lookup_enum): Update.
+       (lookup_template_type): Update.
+       (check_typedef): Update.
+       * language.c (lang_bool_type): Update.
+       * mdebugread.c (parse_procedure): Update.
+       * mi/mi-cmd-stack.c (list_args_or_locals): Update.
+       * parse.c (write_dollar_variable): Update.
+       * printcmd.c (address_info): Update.
+       * source.c (select_source_symtab): Update.
+       * stack.c (print_frame_args, print_frame_arg_vars): Update.
+       * valops.c (find_function_in_inferior): Update.
+       (value_struct_elt_for_reference): Update.
+       * value.c (value_static_field, value_fn_field): Update.
+
+       * alpha-mdebug-tdep.c (find_proc_desc): Update.
+       * arm-tdep.c (arm_skip_prologue): Update.
+       * mt-tdep.c (mt_skip_prologue): Update.
+       * xstormy16-tdep.c (xstormy16_skip_prologue): Update.
+
+       * ada-lang.h (struct ada_symbol_info): Remove SYMTAB member.
+       * ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter.
+       (add_defn_to_vec): Likewise.
+       (ada_add_block_symbols): Likewise.
+       (lookup_cached_symbol, cache_symbol): Likewise.
+       (standard_lookup): Update.
+       (ada_lookup_symbol_list): Update.
+
+       * c-valprint.c (c_val_print): Update.
+       * cp-support.c (cp_lookup_rtti_type): Update.
+       * jv-lang.c (java_lookup_class, get_java_object_type): Update.
+       * objc-lang.c (lookup_struct_typedef, find_imps): Update.
+       * p-valprint.c (pascal_val_print): Update.
+       * scm-lang.c (scm_lookup_name): Update.
+
+       * c-exp.y: Update.
+       * f-exp.y: Update.
+       * jv-exp.y: Update.
+       * m2-exp.y: Update.
+       * objc-exp.y: Update.
+       * p-exp.y: Update.
+
 2008-05-19  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * language.h (struct language_defn): Remove SYMTAB parameter from
index baeef0a923c1924ff1ca17d235611b6c86046dcd..7060f50d4d8001622367112a16ee88ec0e9d099f 100644 (file)
@@ -115,13 +115,12 @@ static struct value *make_array_descriptor (struct type *, struct value *,
 
 static void ada_add_block_symbols (struct obstack *,
                                    struct block *, const char *,
-                                   domain_enum, struct objfile *,
-                                   struct symtab *, int);
+                                   domain_enum, struct objfile *, int);
 
 static int is_nonfunction (struct ada_symbol_info *, int);
 
 static void add_defn_to_vec (struct obstack *, struct symbol *,
-                             struct block *, struct symtab *);
+                             struct block *);
 
 static int num_defns_collected (struct obstack *);
 
@@ -3976,15 +3975,14 @@ make_array_descriptor (struct type *type, struct value *arr, CORE_ADDR *sp)
 
 static int
 lookup_cached_symbol (const char *name, domain_enum namespace,
-                      struct symbol **sym, struct block **block,
-                      struct symtab **symtab)
+                      struct symbol **sym, struct block **block)
 {
   return 0;
 }
 
 static void
 cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
-              struct block *block, struct symtab *symtab)
+              struct block *block)
 {
 }
 \f
@@ -3998,13 +3996,11 @@ standard_lookup (const char *name, const struct block *block,
                  domain_enum domain)
 {
   struct symbol *sym;
-  struct symtab *symtab;
 
-  if (lookup_cached_symbol (name, domain, &sym, NULL, NULL))
+  if (lookup_cached_symbol (name, domain, &sym, NULL))
     return sym;
-  sym =
-    lookup_symbol_in_language (name, block, domain, language_c, 0, &symtab);
-  cache_symbol (name, domain, sym, block_found, symtab);
+  sym = lookup_symbol_in_language (name, block, domain, language_c, 0);
+  cache_symbol (name, domain, sym, block_found);
   return sym;
 }
 
@@ -4089,7 +4085,7 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1)
 static void
 add_defn_to_vec (struct obstack *obstackp,
                  struct symbol *sym,
-                 struct block *block, struct symtab *symtab)
+                 struct block *block)
 {
   int i;
   size_t tmp;
@@ -4112,7 +4108,6 @@ add_defn_to_vec (struct obstack *obstackp,
         {
           prevDefns[i].sym = sym;
           prevDefns[i].block = block;
-          prevDefns[i].symtab = symtab;
           return;
         }
     }
@@ -4122,7 +4117,6 @@ add_defn_to_vec (struct obstack *obstackp,
 
     info.sym = sym;
     info.block = block;
-    info.symtab = symtab;
     obstack_grow (obstackp, &info, sizeof (struct ada_symbol_info));
   }
 }
@@ -4726,7 +4720,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
     {
       block_depth += 1;
       ada_add_block_symbols (&symbol_list_obstack, block, name,
-                             namespace, NULL, NULL, wild_match);
+                             namespace, NULL, wild_match);
 
       /* If we found a non-function match, assume that's the one.  */
       if (is_nonfunction (defns_collected (&symbol_list_obstack, 0),
@@ -4748,10 +4742,10 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
     goto done;
 
   cacheIfUnique = 1;
-  if (lookup_cached_symbol (name0, namespace, &sym, &block, &s))
+  if (lookup_cached_symbol (name0, namespace, &sym, &block))
     {
       if (sym != NULL)
-        add_defn_to_vec (&symbol_list_obstack, sym, block, s);
+        add_defn_to_vec (&symbol_list_obstack, sym, block);
       goto done;
     }
 
@@ -4764,7 +4758,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
     bv = BLOCKVECTOR (s);
     block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
     ada_add_block_symbols (&symbol_list_obstack, block, name, namespace,
-                           objfile, s, wild_match);
+                           objfile, wild_match);
   }
 
   if (namespace == VAR_DOMAIN)
@@ -4787,14 +4781,14 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
                     block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
                     ada_add_block_symbols (&symbol_list_obstack, block,
                                            SYMBOL_LINKAGE_NAME (msymbol),
-                                           namespace, objfile, s, wild_match);
+                                           namespace, objfile, wild_match);
 
                     if (num_defns_collected (&symbol_list_obstack) == ndefns0)
                       {
                         block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
                         ada_add_block_symbols (&symbol_list_obstack, block,
                                                SYMBOL_LINKAGE_NAME (msymbol),
-                                               namespace, objfile, s,
+                                               namespace, objfile,
                                                wild_match);
                       }
                   }
@@ -4815,7 +4809,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
         bv = BLOCKVECTOR (s);
         block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
         ada_add_block_symbols (&symbol_list_obstack, block, name,
-                               namespace, objfile, s, wild_match);
+                               namespace, objfile, wild_match);
       }
   }
 
@@ -4832,7 +4826,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
         bv = BLOCKVECTOR (s);
         block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
         ada_add_block_symbols (&symbol_list_obstack, block, name, namespace,
-                               objfile, s, wild_match);
+                               objfile, wild_match);
       }
 
       ALL_PSYMTABS (objfile, ps)
@@ -4847,7 +4841,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
               continue;
             block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
             ada_add_block_symbols (&symbol_list_obstack, block, name,
-                                   namespace, objfile, s, wild_match);
+                                   namespace, objfile, wild_match);
           }
       }
     }
@@ -4859,11 +4853,10 @@ done:
   ndefns = remove_extra_symbols (*results, ndefns);
 
   if (ndefns == 0)
-    cache_symbol (name0, namespace, NULL, NULL, NULL);
+    cache_symbol (name0, namespace, NULL, NULL);
 
   if (ndefns == 1 && cacheIfUnique)
-    cache_symbol (name0, namespace, (*results)[0].sym, (*results)[0].block,
-                  (*results)[0].symtab);
+    cache_symbol (name0, namespace, (*results)[0].sym, (*results)[0].block);
 
   ndefns = remove_irrelevant_renamings (*results, ndefns, block0);
 
@@ -5205,7 +5198,7 @@ static void
 ada_add_block_symbols (struct obstack *obstackp,
                        struct block *block, const char *name,
                        domain_enum domain, struct objfile *objfile,
-                       struct symtab *symtab, int wild)
+                       int wild)
 {
   struct dict_iterator iter;
   int name_len = strlen (name);
@@ -5243,7 +5236,7 @@ ada_add_block_symbols (struct obstack *obstackp,
                 found_sym = 1;
                 add_defn_to_vec (obstackp,
                                  fixup_symbol_section (sym, objfile),
-                                 block, symtab);
+                                 block);
                 break;
               }
           }
@@ -5277,7 +5270,7 @@ ada_add_block_symbols (struct obstack *obstackp,
                     found_sym = 1;
                     add_defn_to_vec (obstackp,
                                      fixup_symbol_section (sym, objfile),
-                                     block, symtab);
+                                     block);
                     break;
                   }
               }
@@ -5289,7 +5282,7 @@ ada_add_block_symbols (struct obstack *obstackp,
     {
       add_defn_to_vec (obstackp,
                        fixup_symbol_section (arg_sym, objfile),
-                       block, symtab);
+                       block);
     }
 
   if (!wild)
@@ -5333,7 +5326,7 @@ ada_add_block_symbols (struct obstack *obstackp,
                     found_sym = 1;
                     add_defn_to_vec (obstackp,
                                      fixup_symbol_section (sym, objfile),
-                                     block, symtab);
+                                     block);
                     break;
                   }
               }
@@ -5346,7 +5339,7 @@ ada_add_block_symbols (struct obstack *obstackp,
         {
           add_defn_to_vec (obstackp,
                            fixup_symbol_section (arg_sym, objfile),
-                           block, symtab);
+                           block);
         }
     }
 }
index 56115731767d80e2c2ab8750195685b049ce347b..2d13603350a91e2ec2e9599bc7fc565628145306 100644 (file)
@@ -165,12 +165,11 @@ enum ada_operator
     OP_ADA_LAST
   };
 
-/* A triple, (symbol, block, symtab), representing one instance of a 
+/* A tuple, (symbol, block), representing one instance of a 
  * symbol-lookup operation. */
 struct ada_symbol_info {
   struct symbol* sym;
   struct block* block;
-  struct symtab* symtab;
 };
 
 /* Denotes a type of renaming symbol (see ada_parse_renaming).  */
index b63bb760f9992749b3197f4de90b9ca9f084fe62..98ae2459012a12fcaffd059f4ff3b4c5b310ab8f 100644 (file)
@@ -109,7 +109,7 @@ find_proc_desc (CORE_ADDR pc)
           symbol reading.  */
        sym = NULL;
       else
-       sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0, NULL);
+       sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0);
     }
 
   if (sym)
index c4824db0a66fc14fde4f835919a07653d093bae4..fd732a87e4510a0be2a26189f45a364c41aa656b 100644 (file)
@@ -534,7 +534,7 @@ arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
       struct symbol *sym;
 
       /* Found a function.  */
-      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL);
+      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
       if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
         {
          /* Don't use this trick for assembly source files.  */
index b5207212f7d2e2ff582632deb37568bcd5ec52d2..372963318c79babb0ffc6e7ea63cc470933f4831 100644 (file)
@@ -583,8 +583,7 @@ block       :       BLOCKNAME
 block  :       block COLONCOLON name
                        { struct symbol *tem
                            = lookup_symbol (copy_name ($3), $1,
-                                            VAR_DOMAIN, (int *) NULL,
-                                            (struct symtab **) NULL);
+                                            VAR_DOMAIN, (int *) NULL);
                          if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
                            error ("No function \"%s\" in specified context.",
                                   copy_name ($3));
@@ -594,8 +593,7 @@ block       :       block COLONCOLON name
 variable:      block COLONCOLON name
                        { struct symbol *sym;
                          sym = lookup_symbol (copy_name ($3), $1,
-                                              VAR_DOMAIN, (int *) NULL,
-                                              (struct symtab **) NULL);
+                                              VAR_DOMAIN, (int *) NULL);
                          if (sym == 0)
                            error ("No symbol \"%s\" in specified context.",
                                   copy_name ($3));
@@ -655,8 +653,7 @@ variable:   qualified_name
 
                          sym =
                            lookup_symbol (name, (const struct block *) NULL,
-                                          VAR_DOMAIN, (int *) NULL,
-                                          (struct symtab **) NULL);
+                                          VAR_DOMAIN, (int *) NULL);
                          if (sym)
                            {
                              write_exp_elt_opcode (OP_VAR_VALUE);
@@ -1754,8 +1751,7 @@ yylex ()
     sym = lookup_symbol (tmp, expression_context_block,
                         VAR_DOMAIN,
                         current_language->la_language == language_cplus
-                        ? &is_a_field_of_this : (int *) NULL,
-                        (struct symtab **) NULL);
+                        ? &is_a_field_of_this : (int *) NULL);
     /* Call lookup_symtab, not lookup_partial_symtab, in case there are
        no psymtabs (coff, xcoff, or some future change to blow away the
        psymtabs once once symbols are read).  */
index 23f097ac0e230133fc771143efd495d6baadb575..cf35e8895456c836a1d6cdd88a7adbd788c282f5 100644 (file)
@@ -262,7 +262,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
 
                  if (msymbol != NULL)
                    wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
-                                         VAR_DOMAIN, &is_this_fld, NULL);
+                                         VAR_DOMAIN, &is_this_fld);
 
                  if (wsym)
                    {
index 3fefb3ccc096f2109cd7ebcaf97f7a01a14b2006..e478f42e4f2ed36c037cac37110f32a888658552 100644 (file)
@@ -841,7 +841,7 @@ cp_lookup_rtti_type (const char *name, struct block *block)
   struct symbol * rtti_sym;
   struct type * rtti_type;
 
-  rtti_sym = lookup_symbol (name, block, STRUCT_DOMAIN, NULL, NULL);
+  rtti_sym = lookup_symbol (name, block, STRUCT_DOMAIN, NULL);
 
   if (rtti_sym == NULL)
     {
index 6a422b5354f127f1f52652a861b97ba96bcca724..121b2472833a6eb7bcd592a48c1c65018d00c9e8 100644 (file)
@@ -1175,8 +1175,7 @@ yylex ()
     sym = lookup_symbol (tmp, expression_context_block,
                         VAR_DOMAIN,
                         current_language->la_language == language_cplus
-                        ? &is_a_field_of_this : NULL,
-                        NULL);
+                        ? &is_a_field_of_this : NULL);
     if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
       {
        yylval.tsym.type = SYMBOL_TYPE (sym);
index f444153eb72d872c9c4b5c3deb6184b1471dee8f..939a1dcee1e5898795306477d6f1551bcc253c56 100644 (file)
@@ -1045,8 +1045,7 @@ lookup_typename (char *name, struct block *block, int noerr)
   struct symbol *sym;
   struct type *tmp;
 
-  sym = lookup_symbol (name, block, VAR_DOMAIN, 0, 
-                      (struct symtab **) NULL);
+  sym = lookup_symbol (name, block, VAR_DOMAIN, 0);
   if (sym == NULL || SYMBOL_CLASS (sym) != LOC_TYPEDEF)
     {
       tmp = language_lookup_primitive_type_by_name (current_language,
@@ -1101,8 +1100,7 @@ lookup_struct (char *name, struct block *block)
 {
   struct symbol *sym;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0,
-                      (struct symtab **) NULL);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0);
 
   if (sym == NULL)
     {
@@ -1125,8 +1123,7 @@ lookup_union (char *name, struct block *block)
   struct symbol *sym;
   struct type *t;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0,
-                      (struct symtab **) NULL);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0);
 
   if (sym == NULL)
     error (_("No union type named %s."), name);
@@ -1157,8 +1154,7 @@ lookup_enum (char *name, struct block *block)
 {
   struct symbol *sym;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0,
-                      (struct symtab **) NULL);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0);
   if (sym == NULL)
     {
       error (_("No enum type named %s."), name);
@@ -1186,8 +1182,7 @@ lookup_template_type (char *name, struct type *type,
   strcat (nam, TYPE_NAME (type));
   strcat (nam, " >");  /* FIXME, extra space still introduced in gcc? */
 
-  sym = lookup_symbol (nam, block, VAR_DOMAIN, 0, 
-                      (struct symtab **) NULL);
+  sym = lookup_symbol (nam, block, VAR_DOMAIN, 0);
 
   if (sym == NULL)
     {
@@ -1425,8 +1420,7 @@ check_typedef (struct type *type)
              stub_noname_complaint ();
              return type;
            }
-         sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0,
-                              (struct symtab **) NULL);
+         sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0);
          if (sym)
            TYPE_TARGET_TYPE (type) = SYMBOL_TYPE (sym);
          else                                  /* TYPE_CODE_UNDEF */
@@ -1490,8 +1484,7 @@ check_typedef (struct type *type)
          stub_noname_complaint ();
          return type;
        }
-      sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 
-                          0, (struct symtab **) NULL);
+      sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0);
       if (sym)
         {
           /* Same as above for opaque types, we can replace the stub
index 9387fa79d1d91ea3ef762854db65f108ed908ffc..33cbdf99ab8903dd28cd56133c87b301ccf86631 100644 (file)
@@ -1229,7 +1229,7 @@ push_variable (struct stoken name)
   int is_a_field_of_this = 0;
   struct symbol *sym;
   sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN,
-                      &is_a_field_of_this, (struct symtab **) NULL);
+                      &is_a_field_of_this);
   if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF)
     {
       if (symbol_read_needs_frame (sym))
index b72b90c27c2966337d3e25f423f3dc59c9ea0e78..6080839e41a3da7024b63fc407d8c7c52bb8fdec 100644 (file)
@@ -169,8 +169,7 @@ struct type *
 java_lookup_class (char *name)
 {
   struct symbol *sym;
-  sym = lookup_symbol (name, expression_context_block, STRUCT_DOMAIN,
-                      (int *) 0, (struct symtab **) NULL);
+  sym = lookup_symbol (name, expression_context_block, STRUCT_DOMAIN, NULL);
   if (sym != NULL)
     return SYMBOL_TYPE (sym);
 #if 0
@@ -577,8 +576,7 @@ get_java_object_type (void)
   if (java_object_type == NULL)
     {
       struct symbol *sym;
-      sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_DOMAIN,
-                          (int *) 0, (struct symtab **) NULL);
+      sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_DOMAIN, NULL);
       if (sym == NULL)
        error (_("cannot find java.lang.Object"));
       java_object_type = SYMBOL_TYPE (sym);
index 80f69618c8d61c1a9d3c5901b4e2eda1bd52218f..66e554204b0afc1fd614a7934b5a5c07bbb9405b 100644 (file)
@@ -795,7 +795,7 @@ lang_bool_type (void)
   switch (current_language->la_language)
     {
     case language_fortran:
-      sym = lookup_symbol ("logical", NULL, VAR_DOMAIN, NULL, NULL);
+      sym = lookup_symbol ("logical", NULL, VAR_DOMAIN, NULL);
       if (sym)
        {
          type = SYMBOL_TYPE (sym);
@@ -807,9 +807,9 @@ lang_bool_type (void)
     case language_pascal:
     case language_ada:
       if (current_language->la_language==language_cplus)
-        {sym = lookup_symbol ("bool", NULL, VAR_DOMAIN, NULL, NULL);}
+        {sym = lookup_symbol ("bool", NULL, VAR_DOMAIN, NULL);}
       else
-        {sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL, NULL);}
+        {sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL);}
       if (sym)
        {
          type = SYMBOL_TYPE (sym);
@@ -818,7 +818,7 @@ lang_bool_type (void)
        }
       return builtin_type_bool;
     case language_java:
-      sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL, NULL);
+      sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL);
       if (sym)
        {
          type = SYMBOL_TYPE (sym);
index 106cb8807161677ddbc6b411636800fc7d5ec406..6386834ec0d40152bab0495e8cbf180d8cb4f25d 100644 (file)
@@ -136,8 +136,7 @@ symtabs_and_lines symbol_found (int funfirstline,
                                char ***canonical,
                                char *copy,
                                struct symbol *sym,
-                               struct symtab *file_symtab,
-                               struct symtab *sym_symtab);
+                               struct symtab *file_symtab);
 
 static struct
 symtabs_and_lines minsym_found (int funfirstline,
@@ -214,8 +213,7 @@ find_methods (struct type *t, char *name, enum language language,
      the class, then the loop can't do any good.  */
   if (class_name
       && (lookup_symbol_in_language (class_name, (struct block *) NULL,
-                        STRUCT_DOMAIN, language, (int *) NULL,
-                        (struct symtab **) NULL)))
+                        STRUCT_DOMAIN, language, (int *) NULL)))
     {
       int method_counter;
       int name_len = strlen (name);
@@ -316,8 +314,7 @@ add_matching_methods (int method_counter, struct type *t,
       sym_arr[i1] = lookup_symbol_in_language (phys_name,
                                   NULL, VAR_DOMAIN,
                                   language,
-                                  (int *) NULL,
-                                  (struct symtab **) NULL);
+                                  (int *) NULL);
       if (sym_arr[i1])
        i1++;
       else
@@ -374,8 +371,7 @@ add_constructors (int method_counter, struct type *t,
       sym_arr[i1] = lookup_symbol_in_language (phys_name,
                                   NULL, VAR_DOMAIN,
                                   language,
-                                  (int *) NULL,
-                                  (struct symtab **) NULL);
+                                  (int *) NULL);
       if (sym_arr[i1])
        i1++;
     }
@@ -800,12 +796,11 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
       copy = (char *) alloca (p - *argptr + 1);
       memcpy (copy, *argptr, p - *argptr);
       copy[p - *argptr] = '\000';
-      sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab);
+      sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0);
       if (sym)
        {
          *argptr = (*p == '\'') ? p + 1 : p;
-         return symbol_found (funfirstline, canonical, copy, sym,
-                              NULL, sym_symtab);
+         return symbol_found (funfirstline, canonical, copy, sym, NULL);
        }
       /* Otherwise fall out from here and go to file/line spec
          processing, etc. */
@@ -1199,8 +1194,6 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
   char *saved_arg2 = *argptr;
   char *temp_end;
   struct symbol *sym;
-  /* The symtab that SYM was found in.  */
-  struct symtab *sym_symtab;
   char *copy;
   struct symbol *sym_class;
   struct symbol **sym_arr;
@@ -1378,10 +1371,9 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
   *argptr = (*p == '\'') ? p + 1 : p;
 
   /* Look up entire name */
-  sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab);
+  sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0);
   if (sym)
-    return symbol_found (funfirstline, canonical, copy, sym,
-                        NULL, sym_symtab);
+    return symbol_found (funfirstline, canonical, copy, sym, NULL);
 
   /* Couldn't find any interpretation as classes/namespaces, so give
      up.  The quotes are important if copy is empty.  */
@@ -1422,8 +1414,7 @@ lookup_prefix_sym (char **argptr, char *p)
   /* At this point p1->"::inA::fun", p->"inA::fun" copy->"AAA",
      argptr->"inA::fun" */
 
-  return lookup_symbol (copy, 0, STRUCT_DOMAIN, 0,
-                       (struct symtab **) NULL);
+  return lookup_symbol (copy, 0, STRUCT_DOMAIN, 0);
 }
 
 /* This finds the method COPY in the class whose type is T and whose
@@ -1513,8 +1504,7 @@ collect_methods (char *copy, struct type *t,
 
          sym_arr[i1] =
            lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, f_index),
-                          NULL, VAR_DOMAIN, (int *) NULL,
-                          (struct symtab **) NULL);
+                          NULL, VAR_DOMAIN, (int *) NULL);
          if (sym_arr[i1])
            i1++;
        }
@@ -1677,8 +1667,6 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab,
   struct symtab_and_line val;
   char *p;
   struct symbol *sym;
-  /* The symtab that SYM was found in.  */
-  struct symtab *sym_symtab;
   struct minimal_symbol *msymbol;
 
   p = (copy[1] == '$') ? copy + 2 : copy + 1;
@@ -1698,13 +1686,12 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab,
         convenience variable.  */
 
       /* Look up entire name as a symbol first.  */
-      sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab);
+      sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0);
       file_symtab = (struct symtab *) NULL;
       need_canonical = 1;
       /* Symbol was found --> jump to normal symbol processing.  */
       if (sym)
-       return symbol_found (funfirstline, canonical, copy, sym,
-                            NULL, sym_symtab);
+       return symbol_found (funfirstline, canonical, copy, sym, NULL);
 
       /* If symbol was not found, look in minimal symbol tables.  */
       msymbol = lookup_minimal_symbol (copy, NULL, NULL);
@@ -1747,8 +1734,6 @@ decode_variable (char *copy, int funfirstline, char ***canonical,
                 struct symtab *file_symtab, int *not_found_ptr)
 {
   struct symbol *sym;
-  /* The symtab that SYM was found in.  */
-  struct symtab *sym_symtab;
 
   struct minimal_symbol *msymbol;
 
@@ -1757,11 +1742,10 @@ decode_variable (char *copy, int funfirstline, char ***canonical,
                        ? BLOCKVECTOR_BLOCK (BLOCKVECTOR (file_symtab),
                                             STATIC_BLOCK)
                        : get_selected_block (0)),
-                      VAR_DOMAIN, 0, &sym_symtab);
+                      VAR_DOMAIN, 0);
 
   if (sym != NULL)
-    return symbol_found (funfirstline, canonical, copy, sym,
-                        file_symtab, sym_symtab);
+    return symbol_found (funfirstline, canonical, copy, sym, file_symtab);
 
   msymbol = lookup_minimal_symbol (copy, NULL, NULL);
 
@@ -1788,8 +1772,7 @@ decode_variable (char *copy, int funfirstline, char ***canonical,
 
 static struct symtabs_and_lines
 symbol_found (int funfirstline, char ***canonical, char *copy,
-             struct symbol *sym, struct symtab *file_symtab,
-             struct symtab *sym_symtab)
+             struct symbol *sym, struct symtab *file_symtab)
 {
   struct symtabs_and_lines values;
   
@@ -1809,7 +1792,7 @@ symbol_found (int funfirstline, char ***canonical, char *copy,
         function.  */
       if (file_symtab == 0)
        {
-         struct blockvector *bv = BLOCKVECTOR (sym_symtab);
+         struct blockvector *bv = BLOCKVECTOR (SYMBOL_SYMTAB (sym));
          struct block *b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK);
          if (lookup_block_symbol (b, copy, NULL, VAR_DOMAIN) != NULL)
            build_canonical_line_spec (values.sals, copy, canonical);
@@ -1827,7 +1810,7 @@ symbol_found (int funfirstline, char ***canonical, char *copy,
            xmalloc (sizeof (struct symtab_and_line));
          values.nelts = 1;
          memset (&values.sals[0], 0, sizeof (values.sals[0]));
-         values.sals[0].symtab = sym_symtab;
+         values.sals[0].symtab = SYMBOL_SYMTAB (sym);
          values.sals[0].line = SYMBOL_LINE (sym);
          return values;
        }
index 143252fd6bd11affdd2bd43f6b97f34b7b30280d..c5ee4a4e49c82674df22e46702c8f258a79fe59d 100644 (file)
@@ -550,7 +550,7 @@ block       :       fblock
 fblock :       BLOCKNAME
                        { struct symbol *sym
                            = lookup_symbol (copy_name ($1), expression_context_block,
-                                            VAR_DOMAIN, 0, NULL);
+                                            VAR_DOMAIN, 0);
                          $$ = sym;}
        ;
                             
@@ -559,7 +559,7 @@ fblock      :       BLOCKNAME
 fblock :       block COLONCOLON BLOCKNAME
                        { struct symbol *tem
                            = lookup_symbol (copy_name ($3), $1,
-                                            VAR_DOMAIN, 0, NULL);
+                                            VAR_DOMAIN, 0);
                          if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
                            error ("No function \"%s\" in specified context.",
                                   copy_name ($3));
@@ -583,7 +583,7 @@ variable:   INTERNAL_VAR
 variable:      block COLONCOLON NAME
                        { struct symbol *sym;
                          sym = lookup_symbol (copy_name ($3), $1,
-                                              VAR_DOMAIN, 0, NULL);
+                                              VAR_DOMAIN, 0);
                          if (sym == 0)
                            error ("No symbol \"%s\" in specified context.",
                                   copy_name ($3));
@@ -603,8 +603,7 @@ variable:   NAME
                          sym = lookup_symbol (copy_name ($1),
                                               expression_context_block,
                                               VAR_DOMAIN,
-                                              &is_a_field_of_this,
-                                              NULL);
+                                              &is_a_field_of_this);
                          if (sym)
                            {
                              if (symbol_read_needs_frame (sym))
@@ -1028,8 +1027,7 @@ yylex ()
 
     if (lookup_partial_symtab (tmp))
       return BLOCKNAME;
-    sym = lookup_symbol (tmp, expression_context_block,
-                        VAR_DOMAIN, 0, NULL);
+    sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, 0);
     if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
       return BLOCKNAME;
     if (lookup_typename (copy_name (yylval.sval), expression_context_block, 1))
index 771f5fdacf39a774ea5d3b0735c5dbce1cddd8ad..c997ccd188dfd7228747e0741bf844c777c2db23 100644 (file)
@@ -1880,7 +1880,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab,
          the same name exists, lookup_symbol will eventually read in the symtab
          for the global function and clobber cur_fdr.  */
       FDR *save_cur_fdr = cur_fdr;
-      s = lookup_symbol (sh_name, NULL, VAR_DOMAIN, 0, NULL);
+      s = lookup_symbol (sh_name, NULL, VAR_DOMAIN, 0);
       cur_fdr = save_cur_fdr;
 #else
       s = mylookup_symbol
index 4d38867340a6fa47099a9b07b2f26a90dd1979c5..af3818e43d8559b06cda59406f1b37cdd30fda83 100644 (file)
@@ -283,8 +283,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi)
              if (!locals)
                sym2 = lookup_symbol (SYMBOL_NATURAL_NAME (sym),
                                      block, VAR_DOMAIN,
-                                     (int *) NULL,
-                                     (struct symtab **) NULL);
+                                     (int *) NULL);
              else
                    sym2 = sym;
              switch (values)
index b3049dcdda37d532ee74c8d6201b8c1bb4013119..47246fbf0b0e3acfd8ad0ba84ec6add6ab36be28 100644 (file)
@@ -411,7 +411,7 @@ mt_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
       struct symbol *sym;
 
       /* Found a function.  */
-      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL);
+      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
       if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
        {
          /* Don't use this trick for assembly source files.  */
index f44cf6d7ced1a23b983e6cd40fa1f71f1b33fe03..367b53515d000b8dd8fc96299758c46f5edbb2bc 100644 (file)
@@ -634,8 +634,7 @@ block       :       BLOCKNAME
 block  :       block COLONCOLON name
                        { struct symbol *tem
                            = lookup_symbol (copy_name ($3), $1,
-                                            VAR_DOMAIN, (int *) NULL,
-                                            (struct symtab **) NULL);
+                                            VAR_DOMAIN, (int *) NULL);
                          if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
                            error ("No function \"%s\" in specified context.",
                                   copy_name ($3));
@@ -645,8 +644,7 @@ block       :       block COLONCOLON name
 variable:      block COLONCOLON name
                        { struct symbol *sym;
                          sym = lookup_symbol (copy_name ($3), $1,
-                                              VAR_DOMAIN, (int *) NULL,
-                                              (struct symtab **) NULL);
+                                              VAR_DOMAIN, (int *) NULL);
                          if (sym == 0)
                            error ("No symbol \"%s\" in specified context.",
                                   copy_name ($3));
@@ -705,8 +703,7 @@ variable:   qualified_name
 
                          sym =
                            lookup_symbol (name, (const struct block *) NULL,
-                                          VAR_DOMAIN, (int *) NULL,
-                                          (struct symtab **) NULL);
+                                          VAR_DOMAIN, (int *) NULL);
                          if (sym)
                            {
                              write_exp_elt_opcode (OP_VAR_VALUE);
@@ -1643,8 +1640,7 @@ yylex ()
 
     sym = lookup_symbol (tmp, expression_context_block,
                         VAR_DOMAIN,
-                        need_this,
-                        (struct symtab **) NULL);
+                        need_this);
     /* Call lookup_symtab, not lookup_partial_symtab, in case there
        are no psymtabs (coff, xcoff, or some future change to blow
        away the psymtabs once symbols are read).  */
@@ -1721,8 +1717,7 @@ yylex ()
                      tmp1[p - namestart] = '\0';
                      cur_sym = lookup_symbol (ncopy, 
                                               expression_context_block,
-                                              VAR_DOMAIN, (int *) NULL,
-                                              (struct symtab **) NULL);
+                                              VAR_DOMAIN, (int *) NULL);
                      if (cur_sym)
                        {
                          if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF)
index 08a6bb8b25cbd37e5edc3c54c93b7ec4945af3d6..56871e319911b5c4c30d51e5c6c301cf1fc70dff 100644 (file)
@@ -85,8 +85,7 @@ lookup_struct_typedef (char *name, struct block *block, int noerr)
 {
   struct symbol *sym;
 
-  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, 
-                      (struct symtab **) NULL);
+  sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0);
 
   if (sym == NULL)
     {
@@ -1272,7 +1271,7 @@ char *find_imps (struct symtab *symtab, struct block *block,
     if (tmp == NULL)
       return NULL;
     
-    sym = lookup_symbol (selector, block, VAR_DOMAIN, 0, NULL);
+    sym = lookup_symbol (selector, block, VAR_DOMAIN, 0);
     if (sym != NULL) 
       {
        if (syms)
index 97ce0f73eede6988dedbc9de9cb87f53b6a5ca74..95ccdf11d89612a5fec137d6aeedcfd1010df478 100644 (file)
@@ -596,8 +596,7 @@ block       :       BLOCKNAME
 block  :       block COLONCOLON name
                        { struct symbol *tem
                            = lookup_symbol (copy_name ($3), $1,
-                                            VAR_DOMAIN, (int *) NULL,
-                                            (struct symtab **) NULL);
+                                            VAR_DOMAIN, (int *) NULL);
                          if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
                            error ("No function \"%s\" in specified context.",
                                   copy_name ($3));
@@ -607,8 +606,7 @@ block       :       block COLONCOLON name
 variable:      block COLONCOLON name
                        { struct symbol *sym;
                          sym = lookup_symbol (copy_name ($3), $1,
-                                              VAR_DOMAIN, (int *) NULL,
-                                              (struct symtab **) NULL);
+                                              VAR_DOMAIN, (int *) NULL);
                          if (sym == 0)
                            error ("No symbol \"%s\" in specified context.",
                                   copy_name ($3));
@@ -644,8 +642,7 @@ variable:   qualified_name
 
                          sym =
                            lookup_symbol (name, (const struct block *) NULL,
-                                          VAR_DOMAIN, (int *) NULL,
-                                          (struct symtab **) NULL);
+                                          VAR_DOMAIN, (int *) NULL);
                          if (sym)
                            {
                              write_exp_elt_opcode (OP_VAR_VALUE);
@@ -1435,8 +1432,7 @@ yylex ()
          static const char this_name[] = "this";
 
          if (lookup_symbol (this_name, expression_context_block,
-                            VAR_DOMAIN, (int *) NULL,
-                            (struct symtab **) NULL))
+                            VAR_DOMAIN, (int *) NULL))
            {
              free (uptokstart);
              return THIS;
@@ -1480,9 +1476,7 @@ yylex ()
       sym = NULL;
     else
       sym = lookup_symbol (tmp, expression_context_block,
-                          VAR_DOMAIN,
-                          &is_a_field_of_this,
-                          (struct symtab **) NULL);
+                          VAR_DOMAIN, &is_a_field_of_this);
     /* second chance uppercased (as Free Pascal does).  */
     if (!sym && !is_a_field_of_this && !is_a_field)
       {
@@ -1497,9 +1491,7 @@ yylex ()
         sym = NULL;
        else
         sym = lookup_symbol (tmp, expression_context_block,
-                        VAR_DOMAIN,
-                        &is_a_field_of_this,
-                        (struct symtab **) NULL);
+                             VAR_DOMAIN, &is_a_field_of_this);
        if (sym || is_a_field_of_this || is_a_field)
          for (i = 0; i <= namelen; i++)
            {
@@ -1527,9 +1519,7 @@ yylex ()
         sym = NULL;
        else
         sym = lookup_symbol (tmp, expression_context_block,
-                         VAR_DOMAIN,
-                         &is_a_field_of_this,
-                         (struct symtab **) NULL);
+                             VAR_DOMAIN, &is_a_field_of_this);
        if (sym || is_a_field_of_this || is_a_field)
           for (i = 0; i <= namelen; i++)
             {
@@ -1626,8 +1616,7 @@ yylex ()
                      memcpy (tmp1, namestart, p - namestart);
                      tmp1[p - namestart] = '\0';
                      cur_sym = lookup_symbol (ncopy, expression_context_block,
-                                              VAR_DOMAIN, (int *) NULL,
-                                              (struct symtab **) NULL);
+                                              VAR_DOMAIN, (int *) NULL);
                      if (cur_sym)
                        {
                          if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF)
index fa0ec6c40a10ef7a6ad80c630b88ff34c5fc70f3..23a04dab3dc65832d73359e7958e70496142fda9 100644 (file)
@@ -219,7 +219,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
 
                  if (msymbol != NULL)
                    wsym = lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), block,
-                                         VAR_DOMAIN, &is_this_fld, NULL);
+                                         VAR_DOMAIN, &is_this_fld);
 
                  if (wsym)
                    {
index 9c0edf52a22847fccb49d2b41e867bb51a0761d5..09ceaa920251e0c3f498a27badf9166f9daa6306 100644 (file)
@@ -543,7 +543,7 @@ write_dollar_variable (struct stoken str)
      have names beginning with $ or $$.  Check for those, first. */
 
   sym = lookup_symbol (copy_name (str), (struct block *) NULL,
-                      VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
+                      VAR_DOMAIN, (int *) NULL);
   if (sym)
     {
       write_exp_elt_opcode (OP_VAR_VALUE);
index 8a0db8dffd958d4aeb3e79a322424d9386570713..44fb2e1fd722a50a1c5f6964e0a24a4ebc5574d0 100644 (file)
@@ -1051,7 +1051,7 @@ address_info (char *exp, int from_tty)
     error (_("Argument required."));
 
   sym = lookup_symbol (exp, get_selected_block (0), VAR_DOMAIN,
-                      &is_a_field_of_this, (struct symtab **) NULL);
+                      &is_a_field_of_this);
   if (sym == NULL)
     {
       if (is_a_field_of_this)
index 0692d438b7c2c3e074f23852582457bf361f4ae6..991e4b48d8203e3c2d1be8df83e9bc7abb162290 100644 (file)
@@ -159,8 +159,7 @@ scm_lookup_name (char *str)
   if (in_eval_c ()
       && (sym = lookup_symbol ("env",
                               expression_context_block,
-                              VAR_DOMAIN, (int *) NULL,
-                              (struct symtab **) NULL)) != NULL)
+                              VAR_DOMAIN, (int *) NULL)) != NULL)
     args[2] = value_of_variable (sym, expression_context_block);
   else
     /* FIXME in this case, we should try lookup_symbol first */
@@ -173,8 +172,7 @@ scm_lookup_name (char *str)
 
   sym = lookup_symbol (str,
                       expression_context_block,
-                      VAR_DOMAIN, (int *) NULL,
-                      (struct symtab **) NULL);
+                      VAR_DOMAIN, (int *) NULL);
   if (sym)
     return value_of_variable (sym, NULL);
   error (_("No symbol \"%s\" in current context."), str);
index 03ecbd7c849d082f7d98b49aba78443dad07a4b5..fc5fe0b0f168b57e9112e1a10bb94362ecd019d4 100644 (file)
@@ -239,7 +239,7 @@ select_source_symtab (struct symtab *s)
 
   /* Make the default place to list be the function `main'
      if one exists.  */
-  if (lookup_symbol (main_name (), 0, VAR_DOMAIN, 0, NULL))
+  if (lookup_symbol (main_name (), 0, VAR_DOMAIN, 0))
     {
       sals = decode_line_spec (main_name (), 1);
       sal = sals.sals[0];
index 47df3967e8849a2b6541bdb0e3d683ecc92f9045..a0c1edf335786fef08b70f2e78b94d360d1c79c5 100644 (file)
@@ -291,7 +291,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
            {
              struct symbol *nsym;
              nsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
-                                   b, VAR_DOMAIN, NULL, NULL);
+                                   b, VAR_DOMAIN, NULL);
              gdb_assert (nsym != NULL);
              if (SYMBOL_CLASS (nsym) == LOC_REGISTER)
                {
@@ -1599,7 +1599,7 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
             are not combined in symbol-reading.  */
 
          sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
-                               b, VAR_DOMAIN, NULL, NULL);
+                               b, VAR_DOMAIN, NULL);
          print_variable_value (sym2, frame, stream);
          fprintf_filtered (stream, "\n");
          break;
index db0808bba4a5e3c7ed3913ba191bf2bbf52e2aec..4f19d13368589d4cf513442f1c3850f90f5c290a 100644 (file)
@@ -1190,8 +1190,7 @@ fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile)
 struct symbol *
 lookup_symbol_in_language (const char *name, const struct block *block,
                           const domain_enum domain, enum language lang,
-                          int *is_a_field_of_this,
-                          struct symtab **symtab)
+                          int *is_a_field_of_this)
 {
   char *demangled_name = NULL;
   const char *modified_name = NULL;
@@ -1243,10 +1242,6 @@ lookup_symbol_in_language (const char *name, const struct block *block,
   if (needtofreename)
     xfree (demangled_name);
 
-  /* Override the returned symtab with the symbol's specific one.  */
-  if (returnval != NULL && symtab != NULL)
-    *symtab = SYMBOL_SYMTAB (returnval);
-
   return returnval;     
 }
 
@@ -1255,12 +1250,11 @@ lookup_symbol_in_language (const char *name, const struct block *block,
 
 struct symbol *
 lookup_symbol (const char *name, const struct block *block,
-              domain_enum domain, int *is_a_field_of_this,
-              struct symtab **symtab)
+              domain_enum domain, int *is_a_field_of_this)
 {
   return lookup_symbol_in_language (name, block, domain,
                                    current_language->la_language,
-                                   is_a_field_of_this, symtab);
+                                   is_a_field_of_this);
 }
 
 /* Behave like lookup_symbol except that NAME is the natural name
@@ -3172,8 +3166,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
                    if (kind == FUNCTIONS_DOMAIN
                        || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol),
                                          (struct block *) NULL,
-                                         VAR_DOMAIN,
-                                         0, (struct symtab **) NULL)
+                                         VAR_DOMAIN, 0)
                        == NULL)
                      found_misc = 1;
                  }
@@ -3259,8 +3252,8 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
                  {
                    /* Variables/Absolutes:  Look up by name */
                    if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol),
-                                      (struct block *) NULL, VAR_DOMAIN,
-                                      0, (struct symtab **) NULL) == NULL)
+                                      (struct block *) NULL, VAR_DOMAIN, 0)
+                        == NULL)
                      {
                        /* match */
                        psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search));
index 0a970dfbfe2ad5f4e9740ec70a6aacd54431179a..92ea5180c2f69fdb6ff63184cca4273efbc73c87 100644 (file)
@@ -1012,15 +1012,13 @@ extern struct symbol *lookup_symbol_in_language (const char *,
                                                 const struct block *,
                                                 const domain_enum,
                                                 enum language,
-                                                int *,
-                                                struct symtab **);
+                                                int *);
 
 /* lookup a symbol by name (optional block, optional symtab)
    in the current language */
 
 extern struct symbol *lookup_symbol (const char *, const struct block *,
-                                    const domain_enum, int *,
-                                    struct symtab **);
+                                    const domain_enum, int *);
 
 /* A default version of lookup_symbol_nonlocal for use by languages
    that can't think of anything better to do.  */
index 0d1bcc5c47162a453184d2115fc84fc99bff6137..3ddee90ee6dd6aa257f401826ce3499eb1ae8c93 100644 (file)
@@ -127,7 +127,7 @@ struct value *
 find_function_in_inferior (const char *name)
 {
   struct symbol *sym;
-  sym = lookup_symbol (name, 0, VAR_DOMAIN, 0, NULL);
+  sym = lookup_symbol (name, 0, VAR_DOMAIN, 0);
   if (sym != NULL)
     {
       if (SYMBOL_CLASS (sym) != LOC_BLOCK)
@@ -2597,7 +2597,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
            {
              struct symbol *s = 
                lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, j),
-                              0, VAR_DOMAIN, 0, NULL);
+                              0, VAR_DOMAIN, 0);
              if (s == NULL)
                return NULL;
 
@@ -2626,7 +2626,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
            {
              struct symbol *s = 
                lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, j),
-                              0, VAR_DOMAIN, 0, NULL);
+                              0, VAR_DOMAIN, 0);
              if (s == NULL)
                return NULL;
 
index e5a9a625ec0e4a8aa9a36efc9f1cefe1a2060968..71ddf5c0399a77bd8618be72a4117e74a2d4c8d8 100644 (file)
@@ -1244,7 +1244,7 @@ value_static_field (struct type *type, int fieldno)
   else
     {
       char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno);
-      struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0, NULL);
+      struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0);
       if (sym == NULL)
        {
          /* With some compilers, e.g. HP aCC, static data members are reported
@@ -1414,7 +1414,7 @@ value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *ty
   struct symbol *sym;
   struct minimal_symbol *msym;
 
-  sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0, NULL);
+  sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0);
   if (sym != NULL)
     {
       msym = NULL;
index d21e15d5c0951bf4b5cc6efcb3e038fa1b61d3f9..adc2f21406a1e2365e4d83880d602dc5d3e8d566 100644 (file)
@@ -424,7 +424,7 @@ xstormy16_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
         return plg_end;
 
       /* Found a function.  */
-      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL);
+      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
       /* Don't use line number debug info for assembly source files. */
       if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
        {
This page took 0.053652 seconds and 4 git commands to generate.