[RFC] 10/10 non-stop for linux native

Eli Zaretskii eliz@gnu.org
Thu May 8 18:30:00 GMT 2008


> From: Pedro Alves <pedro@codesourcery.com>
> Date: Tue, 6 May 2008 16:50:10 +0100
> 
> This adds non-stop support for linux native.
> 
> The changes are:
> 
> - ptracing a running thread doesn't work.
> 
>  This implies that, we must ensure that the proc_services
>  usage in linux-thread-db.c talks to a pid of a stopped lwp.
> 
>  Checking if a thread is alive with ptrace doesn't work
>  for running threads.  Worse, ptrace errors out claiming
>  the thread doesn't exits.
> 
> - We must not stop all threads, obviously.
> 
> - We must mark threads as running if we're resuming
>  them behind the core's back.
> 
> - Implement target_stop_ptid to interrupt only one thread

I know nothing about the Linux kernel or ptrace implementation, but
the above description sounds as if we are coding around ptrace/kernel
bugs.  Are we?  If we are, isn't it better to solve these bugs in
ptrace first?  And if we do work around these bugs as suggested in
this patch, won't that be a maintenance burden once the kernel people
start fixing it in some future Linux version?

Sorry if these are silly questions out of ignorance.



More information about the Gdb-patches mailing list