Multiple remote inferiors
Pedro Alves
pedro@codesourcery.com
Wed Apr 6 17:44:00 GMT 2011
On Wednesday 06 April 2011 16:02:15, Kevin Pouget wrote:
> Hello,
>
> it looks like it's not possible to connect to several
> remote/extended-remote inferiors at the same time:
>
> (gdb) target remote :1234
> ...
> (gdb) add-inferior
> Added inferior 2
> (gdb) inferior 2
> [Switching to inferior 2 [process 0] (<noexec>)]
> (gdb) target remote :1235
> A program is being debugged already. Kill it? (y or n)
>
>
> and I was wondering what was the reason?
GDB support multiple processes, but they currently
all need to be behind the same target.
For remote targets, only extended-remote allows that.
E.g., adding a new inferior with add-inferior, switching
to it, and doing "start", should work.
> it should theoretically be possible,
This is just software, so in theory, anything
is possible. :-)
> now that multiprocess debugging
> has been enabled, so maybe it's because remote.c relies a lot on
> global variables?
It goes further beyond that. There's only one target_ops stack.
Going multi-target would be awesome.
--
Pedro Alves
More information about the Gdb
mailing list