This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: add-inferior / clone-inferior
- From: Tom Tromey <tromey at redhat dot com>
- To: David Taylor <dtaylor at emc dot com>
- Cc: "gdb\ at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 22 May 2013 14:21:09 -0600
- Subject: Re: add-inferior / clone-inferior
- References: <7249 dot 1369061005 at usendtaylorx2l> <87bo84l5ad dot fsf at fleche dot redhat dot com> <87ehczhy0c dot fsf at fleche dot redhat dot com> <8702 dot 1369246895 at usendtaylorx2l> <87k3mqhmsn dot fsf at fleche dot redhat dot com> <9342 dot 1369251736 at usendtaylorx2l>
David> I wasn't thinking about that scenario. My current interest is talking
David> to the kernel of a machine that might be in a local lab or might be at a
David> customer site half way around the world.
Yeah.
I'm just brainstorming different scenarios to try to understand what
problems multi-target might have. Running a new program via an
extended-remote gdbserver seems like a reasonable thing to want to do;
but I wasn't sure of the mechanics.
David> But, if you give it a different server:port than previously, presumably
David> you want it to open a new connection. I think it needs to be clear to
David> the user whether it is reusing an existing connection or creating a new
David> one. Perhaps a different syntax than server:port when reusing a
David> connection?
Yeah, that may be the way to go.
Or maybe "always reuse" is best? Since it seems unlikely to want to
open multiple concurrent connections to the exact same server/port pair.
(I guess it could work with some hypothetical gdbserver. But I don't
think it exists.)
David> If we just printed the top stratum element putting it into info
David> inferiors is probably reasonable. If it was more verbose, I don't think
David> the average user would care to see it.
I was just thinking something like:
(gdb) info inferior
Num Description Executable Target
* 1 process 2994 /usr/bin/gdb native
2 process 1222 /bin/sh server:9999
David> I'd also like a name field somewhere for the inferior. I can envision
David> debugging a client server problem by having both under one GDB rather
David> than two GDBs. Ideally, names that the 'inferior' command recognizes
David> in addition to a numeric inferior id. Then I could do
David> inferior client
David> ... some commands ...
David> inferior server
David> ... some commands ...
IT sets were the answer to this in the past, but I see in your other
mail that you also wanted it to show up in "info inferiors". That seems
reasonable to me; though maybe it could be some kind of itset flag.
I think Pedro and Yao have the best status on itsets.
Tom