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] Stop infrun from tracking breakpoint insertion status.


On Thursday 29 November 2007 01:24:37 Ulrich Weigand wrote:
> Vladimir Prus wrote:
> 
> > The second problem was that breakpoint_inserted_here_p checks for
> > both ordinary breakpoints and single step breakpoints (which don't
> > go on bp_location_chain). In most cases, it does not matter, but
> > in one place the code tries to figure if we're stopped on a single
> > step breakpoint or an ordinary one, and surely, breakpoint_inserted_here_p
> > returning 1 for both cases was not good.
> > 
> > The attached revision of the patch introduces a separate
> > regular_breakpoint_inserted_here_p function. No regressions on
> > either x86 or arm-linux. OK?
> 
> I've tested this on powerpc-ibm-aix5.3.0.0 as well, no regressions.
> 
> >         * breakpoint.h (regular_breakpoint_inserted_here_p): New
> >         declaration.
> >         * breakpoint.c (regular_breakpoint_inserted_here_p): New.
> >         (breakpoint_inserted_here_p): Use
> >         regular_breakpoint_inserted_here_p.
> >         * infrun.c (breakpoints_inserted): Remove.
> >         (resume): Don't check for breakpoints_inserted before
> >         remove_hw_watchpoints. Use breakpoint_inserted_here_p.
> >         (proceed, init_wait_for_inferior): Don't set breakpoints_inserted.
> >         (handle_inferior_event): Don't use breakpoints_inserted.
> >         Use breakpoints_meant_to_be_inserted and
> >         breakpoints_inserted_here_p.
> >         (insert_step_resume_breakpoint_at_sal, keep_going): Use
> >         breakpoints_meant_to_be_inserted. Don't set breakpoints_inserted.
> >         (normal_stop): Don't check for breakpoints_inserted.  Don't
> >         set breakpoints_inserted.
> >         (keep_going): Don't check for breakpoints_inserted.
> >         (insert_step_resume_breakpoint_at_sal): Don't insert
> >         breakpoints
> 
> This is OK.
> 
> >           /* Remove breakpoints, SOLIB_ADD might adjust
> >              breakpoint addresses via breakpoint_re_set.  */
> > -         breakpoints_were_inserted = breakpoints_inserted;
> 
> "breakpoints_were_inserted" is now unused, could you please remove
> the variable definition as well?

I've made this adjustment and checked in. Thanks a lot for review, testing,
and the suggested improvements!

- Volodya


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