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: [RFA] Fix frame-issue with watchpoints...


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


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