This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Forbid run with a core file loaded
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, Eli Zaretskii <eliz at gnu dot org>, mark dot kettenis at xs4all dot nl, brobecker at adacore dot com, gdb-patches at sourceware dot org
- Date: Mon, 07 Jun 2010 20:32:29 -0600
- Subject: Re: [patch] Forbid run with a core file loaded
- References: <20100606195033.GA9710@host0.dyn.jankratochvil.net> <201006071220.58289.pedro@codesourcery.com>
- Reply-to: tromey at redhat dot com
Jan> I hope you agree the target stack should be made specific for each
Jan> inferior.
Pedro> I've gone back and forth on that for a while with the multi-exec
Pedro> work. It's trickier than that.
How else would you propose letting people attach to multiple inferiors
using multiple targets? This seems like a reasonable thing to want to
do, e.g., debugging a distributed application of some kind.
Pedro> Consider the extended-remote target --- if you do "add-inferior;
Pedro> <inf 2 created>; inferior 2; run", if we simply had a target
Pedro> stack per inferior, then when you get to "run", you'd only have
Pedro> "exec" on the inferior 2's stack, but you wanted extended-remote
Pedro> to handle creating the inferior.
I don't really know enough about the target API, but this seems fixable.
"Target stack per inferior" does not necessarily imply that the targets
cannot be shared, just that conceptually each inferior carries its own.
Tom