This is the mail archive of the gdb-patches@sourceware.org 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]

Re: [patch] Fix gdb.cp/gdb2495.exp regression with gcc-4.7


On 01/02/2012 02:19 PM, Jan Kratochvil wrote:
On Mon, 02 Jan 2012 15:09:42 +0100, Pedro Alves wrote:
I'm confused.  Shouldn't this instead be handled in the unwind
machinery?  Is this subtraction you refer to the
get_frame_address_in_block one?  That already has special
handling for something like this.  Why doesn't it work?

This `- 1' is in inferior's:


gcc/libgcc/unwind-dw2.c:
uw_frame_state_for:
   fde = _Unwind_Find_FDE (context->ra + _Unwind_IsSignalFrame (context) - 1,
                           &context->bases);

GDB can only change the address put on inferior stack and later picked up by
the inferior's exceptions unwinder.

I see. That '_Unwind_IsSignalFrame(context)' is there to cancel out the '- 1' for signal frames. Ideally, the same treatment would be
applied for gdb's dummy frame, perhaps by having gdb itself change `context->flags' making libunwind treat it as a signal frame. I have no idea whether that's feasible. Oh well.


--
Pedro Alves


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