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: [RFA/gdbserver/LynxOS]: Incomplete thread list after --attach


On 10/01/2013 10:50 AM, Joel Brobecker wrote:
> Hello,
> 
> The current implementation is forgetting to populate the thread list
> when attaching to the process. This results in an incomplete list of
> threads when debugging a threaded program.
> 
> Unfortunately, as the added comments hints, there appears to be
> no way of getting the list of threads via ptrace, other than by
> spawning the "ps" command, and parsing its output. Not great,
> but it appears to be the best we can do.  This method was actually
> inspired by looking at old code which did exactly that.

Huh.  I didn't really look at the patch yet, but, then, how
does "ps" manage to work?  If you strace "ps", what system calls
is it using?  I'd imagine if not ptrace, then it would be reading
/proc or some such?

-- 
Pedro Alves


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