From: Tom Tromey <tromey@redhat.com>
To: GDB Development <gdb@sourceware.org>
Subject: multi-{inferior,exec}
Date: Fri, 03 Sep 2010 22:41:00 -0000 [thread overview]
Message-ID: <m3vd6m30y2.fsf@fleche.redhat.com> (raw)
I've been looking at multi-inferior/multi-exec the last few days. I
want to polish a few edges and make it work nicely on Linux. I thought
I'd post about what I think I am going to implement.
First, the original spec:
http://sourceware.org/ml/gdb/2008-08/msg00169.html
Also relevant:
http://sourceware.org/gdb/wiki/MultiProcess
One concrete thing I plan to do is make objfiles not be relocated,
basically following the idea here:
http://sourceware.org/ml/gdb-patches/2009-06/msg00668.html
This is mostly plumbing, but important for efficiency.
I think the next missing bit is support for I/T sets. E.g., I wanted to
try to debug g++ but put a breakpoint in its cc1plus subprocess. You
can do this today, but only clumsily: either by using add-inferior to
load the symbols for cc1plus, or by using "catch exec" and setting the
breakpoint at exec time. I/T sets would let users set this sort of
breakpoint more easily.
I am not sure what is required to integrate I/T sets into inferior
control (something mentioned on the wiki page). If anyone (Pedro?
Stan?) has state to share, I'm happy to hear it.
I think we can add an I/T set specifier before the linespec argument to
"break". (I couldn't think of other commands that use linespecs that
would need this...) E.g., in the g++ scenario, this would set a
breakpoint that would be resolved in libcpp:
(gdb) break [*] collect_args
"[*]" is the I/T set representing "all current or future inferiors".
If no I/T set is specified, it would default to the current inferior.
The original spec had a "focus" command... but that is already used by
the TUI. How did that get resolved? It seems to me that we could just
use "select" instead.
I was thinking it would be nice to extend "thread apply" to take an I/T
set argument. Maybe "inferior apply" is a nicer way to spell it.
I think maybe the I/T set syntax could be expanded or changed a little.
I'm at least thinking of "." as a synonym for "current inferior", and
being able to differentiate named sets and executables.
There are more tasks beyond those, but I think those will hold me for a
while. The remaining big things I am aware of (thanks Pedro) are:
* Model follow-fork|vfork|exec in remote protocol + remote.c + gdbserver
* gdbserver needs work for multi-inferior + multi-arch
Maybe we need a target description per inferior here.
Tom
next reply other threads:[~2010-09-03 22:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 22:41 Tom Tromey [this message]
2010-09-04 6:26 ` multi-{inferior,exec} Jan Kratochvil
2010-09-05 17:16 ` multi-{inferior,exec} Nenad Vukicevic
2010-09-07 17:04 ` multi-{inferior,exec} Tom Tromey
2010-09-07 21:34 ` multi-{inferior,exec} Daniel Jacobowitz
2010-09-07 21:50 ` multi-{inferior,exec} Nenad Vukicevic
2010-09-10 21:56 ` multi-{inferior,exec} Tom Tromey
2010-09-10 23:07 ` multi-{inferior,exec} Stan Shebs
2010-09-11 1:46 ` multi-{inferior,exec} Tom Tromey
2010-09-10 22:52 ` multi-{inferior,exec} Stan Shebs
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=m3vd6m30y2.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb@sourceware.org \
/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