Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] testsuite tweak for gdb.arch/i386-signal.c
@ 2009-07-13 22:14 Michael Snyder
  2009-07-14 14:34 ` Mark Kettenis
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2009-07-13 22:14 UTC (permalink / raw)
  To: gdb-patches, drow, mark.kettenis

[-- 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");

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-15  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-13 22:14 [RFA] testsuite tweak for gdb.arch/i386-signal.c Michael Snyder
2009-07-14 14:34 ` Mark Kettenis
2009-07-14 14:57   ` Michael Snyder
2009-07-15  1:21   ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox