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: [rfc] Preferred thread event reporting: Linux native target


Pedro Alves wrote:

> > -- this is actually simply the currently selected thread 
> > (i.e. the current value of inferior_ptid).
> 
> Disagreed.  inferior_ptid will change if an event happens in
> another thread while you're stepping, but the core decides the event
> was not a good reason to stop.  E.g., thread hopping.

Hmm, but if we "thread hop" inferior_ptid should be prefered
anyway (to get the internal "thread hop" action over with as
quickly as possible), and afterwards we're back to the thread
the user is looking at, right?

> > The patch below implements this by adding a new member "preferred" to
> > "struct lwp_info", setting it according to the value of inferior_ptid
> > in linux_nat_resume, and using it (instead of the single-step flag) to
> > decide whether to prefer reporting events in this thread.
> 
> I'd prefer to check if an lwp is stepping due to user request, by
> checking struct thread_info's data directly, intead of your
> "prefered" flag.

On the other hand, if the information we need is visible without
relying on inferior_ptid, that would be even nicer.

> Unfortunatelly, currently, GDB doesn't always correctly clear the
> stepping state of all threads when proceeding (clear_proceed_status
> only clears the current thread), but I'm addressing that too in the
> series, see attached.

Great!  This is one more thing I wanted to address; thanks for taking
care of it ...

> For my series to go in, every target much register at least the main
> thread in GDB's thread tables, and as it happens, I think AIX
> is the only target I don't have covered, or that I know of
> no one covering.

I can test AIX if necessary.  Do you have a patch?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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