This is the mail archive of the
mailing list for the GDB project.
Re: Host GDB disconnect while waiting for tracee status change
On 08/23/2017 02:55 PM, Dmitry Antipov wrote:
> On 08/23/2017 04:10 PM, Pedro Alves wrote:
>> 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. So, is it mandatory to use non-stop mode if I want to be able to
> restart gdb without loosing the debugging session controlled by gdbserver?
In all-stop/sync mode, you can only exit gdb if the
target is stopped, in which case you can't get into the
problem case. If you're considering "restarting gdb" manually,
then no. This is about the server robustly handling the case of
the connection unexpectedly closing, like GDB crashing.
And gdbserver could be fixed, somehow. This is a quality of
implementation issue, not a fundamental insurmountable design