This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Multiple remote inferiors
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb at sourceware dot org
- Cc: Kevin Pouget <kevin dot pouget at gmail dot com>
- Date: Wed, 6 Apr 2011 18:44:01 +0100
- Subject: Re: Multiple remote inferiors
- References: <BANLkTimVJD8Yq1vyBXzW=1Uz5ea9X=E4Lw@mail.gmail.com>
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