This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rfc] [2/2] Remove SYMTAB argument from lookup_symbol functions


Hello,

this implements the other side of removing the SYMTAB parameter from
lookup_symbol_in_language.   The only place where that information
is actually ever used is SYM_SYMTAB in linespec.c:symbol_found.
This patch replaces that use by SYMBOL_SYMTAB (sym).

Every other caller of the lookup_symbol routines always passes NULL
as SYMTAB pointer, or in the end ignores the value that is filled in.
The patch simply removes all of this.

Tested (together with part 1) on spu-elf, powerpc-linux, powerpc64-linux
with no regressions.

Joel, would you mind checking the Ada changes?  There was an element
SYMTAB in struct ada_symbol_info which appears to be obsolete now,
so I've removed it and everything that touched it as well ...

Bye,
Ulrich


ChangeLog:

	* 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.


diff -urNp gdb-orig/gdb/ada-lang.c gdb-head/gdb/ada-lang.c
--- gdb-orig/gdb/ada-lang.c	2008-05-16 17:10:21.000000000 +0200
+++ gdb-head/gdb/ada-lang.c	2008-05-16 17:31:45.000000000 +0200
@@ -115,13 +115,12 @@ static struct value *make_array_descript
 
 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
 
 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)
 {
 }
 
@@ -3998,13 +3996,11 @@ standard_lookup (const char *name, const
                  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
 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 *obstack
         {
           prevDefns[i].sym = sym;
           prevDefns[i].block = block;
-          prevDefns[i].symtab = symtab;
           return;
         }
     }
@@ -4122,7 +4117,6 @@ add_defn_to_vec (struct obstack *obstack
 
     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 *name
     {
       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 *name
     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 *name
     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 *name
                     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 *name
         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 *name
         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 *name
               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 *o
                 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 *o
                     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 *o
     {
       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 *o
                     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 *o
         {
           add_defn_to_vec (obstackp,
                            fixup_symbol_section (arg_sym, objfile),
-                           block, symtab);
+                           block);
         }
     }
 }
