aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-10-31 20:51:15 +0000
committerDaniel Jacobowitz <drow@false.org>2002-10-31 20:51:15 +0000
commitef17e74bbb466e082c83057cf51ed068cb292339 (patch)
tree2f67c5b65df21eb43574b12a4323f20e1a9e4ec3 /gdb
parent4904ba5b9a505c771b85a1f66f30d8b693a9014b (diff)
downloadgdb-ef17e74bbb466e082c83057cf51ed068cb292339.zip
gdb-ef17e74bbb466e082c83057cf51ed068cb292339.tar.gz
gdb-ef17e74bbb466e082c83057cf51ed068cb292339.tar.bz2
* i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Check for
trampolines in sigaction.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/i386-linux-tdep.c16
2 files changed, 16 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f6549b1..b2c750b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-31 Daniel Jacobowitz <drow@mvista.com>
+
+ * i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Check for
+ trampolines in sigaction.
+
2002-10-31 Andrew Cagney <cagney@redhat.com>
* h8300-tdep.c: Include "gdb_assert.h".
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index a833fb5..0d6ab40 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