aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386obsd-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-08-04 21:07:42 +0000
committerMark Kettenis <kettenis@gnu.org>2004-08-04 21:07:42 +0000
commit9c8e3411a92ca8790f6e3803c054f8541cf28350 (patch)
tree5a86643e2207d469008f9f524309ade3701b9e37 /gdb/i386obsd-tdep.c
parentb87bc0d80e4efe7283f46cc194b1b6ed7548ceec (diff)
downloadgdb-9c8e3411a92ca8790f6e3803c054f8541cf28350.zip
gdb-9c8e3411a92ca8790f6e3803c054f8541cf28350.tar.gz
gdb-9c8e3411a92ca8790f6e3803c054f8541cf28350.tar.bz2
* i386obsd-tdep.c (i386obsd_sigtramp_p): Adjust for changed signal
trampoline in OpenBSD 3.5-current.
Diffstat (limited to 'gdb/i386obsd-tdep.c')
-rw-r--r--gdb/i386obsd-tdep.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index 6f1ae5b..b2c803f 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -78,15 +78,25 @@ i386obsd_sigtramp_p (struct frame_info *next_frame)
if (find_pc_section (pc) != NULL)
return 0;
- /* If we can't read the instructions at START_PC, return zero. */
+ /* Allocate buffer. */
buf = alloca (sizeof sigreturn);
- if (target_read_memory (start_pc + 0x14, buf, sizeof sigreturn))
+
+ /* If we can't read the instructions at START_PC, return zero. */
+ if (target_read_memory (start_pc + 0x0a, buf, sizeof sigreturn))
return 0;
/* Check for sigreturn(2). */
if (memcmp (buf, sigreturn, sizeof sigreturn) == 0)
return 1;
+ /* If we can't read the instructions at START_PC, return zero. */
+ if (target_read_memory (start_pc + 0x14, buf, sizeof sigreturn))
+ return 0;
+
+ /* Check for sigreturn(2) (again). */
+ if (memcmp (buf, sigreturn, sizeof sigreturn) == 0)
+ return 1;
+
return 0;
}