This is the mail archive of the gdb-patches@sources.redhat.com 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/PATCH] breakpoint.c: fix until command


Michael Snyder writes:
 > Daniel Jacobowitz wrote:
 > > 
 > > On Mon, Dec 23, 2002 at 04:57:00PM -0800, Michael Snyder wrote:
 > > > Daniel Jacobowitz wrote:
 > > > >
 > > > > On Mon, Dec 23, 2002 at 03:53:22PM -0800, Michael Snyder wrote:
 > > > > > Elena Zannoni wrote:
 > > > > > >
 > > > > > > This fixes the problem reported in:
 > > > > > > http://sources.redhat.com/ml/gdb/2002-11/msg00144.html
 > > > > > >
 > > > > > > testsuite patch coming
 > > > > >
 > > > > > Elena, can you sum up in a sentence or two, what this change
 > > > > > is intended to do?
 > > > >
 > > > > [Since I happen to be reading email right now, I'll do a sketchy
 > > > > imitation.]
 > > > >
 > > > > The problem is that we were marking the breakpoint on the
 > > > > user-specified line with the current frame.  But when we hit that
 > > > > breakpoint, if it's in a different function, it will have a different
 > > > > frame.  Right now we see that the frames don't match and resume
 > > > > executing.
 > > > >
 > > > > Oops.
 > > >
 > > > OK, thanks.  But we _need_ to mark the breakpoint with the current
 > > > frame, because if the breakpoint is in the current frame, we don't
 > > > want to stop in an inner recursive call, ie. not until the current
 > > > frame hits the breakpoint.
 > > >
 > > > So this needs further consideration, and I don't think it can
 > > > be approved as is.
 > > 
 > > OK.  Is that really what you expect "until" to do, though?  I'd be
 > > pretty surprised if an inner function call executed that line without
 > > stopping.
 > 
 > Nevertheless, that is and has always been the intent.
 > If you're in factorial(5), and you say "until 100", 
 > you don't stop until line 100 is hit by factorial(5).


I am tracking down this to something that changed between (ahem...)
4.18 and 5.0. The code in breakpoint.c didn't change. Right now,
stepping the two gdb's side to side, I can see a difference in
get_prev_frame, because of a different value returned by
FRAME_CHAIN_VALID. :-( (i have not still stepped past that to see how
that could influence the until foo behavior, maybe it doesn't).

The behavior you specify above is in 5.0 and not in 4.18, while the
'until foo' works in 4.18 and is broken in 5.0.

More digging.

Elena


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