diff -urNp gdb-orig/gdb/ada-lang.h gdb-head/gdb/ada-lang.h
--- gdb-orig/gdb/ada-lang.h	2008-05-16 17:10:21.000000000 +0200
+++ gdb-head/gdb/ada-lang.h	2008-05-16 17:22:33.000000000 +0200
@@ -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).  */
diff -urNp gdb-orig/gdb/alpha-mdebug-tdep.c gdb-head/gdb/alpha-mdebug-tdep.c
--- gdb-orig/gdb/alpha-mdebug-tdep.c	2008-05-09 19:20:21.000000000 +0200
+++ gdb-head/gdb/alpha-mdebug-tdep.c	2008-05-16 17:10:26.000000000 +0200
@@ -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)
diff -urNp gdb-orig/gdb/arm-tdep.c gdb-head/gdb/arm-tdep.c
--- gdb-orig/gdb/arm-tdep.c	2008-05-09 19:20:21.000000000 +0200
+++ gdb-head/gdb/arm-tdep.c	2008-05-16 17:10:26.000000000 +0200
@@ -534,7 +534,7 @@ arm_skip_prologue (struct gdbarch *gdbar
       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.  */
diff -urNp gdb-orig/gdb/c-exp.y gdb-head/gdb/c-exp.y
--- gdb-orig/gdb/c-exp.y	2008-04-17 15:52:45.000000000 +0200
+++ gdb-head/gdb/c-exp.y	2008-05-16 17:10:26.000000000 +0200
@@ -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).  */
diff -urNp gdb-orig/gdb/cp-support.c gdb-head/gdb/cp-support.c
--- gdb-orig/gdb/cp-support.c	2008-05-09 19:20:21.000000000 +0200
+++ gdb-head/gdb/cp-support.c	2008-05-16 17:10:26.000000000 +0200
@@ -841,7 +841,7 @@ cp_lookup_rtti_type (const char *name, s
   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)
     {
diff -urNp gdb-orig/gdb/c-valprint.c gdb-head/gdb/c-valprint.c
--- gdb-orig/gdb/c-valprint.c	2008-05-09 19:20:21.000000000 +0200
+++ gdb-head/gdb/c-valprint.c	2008-05-16 17:10:26.000000000 +0200
@@ -262,7 +262,7 @@ c_val_print (struct type *type, const gd
 
 		  if (msymbol != NULL)
 		    wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
-					  VAR_DOMAIN, &is_this_fld, NULL);
+					  VAR_DOMAIN, &is_this_fld);
 
 		  if (wsym)
 		    {
diff -urNp gdb-orig/gdb/f-exp.y gdb-head/gdb/f-exp.y
--- gdb-orig/gdb/f-exp.y	2008-04-17 15:52:45.000000000 +0200
+++ gdb-head/gdb/f-exp.y	2008-05-16 17:10:26.000000000 +0200
@@ -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);
diff -urNp gdb-orig/gdb/gdbtypes.c gdb-head/gdb/gdbtypes.c
--- gdb-orig/gdb/gdbtypes.c	2008-04-17 15:52:45.000000000 +0200
+++ gdb-head/gdb/gdbtypes.c	2008-05-16 17:10:26.000000000 +0200
@@ -1045,8 +1045,7 @@ lookup_typename (char *name, struct bloc
   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 
 {
   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 *
   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 *b
 {
   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
   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
diff -urNp gdb-orig/gdb/jv-exp.y gdb-head/gdb/jv-exp.y
--- gdb-orig/gdb/jv-exp.y	2008-04-17 15:52:45.000000000 +0200
+++ gdb-head/gdb/jv-exp.y	2008-05-16 17:10:26.000000000 +0200
@@ -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))
diff -urNp gdb-orig/gdb/jv-lang.c gdb-head/gdb/jv-lang.c
--- gdb-orig/gdb/jv-lang.c	2008-04-17 15:53:11.000000000 +0200
+++ gdb-head/gdb/jv-lang.c	2008-05-16 17:10:26.000000000 +0200
@@ -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);
diff -urNp gdb-orig/gdb/language.c gdb-head/gdb/language.c
--- gdb-orig/gdb/language.c	2008-04-17 15:53:11.000000000 +0200
+++ gdb-head/gdb/language.c	2008-05-16 17:10:26.000000000 +0200
@@ -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);
diff -urNp gdb-orig/gdb/linespec.c gdb-head/gdb/linespec.c
--- gdb-orig/gdb/linespec.c	2008-05-09 19:20:22.000000000 +0200
+++ gdb-head/gdb/linespec.c	2008-05-16 17:10:26.000000000 +0200
@@ -136,8 +136,7 @@ symtabs_and_lines symbol_found (int funf
 				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
      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
       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, st
       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 funfir
       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 funf
   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 funf
   *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 *
   /* 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
 
 	  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 funfirstl
   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 funfirstl
 	 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 funfirs
 		 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 funfirs
 			? 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 funfirs
 
 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 ***
 	 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 ***
 	    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;
 	}
diff -urNp gdb-orig/gdb/m2-exp.y gdb-head/gdb/m2-exp.y
--- gdb-orig/gdb/m2-exp.y	2008-04-17 15:52:45.000000000 +0200
+++ gdb-head/gdb/m2-exp.y	2008-05-16 17:10:26.000000000 +0200
@@ -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))
diff -urNp gdb-orig/gdb/mdebugread.c gdb-head/gdb/mdebugread.c
--- gdb-orig/gdb/mdebugread.c	2008-03-26 15:00:53.000000000 +0100
+++ gdb-head/gdb/mdebugread.c	2008-05-16 17:10:26.000000000 +0200
@@ -1880,7 +1880,7 @@ parse_procedure (PDR *pr, struct 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
diff -urNp gdb-orig/gdb/mi/mi-cmd-stack.c gdb-head/gdb/mi/mi-cmd-stack.c
--- gdb-orig/gdb/mi/mi-cmd-stack.c	2008-05-09 19:20:24.000000000 +0200
+++ gdb-head/gdb/mi/mi-cmd-stack.c	2008-05-16 17:10:26.000000000 +0200
@@ -283,8 +283,7 @@ list_args_or_locals (int locals, int val
 	      if (!locals)
 		sym2 = lookup_symbol (SYMBOL_NATURAL_NAME (sym),
 				      block, VAR_DOMAIN,
-				      (int *) NULL,
-				      (struct symtab **) NULL);
+				      (int *) NULL);
 	      else
 		    sym2 = sym;
 	      switch (values)
diff -urNp gdb-orig/gdb/mt-tdep.c gdb-head/gdb/mt-tdep.c
--- gdb-orig/gdb/mt-tdep.c	2008-05-09 19:20:22.000000000 +0200
+++ gdb-head/gdb/mt-tdep.c	2008-05-16 17:10:26.000000000 +0200
@@ -411,7 +411,7 @@ mt_skip_prologue (struct gdbarch *gdbarc
       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.  */
diff -urNp gdb-orig/gdb/objc-exp.y gdb-head/gdb/objc-exp.y
--- gdb-orig/gdb/objc-exp.y	2008-04-17 15:52:45.000000000 +0200
+++ gdb-head/gdb/objc-exp.y	2008-05-16 17:10:26.000000000 +0200
@@ -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)
diff -urNp gdb-orig/gdb/objc-lang.c gdb-head/gdb/objc-lang.c
--- gdb-orig/gdb/objc-lang.c	2008-04-17 15:53:11.000000000 +0200
+++ gdb-head/gdb/objc-lang.c	2008-05-16 17:10:26.000000000 +0200
@@ -85,8 +85,7 @@ lookup_struct_typedef (char *name, struc
 {
   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, 
     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)
diff -urNp gdb-orig/gdb/parse.c gdb-head/gdb/parse.c
--- gdb-orig/gdb/parse.c	2008-05-09 19:20:22.000000000 +0200
+++ gdb-head/gdb/parse.c	2008-05-16 17:10:26.000000000 +0200
@@ -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);
diff -urNp gdb-orig/gdb/p-exp.y gdb-head/gdb/p-exp.y
--- gdb-orig/gdb/p-exp.y	2008-04-17 15:52:45.000000000 +0200
+++ gdb-head/gdb/p-exp.y	2008-05-16 17:10:26.000000000 +0200
@@ -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)
diff -urNp gdb-orig/gdb/printcmd.c gdb-head/gdb/printcmd.c
--- gdb-orig/gdb/printcmd.c	2008-05-09 19:20:23.000000000 +0200
+++ gdb-head/gdb/printcmd.c	2008-05-16 17:10:26.000000000 +0200
@@ -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)
diff -urNp gdb-orig/gdb/p-valprint.c gdb-head/gdb/p-valprint.c
--- gdb-orig/gdb/p-valprint.c	2008-05-09 19:20:22.000000000 +0200
+++ gdb-head/gdb/p-valprint.c	2008-05-16 17:10:26.000000000 +0200
@@ -219,7 +219,7 @@ pascal_val_print (struct type *type, con
 
 		  if (msymbol != NULL)
 		    wsym = lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), block,
