aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-10-27 11:18:45 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-10-27 11:18:45 +0000
commit5d0d156482debbd88be7fac6494dc05e7f3d04dc (patch)
tree4b3a23d80a8f27ba5e5d904c6d346b0bb704cca0 /gcc
parent200290f23991f50e04f2ac5c4341f055db72bea5 (diff)
downloadgcc-5d0d156482debbd88be7fac6494dc05e7f3d04dc.zip
gcc-5d0d156482debbd88be7fac6494dc05e7f3d04dc.tar.gz
gcc-5d0d156482debbd88be7fac6494dc05e7f3d04dc.tar.bz2
w32-unwind.h (i386_w32_fallback_frame_state): Fix regnum of EBP.
* config/i386/w32-unwind.h (i386_w32_fallback_frame_state): Fix regnum of EBP. Do not restore reg #9. Remove +1 adjustment to EIP and set fs->signal_frame instead. Co-Authored-By: Olivier Hainque <hainque@adacore.com> From-SVN: r165998
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/w32-unwind.h28
2 files changed, 17 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 460cef3..3702140 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-27 Eric Botcazou <ebotcazou@adacore.com>
+ Olivier Hainque <hainque@adacore.com>
+
+ * config/i386/w32-unwind.h (i386_w32_fallback_frame_state): Fix regnum
+ of EBP. Do not restore reg #9. Remove +1 adjustment to EIP and set
+ fs->signal_frame instead.
+
2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_at_property_declaration): Recognize
diff --git a/gcc/config/i386/w32-unwind.h b/gcc/config/i386/w32-unwind.h
index ce8be23..449e9a9 100644
--- a/gcc/config/i386/w32-unwind.h
+++ b/gcc/config/i386/w32-unwind.h
@@ -1,5 +1,5 @@
-/* Definitions for Dwarf2 EH unwind support for Windows32 targets
- Copyright (C) 2007, 2009
+/* Definitions for Dwarf2 EH unwind support for Windows32 targets
+ Copyright (C) 2007, 2009, 2010
Free Software Foundation, Inc.
Contributed by Pascal Obry <obry@adacore.com>
@@ -129,7 +129,6 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context,
/* In the test below we look for two specific patterns found
experimentally to be in the Windows signal handler. */
-
if (SIG_PAT1 || SIG_PAT2 || SIG_SEH1 || SIG_SEH2)
{
PEXCEPTION_POINTERS weinfo_;
@@ -147,14 +146,12 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context,
}
/* The new context frame address is the stack pointer. */
-
new_cfa_ = proc_ctx_->Esp;
fs->regs.cfa_how = CFA_REG_OFFSET;
fs->regs.cfa_reg = __builtin_dwarf_sp_column();
fs->regs.cfa_offset = new_cfa_ - (long) ctx_cfa_;
- /* Save some registers. */
-
+ /* Restore registers. */
fs->regs.reg[0].how = REG_SAVED_OFFSET;
fs->regs.reg[0].loc.offset = (long)&proc_ctx_->Eax - new_cfa_;
fs->regs.reg[3].how = REG_SAVED_OFFSET;
@@ -167,18 +164,13 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context,
fs->regs.reg[6].loc.offset = (long)&proc_ctx_->Esi - new_cfa_;
fs->regs.reg[7].how = REG_SAVED_OFFSET;
fs->regs.reg[7].loc.offset = (long)&proc_ctx_->Edi - new_cfa_;
- fs->regs.reg[9].how = REG_SAVED_OFFSET;
- fs->regs.reg[9].loc.offset = (long)&proc_ctx_->Eip - new_cfa_;
- fs->regs.reg[4].how = REG_SAVED_OFFSET;
- fs->regs.reg[4].loc.offset = (long)&proc_ctx_->Ebp - new_cfa_;
-
- /* Set the return address to Eip + 1. As we can be called multiple
- times we use another register for this. */
-
- proc_ctx_->Dr0 = proc_ctx_->Eip + 1;
+ fs->regs.reg[5].how = REG_SAVED_OFFSET;
+ fs->regs.reg[5].loc.offset = (long)&proc_ctx_->Ebp - new_cfa_;
fs->regs.reg[8].how = REG_SAVED_OFFSET;
- fs->regs.reg[8].loc.offset = (long)&proc_ctx_->Dr0 - new_cfa_;
+ fs->regs.reg[8].loc.offset = (long)&proc_ctx_->Eip - new_cfa_;
fs->retaddr_column = 8;
+ fs->signal_frame = 1;
+
return _URC_NO_REASON;
}
@@ -186,7 +178,6 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context,
one of it's probes prior to the real SP adjustment. The only
operations of interest performed is "pushl %ecx", followed by
ecx clobbering. */
-
else if (SIG_ALLOCA)
{
/* Only one push between entry in _alloca and the probe trap. */
@@ -204,7 +195,8 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context,
fs->retaddr_column = 8;
fs->regs.reg[8].how = REG_SAVED_OFFSET;
fs->regs.reg[8].loc.offset = 0;
-
+ fs->signal_frame = 1;
+
return _URC_NO_REASON;
}
else