This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug remote/19215] GDB does not support more than one inferior for "target remote"


https://sourceware.org/bugzilla/show_bug.cgi?id=19215

--- Comment #3 from Pedro Alves <palves at redhat dot com> ---
What you're asking for is being able to attach to multiple remote targets at
the same time, which you can't do currently (see
https://sourceware.org/gdb/wiki/MultiTarget).

What I was saying is that "target extended-remote" does allow debugging more
than one inferior simultaneously.  You just have to use a single gdbserver
instance for that.  Something like:

on target:

target$ gdbserver --multi :2020

on host:

$ gdb -ex "target extended-remote target-ip:2020"
...
(gdb) attach 26364
...
(gdb) add-inferior
...
(gdb) inferior 2
Added inferior 2
(gdb) attach 26369
...
(gdb) info inferiors
  Num  Description       Executable        
* 2    process 26369     prog2
  1    process 26364     prog1
(gdb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]