This is the mail archive of the gdb@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]

Re: Multiple remote inferiors


Hi Pedro,

thanks for your answer, I gave it a try, but it seems to behave a bit strangely.

--> should it be possible to start _two different_ processes from a
single GDBServer ?

here is what I got (debugging functionPtr and stackoverflow):

> $ gdbserver :1234 functionPtr
> Process functionPtr created; pid = 10820
> Listening on port 1234
> Remote debugging from host 127.0.0.1
> Process functionPtr created; pid = 10825

> $ gdb functionPtr
> GNU gdb (GDB) Fedora (7.2-46.fc14)
> ...
> Reading symbols from /home/kevin/travail/arm/perso/root/sample/debug/functionPtr...done.
> (gdb) target extended-remote :1234
> Remote debugging using :1234
> ...
> (gdb) b main
> Breakpoint 1 at 0x400533: file ./functionPtr.c, line 8.
> (gdb) c
> Continuing.
> Breakpoint 1, main () at ./functionPtr.c:8
> 8 void (* my_say) (const char *) = NULL ;
>
> (gdb) add-inferior
> Added inferior 2
> (gdb) inferior 2
> [Switching to inferior 2 [Thread 0.0] (<noexec>)]
> (gdb) file stackoverflow
> Reading symbols from /home/kevin/travail/arm/perso/root/sample/debug/stackoverflow...done.
> (gdb) b main
> Breakpoint 2 at 0x400522: file stackoverflow.c, line 10.
> (gdb) r
> Starting program: /home/kevin/travail/arm/perso/root/sample/debug/stackoverflow
> Ignoring packet error, continuing...

GDBServer tries to start? functionPtr twice, as confirmed by the `pstree'

> $ pstree | grep functionPtr
> ?? .... bash---gdbserver---2*[functionPtr]

is it a bug or <del>a feature</del> a wrong usage of GDB ?


but ultimately, what I would like to do is connecting GDB to two
*different* gdbservers, ie maintain two TCP connections
simultaneously.


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