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: Host GDB disconnect while waiting for tracee status change


On 08/23/2017 10:37 AM, Dmitry Antipov wrote:

> Immediately after killing gdb, gdbserver reports:
> ...
> client connection closed
> my_waitpid (-1, 0x40000001)
> my_waitpid (-1, 0x40000001): status(ffffffff), 0
> LWFE: waitpid(-1, ...) returned 0, ERRNO-OK
> leader_pid=21352, leader_lp!=NULL=1, num_lwps=1, zombie=0
> sigsuspend'ing
> ...
> 
> Next, a new instance of gdb is unable to reconnect:

...

> And it seems that there is no similar issue in a non-stop mode. For
> example:

...

> This way, a new instance of gdb can reconnect:

Right, because in non-stop mode, linux-low.c doesn't
usually block inside mywait....sigsuspend.  See server.c:resume.
In non-stop mode, gdbserver waits for both socket events and
target events at the same time in the event loop.  The
non-stop variant of the RSP is asynchronous.

Thanks,
Pedro Alves


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