This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Add fallback for secure-plt stubs in ppc_linux_skip_trampoline_code
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 1 Nov 2007 00:46:50 +0100 (CET)
- Subject: [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