-					  VAR_DOMAIN, &is_this_fld, NULL);
+					  VAR_DOMAIN, &is_this_fld);
 
 		  if (wsym)
 		    {
diff -urNp gdb-orig/gdb/scm-lang.c gdb-head/gdb/scm-lang.c
--- gdb-orig/gdb/scm-lang.c	2008-04-17 15:53:11.000000000 +0200
+++ gdb-head/gdb/scm-lang.c	2008-05-16 17:10:26.000000000 +0200
@@ -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);
diff -urNp gdb-orig/gdb/source.c gdb-head/gdb/source.c
--- gdb-orig/gdb/source.c	2008-05-09 19:20:23.000000000 +0200
+++ gdb-head/gdb/source.c	2008-05-16 17:10:26.000000000 +0200
@@ -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];
diff -urNp gdb-orig/gdb/stack.c gdb-head/gdb/stack.c
--- gdb-orig/gdb/stack.c	2008-05-09 19:20:23.000000000 +0200
+++ gdb-head/gdb/stack.c	2008-05-16 17:10:26.000000000 +0200
@@ -291,7 +291,7 @@ print_frame_args (struct symbol *func, s
 	    {
 	      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 
 	     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;
diff -urNp gdb-orig/gdb/symtab.c gdb-head/gdb/symtab.c
--- gdb-orig/gdb/symtab.c	2008-05-16 17:10:21.000000000 +0200
+++ gdb-head/gdb/symtab.c	2008-05-16 17:10:49.000000000 +0200
@@ -1132,8 +1132,7 @@ fixup_psymbol_section (struct partial_sy
 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;
@@ -1185,10 +1184,6 @@ lookup_symbol_in_language (const char *n
   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;	 
 }
 
@@ -1197,12 +1192,11 @@ lookup_symbol_in_language (const char *n
 
 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
@@ -3114,8 +3108,7 @@ search_symbols (char *regexp, domain_enu
 		    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;
 		  }
@@ -3201,8 +3194,8 @@ search_symbols (char *regexp, domain_enu
 		  {
 		    /* 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));
diff -urNp gdb-orig/gdb/symtab.h gdb-head/gdb/symtab.h
--- gdb-orig/gdb/symtab.h	2008-05-16 17:10:21.000000000 +0200
+++ gdb-head/gdb/symtab.h	2008-05-16 17:10:26.000000000 +0200
@@ -1012,15 +1012,13 @@ extern struct symbol *lookup_symbol_in_l
 						 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.  */
diff -urNp gdb-orig/gdb/valops.c gdb-head/gdb/valops.c
--- gdb-orig/gdb/valops.c	2008-05-16 17:10:21.000000000 +0200
+++ gdb-head/gdb/valops.c	2008-05-16 17:10:26.000000000 +0200
@@ -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 t
 	    {
 	      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 t
 	    {
 	      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;
 
diff -urNp gdb-orig/gdb/value.c gdb-head/gdb/value.c
--- gdb-orig/gdb/value.c	2008-05-09 19:20:23.000000000 +0200
+++ gdb-head/gdb/value.c	2008-05-16 17:10:26.000000000 +0200
@@ -1244,7 +1244,7 @@ value_static_field (struct type *type, i
   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, st
   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;
diff -urNp gdb-orig/gdb/xstormy16-tdep.c gdb-head/gdb/xstormy16-tdep.c
--- gdb-orig/gdb/xstormy16-tdep.c	2008-05-09 19:20:23.000000000 +0200
+++ gdb-head/gdb/xstormy16-tdep.c	2008-05-16 17:10:26.000000000 +0200
@@ -424,7 +424,7 @@ xstormy16_skip_prologue (struct gdbarch 
         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)
 	{
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]