This is the mail archive of the gdb-patches@sources.redhat.com 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]

[obish] IN_SOLIB_RETURN_TRAMPOLINE cleanups


FYI,

Several redundant #undef (tm-mips.h doesn't define this), #defines (already returns zero), prints, and poor function name choices.

committed,
Andrew
2004-10-26  Andrew Cagney  <cagney@gnu.org>

	* config/arm/tm-linux.h (IN_SOLIB_RETURN_TRAMPOLINE): Delete.
	* config/mips/tm-nbsd.h, config/mips/tm-linux.h: Delete #undef
	IN_SOLIB_RETURN_TRAMPOLINE.
	* mips-tdep.c (mips_dump_tdep): Do not print
	IN_SOLIB_RETURN_TRAMPOLINE.
	(mips_in_solib_return_trampoline): Rename mips_in_return_stub.
	(mips_gdbarch_init): Update.

Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.335
diff -p -u -r1.335 mips-tdep.c
--- mips-tdep.c	15 Oct 2004 07:25:03 -0000	1.335
+++ mips-tdep.c	26 Oct 2004 14:23:17 -0000
@@ -5404,11 +5404,11 @@ mips_in_call_stub (CORE_ADDR pc, char *n
 }
 
 
-/* Return non-zero if the PC is inside a return thunk (aka stub or trampoline).
-   This implements the IN_SOLIB_RETURN_TRAMPOLINE macro.  */
+/* Return non-zero if the PC is inside a return thunk (aka stub or
+   trampoline).  */
 
 static int
-mips_in_return_stub (CORE_ADDR pc, char *name)
+mips_in_solib_return_trampoline (CORE_ADDR pc, char *name)
 {
   CORE_ADDR start_addr;
 
@@ -5971,7 +5971,7 @@ mips_gdbarch_init (struct gdbarch_info i
   if (info.osabi == GDB_OSABI_UNKNOWN)
     {
       set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
-      set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_return_stub);
+      set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_solib_return_trampoline);
     }
 
   /* Hook in OS ABI-specific overrides, if they have been registered.  */
@@ -6120,9 +6120,6 @@ mips_dump_tdep (struct gdbarch *current_
 		      "mips_dump_tdep: IN_SOLIB_CALL_TRAMPOLINE # %s\n",
 		      XSTRING (IN_SOLIB_CALL_TRAMPOLINE (PC, NAME)));
   fprintf_unfiltered (file,
-		      "mips_dump_tdep: IN_SOLIB_RETURN_TRAMPOLINE # %s\n",
-		      XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (PC, NAME)));
-  fprintf_unfiltered (file,
 		      "mips_dump_tdep: LAST_EMBED_REGNUM = %d\n",
 		      LAST_EMBED_REGNUM);
 #ifdef MACHINE_CPROC_FP_OFFSET
Index: config/arm/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/arm/tm-linux.h,v
retrieving revision 1.22
diff -p -u -r1.22 tm-linux.h
--- config/arm/tm-linux.h	18 Mar 2004 19:59:06 -0000	1.22
+++ config/arm/tm-linux.h	26 Oct 2004 14:23:17 -0000
@@ -29,10 +29,6 @@
 /* We've multi-arched this.  */
 #undef IN_SOLIB_CALL_TRAMPOLINE
 
-/* On ARM GNU/Linux, a call to a library routine does not have to go
-   through any trampoline code.  */
-#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name)	0
-
 /* We've multi-arched this.  */
 #undef SKIP_TRAMPOLINE_CODE
 
Index: config/mips/tm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-linux.h,v
retrieving revision 1.11
diff -p -u -r1.11 tm-linux.h
--- config/mips/tm-linux.h	26 Oct 2004 14:13:24 -0000	1.11
+++ config/mips/tm-linux.h	26 Oct 2004 14:23:17 -0000
@@ -26,7 +26,6 @@
 
 /* We don't want to inherit tm-mips.h's shared library trampoline code.  */
 
-#undef IN_SOLIB_RETURN_TRAMPOLINE
 #undef SKIP_TRAMPOLINE_CODE
 #undef IGNORE_HELPER_CALL
 
Index: config/mips/tm-nbsd.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-nbsd.h,v
retrieving revision 1.6
diff -p -u -r1.6 tm-nbsd.h
--- config/mips/tm-nbsd.h	21 Jul 2004 14:23:37 -0000	1.6
+++ config/mips/tm-nbsd.h	26 Oct 2004 14:23:17 -0000
@@ -27,7 +27,6 @@
 
 /* We don't want to inherit tm-mips.h's shared library trampoline code.  */
 #undef IN_SOLIB_CALL_TRAMPOLINE
-#undef IN_SOLIB_RETURN_TRAMPOLINE
 #undef SKIP_TRAMPOLINE_CODE
 #undef DEPRECATED_IGNORE_HELPER_CALL
 

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