This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] testsuite tweak for gdb.arch/i386-signal.c

Tweak this test so that the new i386 epilogue unwinder won't be
tripped up by a function consisting of the single instruction 'ret'.

2009-07-13  Michael Snyder  <>

	* 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.  */
     "    .align 8\n"
     "    .globl setup\n"
@@ -49,5 +53,6 @@ asm(".text\n"
     "    nop\n"
     "    .globl sigframe\n"
+    "    nop\n"
     "    ret\n"
     "    .cfi_endproc");

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]