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]

[commit] Add fallback for secure-plt stubs in ppc_linux_skip_trampoline_code


Hello,

ppc-linux-tdep.c installs a special skip_trampoline_code routine to
handle old-style ppc32 plt stubs.  Unfortunately, this does not support
new-style secure-plt stubs.  Even worse, when the routine fails, it 
does not even fall back to the default find_solib_trampoline_target
implementation, which would actually handle some cases just fine
(where we have a mst_solib_trampoline minimal symbol).

This patch adds that fallback call, fixing 5 FAILs on powerpc-linux.
Committed to mainline.

Bye,
Ulrich

ChangeLog:

	* ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Fall back to
	find_solib_trampoline_target if PC is not in .plt section.

diff -urNp gdb-orig/gdb/ppc-linux-tdep.c gdb-head/gdb/ppc-linux-tdep.c
--- gdb-orig/gdb/ppc-linux-tdep.c	2007-10-18 23:18:47.000000000 +0200
+++ gdb-head/gdb/ppc-linux-tdep.c	2007-10-21 16:52:55.709474162 +0200
@@ -57,10 +57,10 @@ ppc_linux_skip_trampoline_code (struct f
   char symname[1024];
   struct minimal_symbol *msymbol;
 
-  /* Find the section pc is in; return if not in .plt */
+  /* Find the section pc is in; if not in .plt, try the default method.  */
   sect = find_pc_section (pc);
   if (!sect || strcmp (sect->the_bfd_section->name, ".plt") != 0)
-    return 0;
+    return find_solib_trampoline_target (frame, pc);
 
   objfile = sect->objfile;
 
-- 
  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]