summaryrefslogtreecommitdiff
path: root/gdb/i386-linux-tdep.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2002-10-31 20:51:15 +0000
committerDaniel Jacobowitz <dan@debian.org>2002-10-31 20:51:15 +0000
commita1d2c663afd019207fc3344c8ef94ca3ac79f42f (patch)
treeffdb8290f5e8cae5f582d4658b827e1ba3c6e5da /gdb/i386-linux-tdep.c
parent7c90748694841e0f9b3df2359fb9d4a451609627 (diff)
downloadgdb-a1d2c663afd019207fc3344c8ef94ca3ac79f42f.tar.gz
* i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Check for
trampolines in sigaction.
Diffstat (limited to 'gdb/i386-linux-tdep.c')
-rw-r--r--gdb/i386-linux-tdep.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index a833fb59838..0d6ab40747a 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -209,11 +209,17 @@ i386_linux_rt_sigtramp_start (CORE_ADDR pc)
static int
i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
- if (name)
- return STREQ ("__restore", name) || STREQ ("__restore_rt", name);
-
- return (i386_linux_sigtramp_start (pc) != 0
- || i386_linux_rt_sigtramp_start (pc) != 0);
+ /* If we have NAME, we can optimize the search. The trampolines are
+ named __restore and __restore_rt. However, they aren't dynamically
+ exported from the shared C library, so the trampoline may appear to
+ be part of the preceding function. This should always be sigaction,
+ __sigaction, or __libc_sigaction (all aliases to the same function). */
+ if (name == NULL || strstr (name, "sigaction") != NULL)
+ return (i386_linux_sigtramp_start (pc) != 0
+ || i386_linux_rt_sigtramp_start (pc) != 0);
+
+ return (strcmp ("__restore", name) == 0
+ || strcmp ("__restore_rt", name) == 0);
}
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the