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 12:50:00 -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>
Tom> One that comes to mind is what target is associated with an inferior
Tom> created with add-inferior? How could you change this inferior's target
Tom> to connect it to some existing target?
David> Perhaps I misunderstand the question. Initially, there is just a dummy
David> target.
David> Do a command like 'file' and you have an exec target.
David> Do a command like 'run' or 'attach' or 'target remote' or 'target
David> extended-remote' and your process stratum target is pushed on top of the
David> old file stratum target.
David> Do a command like 'kill' or 'detach' and your process stratum target is
David> popped and you are back at the exec stratum target -- the exec file --
David> at the top of your target stack.
I was thinking of a scenario like: I have an existing connection to an
extended-remote target, then I want to add an inferior and then run it
on that target.
I guess something like this would work if "target extended-remote"
always did connection sharing:
add-inferior -exec whatever
target extended-remote server:port
run
The issue I have is differentiating this from the scenario of: add
inferior, connect for the first time, then try to run. Won't this do
something different if the remote is already running?
I feel like I'm confused somehow.
David> . you want to know the full set of inferiors and their targets.
David> Seems somewhat esoteric. Perhaps a maint command would be appropriate?
I suppose we could just print it in "info inferiors".
Tom