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]

Re: [PATCH/RFC] Improve the "thread_step_needed" logic


Daniel Jacobowitz wrote:
> 
> On Fri, Jun 15, 2001 at 04:35:09PM -0700, Michael Snyder wrote:
> > This is a fairly significant change, that both simplifies and
> > improves the logic for deciding when a single thread should be
> > stepped (to get past a breakpoint), rather than stepping all threads.
> > In a nutshell, this replaces the state variable "thread_step_needed"
> > with the following logic in resume():
> 
> <sigh>
> 
> While you're fixing this, could you please address my issue from last
> week with this code? 

I'm pretty sure I did!

 Checking "step" at this point in resume() is not
> correct, since it will have been cleared if SOFTWARE_SINGLE_STEP_P ().

But I don't just check "step", I check
"(step || singlestep_breakpoints_inserted_p)".

That was specifically to address your issue.
Do you think it fails to do so?

> 
> > --- 879,913 ----
> >     if (should_resume)
> >       {
> >         ptid_t resume_ptid;
> > +
> > +       resume_ptid = RESUME_ALL;             /* Default */
> >
> > !       if ((step || singlestep_breakpoints_inserted_p) &&
> > !       !breakpoints_inserted && breakpoint_here_p (read_pc ()))
> 
> > +
> > + #ifdef CANNOT_STEP_BREAKPOINT
> > +       /* Most targets can step a breakpoint instruction, thus executing it
> > +      normally.  But if this one cannot, just continue and we will hit
> > +      it anyway.  */
> > +       if (step && breakpoints_inserted && breakpoint_here_p (read_pc ()))
> > +     step = 0;
> > + #endif
> 
> Specifically, those bits.
> 
> --
> Daniel Jacobowitz                           Debian GNU/Linux Developer
> Monta Vista Software                              Debian Security Team


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