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


On Tue, 15 Feb 2011 23:01:53 +0100, Roland McGrath wrote:
> (that probably being asynchronous detach, not requiring stopped tracees, and
> not supporting any parting-signal feature).

That may be too asynchronous.  After GDB/gcore/etc. finishes new PTRACE_ATTACH
must complete successfully.  I never know if it is already guaranteed or not
but in practice it works now.

If there is no PTRACE_DETACH_ALL_TIDS(pid) and PTRACE_O_THREAD_INHERIT is in
use GDB probably has to repeatedly iterate /proc/PID/task/*/status till all
have TracerPid == 0.


> the attach-group implementation will be sufficiently hairy that the kernel
> community would demand that we do some simpler incremental changes first
> before attempting it (such as what I proposed for ATTACH_NOSTOP, which
> eliminates the SIGSTOP and rolls in atomic option-setting).

thread_db_find_new_threads_2 already does an ugly loop of repeated threads
finding.  There are also some failures that can be probably fixed by changing
td_ta_thr_iter to readdir(/proc/PID/task) (RH#677654).  There are some pending
bugs in GDB about it.


Thanks,
Jan


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