This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ARM problems with the exception unwinder
- To: rearnsha at arm dot com
- Subject: Re: ARM problems with the exception unwinder
- From: Jason Merrill <jason at redhat dot com>
- Date: 24 Jan 2001 09:36:47 +0000
- Cc: Andrew Haley <aph at redhat dot com>, gcc-bugs at gcc dot gnu dot org
- References: <200101231715.RAA13656@cam-mail2.cambridge.arm.com>
>>>>> "Richard" == Richard Earnshaw <rearnsha@arm.com> writes:
>> > The problem is that when cfa_reg is set to the frame pointer, the stack
>> > pointer value pushed on the stack is updated,
>>
>> I think that's the bug. How can that be right? Surely the value pushed on
>> the stack in the prologue shouldn't need adjustment?
>>
>> When unwinding, we should always restore SP using the offset, never using
>> the value saved in the stack.
> Are you suggesting I need to create special stack frame when compiling
> __[re]throw that doesn't save the stack pointer?
No, just that we should avoid copying the saved values from other frames
into the __throw frame. Thus the code to ignore that particular store.
>> No. Usually a save slot for ustate.cfa_reg just means that the frame
>> pointer was saved at the beginning of the prologue. The code you reference
>> in frame_dwarf2 refers to "saving" the CFA register after its value from
>> the caller has already been clobbered with some value derived from SP.
> So do we correctly restore the frame pointer when we have fp as the
> cfa_reg and we have an instruction of the form
> stmfd sp!, {...., fp, ...}
I don't see why not.
Jason