From: Mark Kettenis <kettenis@chello.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Fix OpenBSD/i386 signal trampoline recognition
Date: Thu, 05 Aug 2004 02:02:00 -0000 [thread overview]
Message-ID: <200408042107.i74L7YNK029004@copland.kettenis.dyndns.org> (raw)
The signal trampoline has changed in OpenBSD 3.5-current.
Committed,
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386obsd-tdep.c (i386obsd_sigtramp_p): Adjust for changed signal
trampoline in OpenBSD 3.5-current.
Index: i386obsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386obsd-tdep.c,v
retrieving revision 1.18
diff -u -p -r1.18 i386obsd-tdep.c
--- i386obsd-tdep.c 22 May 2004 15:16:22 -0000 1.18
+++ i386obsd-tdep.c 4 Aug 2004 21:04:59 -0000
@@ -78,15 +78,25 @@ i386obsd_sigtramp_p (struct frame_info *
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;
}
\f
next reply other threads:[~2004-08-05 2:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-05 2:02 Mark Kettenis [this message]
2004-08-05 14:00 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200408042107.i74L7YNK029004@copland.kettenis.dyndns.org \
--to=kettenis@chello.nl \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox