From 9c8e3411a92ca8790f6e3803c054f8541cf28350 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 4 Aug 2004 21:07:42 +0000 Subject: [PATCH] * i386obsd-tdep.c (i386obsd_sigtramp_p): Adjust for changed signal trampoline in OpenBSD 3.5-current. --- gdb/ChangeLog | 3 +++ gdb/i386obsd-tdep.c | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d1e53c873ae..922ca9e638f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2004-08-04 Mark Kettenis + * i386obsd-tdep.c (i386obsd_sigtramp_p): Adjust for changed signal + trampoline in OpenBSD 3.5-current. + * i387-tdep.c (i387_supply_fsave): Provide summy values for the SSE registers. diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c index 6f1ae5b8c6e..b2c803fe56b 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; } -- 2.30.2