This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gccgo] Fix i386 unwinding with split stack
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 13 Jun 2010 23:29:51 -0700
- Subject: [gccgo] Fix i386 unwinding with split stack
This patch fixes i386 stack unwinding when using a split stack.
Committed to gccgo branch.
Ian
Index: libgcc/config/i386/morestack.S
===================================================================
--- libgcc/config/i386/morestack.S (revision 155628)
+++ libgcc/config/i386/morestack.S (working copy)
@@ -114,6 +114,13 @@ __morestack:
movl %esp, %ebp
.cfi_def_cfa_register %ebp
+ # We return below with a ret $8. We will return to a single
+ # return instruction, which will return to the caller of our
+ # caller. We let the unwinder skip that single return
+ # instruction, and just return to the real caller.
+ .cfi_offset 8, 8
+ .cfi_escape 0x15, 4, 0x7d # DW_CFA_val_offset_sf, %esp, 12/-4
+
# In 32-bit mode the parameters are pushed on the stack. The
# argument size is pushed then the new stack frame size is
# pushed.