From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/gdbserver/LynxOS]: Incomplete thread list after --attach
Date: Tue, 01 Oct 2013 10:02:00 -0000 [thread overview]
Message-ID: <20131001100200.GA2840@adacore.com> (raw)
In-Reply-To: <524A9C9E.2040407@redhat.com>
> > 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?
I can look. But what strongly detered me from doing that is the fact
that it'd be starting to use unpublished interfaces. Running "ps"
isn't pretty, but I can hope it'll keep working across versions of
Lynx (we tested against Lynx 178 and 5.x, knowing that this has worked
with 4.x as well).
--
Joel
next prev parent reply other threads:[~2013-10-01 10:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 9:50 Joel Brobecker
2013-10-01 9:57 ` Pedro Alves
2013-10-01 10:02 ` Joel Brobecker [this message]
2013-10-01 10:16 ` Pedro Alves
2013-10-01 10:52 ` Joel Brobecker
2013-10-01 11:33 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131001100200.GA2840@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).