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


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.

Michael

> >
> > > 2002-12-20  Elena Zannoni  <ezannoni@redhat.com>
> > >
> > >         Fix PR breakpoints/898.
> > >         * breakpoint.c (until_break_command): Don't use selected_frame,
> > >         but the null frame.
> > >
> > > Index: breakpoint.c
> > > ===================================================================
> > > RCS file: /cvs/uberbaum/gdb/breakpoint.c,v
> > > retrieving revision 1.104
> > > diff -u -p -r1.104 breakpoint.c
> > > --- breakpoint.c        17 Dec 2002 17:27:44 -0000      1.104
> > > +++ breakpoint.c        20 Dec 2002 18:06:27 -0000
> > > @@ -5615,9 +5615,7 @@ until_break_command (char *arg, int from
> > >
> > >    resolve_sal_pc (&sal);
> > >
> > > -  breakpoint =
> > > -    set_momentary_breakpoint (sal,get_frame_id (deprecated_selected_frame),
> > > -                             bp_until);
> > > +  breakpoint = set_momentary_breakpoint (sal, null_frame_id, bp_until);
> > >
> > >    if (!event_loop_p || !target_can_async_p ())
> > >      old_chain = make_cleanup_delete_breakpoint (breakpoint);
> >
> 
> --
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer


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