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: [RFC 1/4] - Only longjmp if going outer.


On Wed, Apr 09, 2008 at 03:55:04PM +0100, Pedro Alves wrote:
> Here's the patch that implements the decision to follow the longjmp, or if
> the current step-resume breakpoint is to be kept.
> 
> This adds a new parameter to the gdbarch_get_longjmp_target to also
> extract the SP out of it.  Then, whenever we're setting a step-resume
> breakpoint, we store the current SP in it.  If a longjmp is hit, we
> extract the PC and SP out of the jmp_buf, and compare the SP with
> what was stored in the step-resume breakpoint.  If the longjmp would
> take us outer frame we follow it, otherwise, we just keep going as
> if we didn't see the longjmp.
> 
> Updating all targets will be done in patch 3.

I don't think this will suffice for IA-64.  These jmp_buf changes are
more and more like unwinding... and I think that's the right model;
can we have it behave like an unwinder by producing a frame ID?
Then we'll have somewhere to stash the regstack pointer, and
we can use frame_id_inner to compare.

-- 
Daniel Jacobowitz
CodeSourcery


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