This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/gdbserver/LynxOS]: Incomplete thread list after --attach
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 1 Oct 2013 12:52:35 +0200
- Subject: Re: [RFA/gdbserver/LynxOS]: Incomplete thread list after --attach
- Authentication-results: sourceware.org; auth=none
- References: <1380621039-25204-1-git-send-email-brobecker at adacore dot com> <524A9C9E dot 2040407 at redhat dot com> <20131001100200 dot GA2840 at adacore dot com> <524AA113 dot 5070008 at redhat dot com>
> Well, how are you sure they're unpublished, if you don't know
> at least approximately which interfaces it's using? (reading /proc,
> using ptrace+peeking at program memory, etc.) ;-) I've really no
> clue on the ABI garantees copying newer/older "ps" to an older/newer
> system would have, but I'd expect it to have some.
That's true. In the end, I wasn't able to get that piece of information,
as I could not find a tool on LynxOS that can trace system calls.
There is no /proc, and I couldn't find anything in /dev that seems
related to that sort of thing.
> BTW, was that "old code" the old native gdb port?
I must have been confused somewhere. It was for sure a gdbserver port,
which I thought I had completely removed in order to make room for
an implementation-from-scratch. I haven't looked at the sources in
a long time, and the only reason I mention them is because I saw that
hack when I first worked on the LynxOS gdbserver, and the first thing
I did was get rid of it, to see if it was useful in any way.
> It's hard to believe such a basic feature would go missing from
> a public debug API :-(, but I can't say I really object to the patch.
> If it works for you...
I was convinced too. But I've read many times the man page, and looked
at ptrace.h for the beginning of a way that might work, and couldn't
find anything.
> > +/* Assuming we've just attached to a running inferior whose pid is PID,
> > + add all threads runnnig in that process. */
>
> "running".
Thanks. I will fix that before checking in.
--
Joel