add-inferior / clone-inferior

Tom Tromey tromey@redhat.com
Wed May 22 20:21:00 GMT 2013


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



More information about the Gdb mailing list