[PATCH] delete one instance of SOFUN_ADDRESS_MAYBE_MISSING

Elena Zannoni ezannoni@redhat.com
Wed Oct 15 22:13:00 GMT 2003


As pointed out in a previous thread, this code is a no-op, and the second
parameter is never used, so it's pretty safe.
http://sources.redhat.com/ml/gdb/2003-10/msg00202.html

However, this will change HPUX. Any chance Joel, you can test it?
Or point me at the HP build farm and I can do it.

elena

2003-10-15  Elena Zannoni  <ezannoni@redhat.com>

	* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
	second parameter, which is always null. Remove
	SOFUN_ADDRESS_MAYBE_MISSING ifdeffed code.
	* symtab.h (lookup_minimal_symbol_solib_trampoline): Update
	accordingly.
	* somsolib.c (som_solib_create_inferior_hook,
	som_solib_desire_dynamic_linker_symbols): Update callers.
	* hppa-tdep.c (hppa_fix_call_dummy): Ditto.

Index: symtab.h
===================================================================
RCS file: /cvs/uberbaum/gdb/symtab.h,v
retrieving revision 1.79
diff -u -p -r1.79 symtab.h
--- symtab.h	21 Aug 2003 19:55:32 -0000	1.79
+++ symtab.h	15 Oct 2003 19:40:14 -0000
@@ -1168,7 +1168,6 @@ extern struct minimal_symbol *lookup_min
 							  struct objfile *);
 
 struct minimal_symbol *lookup_minimal_symbol_solib_trampoline (const char *,
-							       const char *,
 							       struct objfile
 							       *);
 
Index: minsyms.c
===================================================================
RCS file: /cvs/uberbaum/gdb/minsyms.c,v
retrieving revision 1.34
diff -u -p -r1.34 minsyms.c
--- minsyms.c	16 Sep 2003 18:56:35 -0000	1.34
+++ minsyms.c	15 Oct 2003 19:40:33 -0000
@@ -346,7 +346,6 @@ lookup_minimal_symbol_text (const char *
 
 struct minimal_symbol *
 lookup_minimal_symbol_solib_trampoline (const char *name,
-					const char *sfile,
 					struct objfile *objf)
 {
   struct objfile *objfile;
@@ -354,15 +353,6 @@ lookup_minimal_symbol_solib_trampoline (
   struct minimal_symbol *found_symbol = NULL;
 
   unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
-
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
-  if (sfile != NULL)
-    {
-      char *p = strrchr (sfile, '/');
-      if (p != NULL)
-	sfile = p + 1;
-    }
-#endif
 
   for (objfile = object_files;
        objfile != NULL && found_symbol == NULL;

Index: somsolib.c
===================================================================
RCS file: /cvs/uberbaum/gdb/somsolib.c,v
retrieving revision 1.26
diff -u -p -r1.26 somsolib.c
--- somsolib.c	1 Sep 2003 02:11:07 -0000	1.26
+++ somsolib.c	15 Oct 2003 19:40:54 -0000
@@ -937,7 +937,7 @@ som_solib_create_inferior_hook (void)
 
     /* What a crock.  */
     msymbol2 = lookup_minimal_symbol_solib_trampoline (DEPRECATED_SYMBOL_NAME (msymbol),
-						       NULL, objfile);
+						       objfile);
     /* Found a symbol with the right name.  */
     if (msymbol2)
       {
@@ -1225,7 +1225,6 @@ som_solib_desire_dynamic_linker_symbols 
       }
 
     dld_msymbol = lookup_minimal_symbol_solib_trampoline ("shl_load",
-							  NULL,
 							  objfile);
     if (dld_msymbol != NULL)
       {
@@ -1265,7 +1264,6 @@ som_solib_desire_dynamic_linker_symbols 
       }
 
     dld_msymbol = lookup_minimal_symbol_solib_trampoline ("shl_unload",
-							  NULL,
 							  objfile);
     if (dld_msymbol != NULL)
       {
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/uberbaum/gdb/hppa-tdep.c,v
retrieving revision 1.104
diff -u -p -r1.104 hppa-tdep.c
--- hppa-tdep.c	11 Oct 2003 12:40:38 -0000	1.104
+++ hppa-tdep.c	15 Oct 2003 19:46:10 -0000
@@ -2376,7 +2376,7 @@ hppa_fix_call_dummy (char *dummy, CORE_A
 	  {
 	    stub_symbol
 	      = lookup_minimal_symbol_solib_trampoline
-	      (DEPRECATED_SYMBOL_NAME (funsymbol), NULL, objfile);
+	      (DEPRECATED_SYMBOL_NAME (funsymbol), objfile);
 
 	    if (!stub_symbol)
 	      stub_symbol = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (funsymbol),



More information about the Gdb-patches mailing list