From: Tom Tromey <tromey@redhat.com>
To: Stan Shebs <stanshebs@earthlink.net>
Cc: gdb@sourceware.org
Subject: Re: Towards multiprocess GDB
Date: Fri, 18 Jul 2008 23:13:00 -0000 [thread overview]
Message-ID: <m3hcamvlgk.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4880FFA8.3080600@earthlink.net> (Stan Shebs's message of "Fri\, 18 Jul 2008 13\:40\:08 -0700")
>>>>> "Stan" == Stan Shebs <stanshebs@earthlink.net> writes:
Stan> CodeSourcery has a project to add "multiprocess" capability to GDB,
Stan> and with this message I'd like to kick off some discussion of what
Stan> that means and how to make it happen.
Awesome.
Stan> Once the debugger is started, but before any of the programs
Stan> have run, it seems obvious to have a notion of "current
Stan> program", so that commands like "list main" and "break main"
Stan> will work as usual.
Stan> Notice that we don't really want to use the term "process" for any of
Stan> this so far, because nothing is running yet and there are no
Stan> processes/inferiors; this part is all about the symbol side.
It is worth thinking about how things like "break main" will work
after processes have been made, as well. For instance, consider
something like "set follow-fork-mode both"; after a fork, where does
'break main' apply?
This is particularly interesting if you are watching a very large tree
of processes. It would be nice if gdb did not have eagerly to read
symbols for every program.
The HPD spec (which I know you worked on :) has some "focus" commands
for this kind of thing. It may be worth looking at that, or looking
to see what the competition (totalview cough cough) does. I suppose
the user could focus on a thread, a process, or a file (or sets
thereof); and have a generalized "focus-group apply" thing.
Another idea, related to something in HPD, would be to come up with a
general syntax for naming things -- like "#PID#file.c:function" (or
what have you) -- so the user can easily embed a context into a name.
(I dunno if this is useful, I'm just brainstorming a bit.)
Finally, HPD also has "barrier"s, which are like multi-process
breakpoints. I don't know if these are interesting enough to write
into the core of gdb; it seems to me that new porcelain like this can
most easily be put over the plumbing using new commands written in
python.
Stan> Conversely, the user will also want a way to take programs out
Stan> of the debugging session. This is not quite the same as
Stan> detaching, because the user may want, say, the server to
Stan> continue doing its serving thing
I don't understand the distinction here. With 'detach' the server
would continue serving... what am I missing?
Stan> Although my inclination is to create a new symbol table for each
Stan> process' image of each shared library, that may be excessively
Stan> expensive.
To me this sounds important to solve, though of course I have no
numbers. I am just thinking that every program is going to be mapping
in libc, and it would be great to scale to a large number of inferiors.
FWIW the particular scenario I am interested in is running "make check"
in the gcc tree, under gdb, and having it stop only when some
sub-process gets a SEGV. So, the question is, how does gdb react to
thousands of process creations and deletions, how eagerly does it read
and discard symbol table info, etc.
Tom
next prev parent reply other threads:[~2008-07-18 23:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 20:50 Stan Shebs
2008-07-18 21:21 ` Paul Koning
2008-07-18 21:41 ` Stan Shebs
2008-07-21 0:34 ` Michael Snyder
2008-07-18 22:13 ` Mark Kettenis
2008-07-18 22:20 ` David Daney
2008-07-18 22:28 ` Thiago Jung Bauermann
2008-07-18 23:09 ` Stan Shebs
2008-07-19 3:53 ` Pedro Alves
2008-07-21 17:39 ` Stan Shebs
2008-07-21 1:53 ` Michael Snyder
2008-07-21 16:08 ` Russell Shaw
2008-07-21 17:57 ` Joel Brobecker
2008-07-18 23:13 ` Tom Tromey [this message]
2008-07-21 17:11 ` Stan Shebs
2008-07-21 0:30 ` Michael Snyder
2008-07-21 18:21 ` Paul Pluzhnikov
2008-07-21 18:32 ` Stan Shebs
2008-07-21 16:38 ` Michael Eager
2008-07-21 21:54 ` Stan Shebs
2008-07-31 22:04 ` Ian Lance Taylor
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=m3hcamvlgk.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb@sourceware.org \
--cc=stanshebs@earthlink.net \
/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