From: Michael Snyder <msnyder@vmware.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
drow@false.org, mark.kettenis@xs4all.nl
Subject: [RFA] testsuite tweak for gdb.arch/i386-signal.c
Date: Mon, 13 Jul 2009 22:14:00 -0000 [thread overview]
Message-ID: <4A5B97CB.2040109@vmware.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 134 bytes --]
Tweak this test so that the new i386 epilogue unwinder won't be
tripped up by a function consisting of the single instruction 'ret'.
[-- Attachment #2: nop.txt --]
[-- Type: text/plain, Size: 1015 bytes --]
2009-07-13 Michael Snyder <msnyder@vmware.com>
* gdb.arch/i386-signal.c (sigframe): Add a nop to avoid
confusing the i386 epilogue unwinder.
Index: gdb.arch/i386-signal.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-signal.c,v
retrieving revision 1.4
diff -u -p -r1.4 i386-signal.c
--- gdb.arch/i386-signal.c 3 Jan 2009 05:58:03 -0000 1.4
+++ gdb.arch/i386-signal.c 13 Jul 2009 20:22:52 -0000
@@ -37,6 +37,10 @@ main (void)
The default CIE created by gas suffices to unwind from an empty
function. */
+/* Note: to make sure that the Dwarf unwinder gets to handle
+ the frame, we add an extra 'nop' after the label. Otherwise,
+ the new epilogue unwinder will see the 'ret' and grab the frame. */
+
asm(".text\n"
" .align 8\n"
" .globl setup\n"
@@ -49,5 +53,6 @@ asm(".text\n"
" nop\n"
" .globl sigframe\n"
"sigframe:\n"
+ " nop\n"
" ret\n"
" .cfi_endproc");
next reply other threads:[~2009-07-13 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 22:14 Michael Snyder [this message]
2009-07-14 14:34 ` Mark Kettenis
2009-07-14 14:57 ` Michael Snyder
2009-07-15 1:21 ` Michael Snyder
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=4A5B97CB.2040109@vmware.com \
--to=msnyder@vmware.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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