This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 1/4] - Only longjmp if going outer.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 14 Apr 2008 15:13:25 -0400
- Subject: Re: [RFC 1/4] - Only longjmp if going outer.
- References: <200804091555.04124.pedro@codesourcery.com>
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