This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix frame-issue with watchpoints...
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 5 Oct 2006 21:20:18 -0400
- Subject: Re: [RFA] Fix frame-issue with watchpoints...
- References: <20061006005009.GA986@adacore.com>
On Thu, Oct 05, 2006 at 05:50:09PM -0700, Joel Brobecker wrote:
> The issue in our case is that "current_frame" is NULL too, probably
> because we never needed it before in our case (just finished off
> single-stepping out of the breakpoint and immediately getting ready
> to resume) and therefore never set it to a proper value.
This is 100% bogus. If we leave this code at all, we should absolutely
do this:
> One way to bandaid this, probably along the lines that Andrew was
> trying to do (try to recover from a situation that should not happen),
> is to replace "current_frame" by get_current_frame().
Or just kill it. As far as I can see though, this:
> However, I'm thinking that the real culprit is block_innermost_frame
> which called this function with a NULL frame, which it's not supposed
> to do. So I rewrote the loop to start from the outermost frame instead
> of a NULL frame, and then work its way up the frame stack...
is also right. Except that you really scared me here: you are actually
starting from the _innermost_ frame, not the _outermost_.
> 2006-10-05 Joel Brobecker <brobecker@adacore.com>
>
> * blockframe.c (block_innermost_frame): Rewrite frame search logic.
>
> Tested on x86-linux, no regression. A new testcase to be submitted soon.
> OK to apply?
OK.
--
Daniel Jacobowitz
CodeSourcery