This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: ptrace improvement: PTRACE_O_INHERIT


> > unless it uses multiple threads where one thread calls wait*
> > while another thread calls ptrace.  In that case, the debugger's wait*
> > thread could see a stop result that appears to be after its other thread
> > detached the same tracee.  (That is already true now with PTRACE_DETACH.)
> > If the debugger's own wait* call is strictly ordered after its detaching
> > ptrace call, there can be no such confusion.
> 
> Could you spell please?

Say a debugger has two threads.

Thread A calls wait*.
Thread B calls PTRACE_DETACH.

Thread A can perceive a wait result from tracee T to be simultaneous with,
or after, thread B has detached from T.

The debugger has to do some work to be sure it doesn't get confused in its
own bookkeeping of what tracees it thinks are attached.

That's all.


Thanks,
Roland


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