Multiprogram teaser

Tom Tromey tromey@redhat.com
Wed Jul 30 17:43:00 GMT 2008


>>>>> "Stan" == Stan Shebs <stan@codesourcery.com> writes:

Stan> Here's a little teaser showing the results of me flogging GDB's
Stan> source code.

Delightful.

Stan> Attaching objfile /home/stan/hello to exec /home/stan/hello
Stan> Attaching objfile /home/stan/goodbye to exec /home/stan/goodbye
[...]
Stan> (gdb) exec /home/stan/hello

I'm wondering what happens if you want to start two instances of hello
at once.

I suppose one solution to the UI problems would be to treat each
separate "exec" (I dunno what you want to call this -- a concept
encompassing a process, a core file, or an unstarted executable) as an
object that can be manipulated in its own right.

So, you could have "info <foo>" to list them, switch between them,
have "set args" set the arguments for the current one, "run" start one
or more of them, etc.

Tom



More information about the Gdb mailing list