From: Yao Qi <qiyaoltc@gmail.com>
To: Dmitry Antipov <dantipov@nvidia.com>
Cc: <gdb@sourceware.org>, Ryan Bissell <rbissell@nvidia.com>,
Mikhail Filimonov <mfilimonov@nvidia.com>
Subject: Re: Host GDB disconnect while waiting for tracee status change
Date: Wed, 23 Aug 2017 08:18:00 -0000 [thread overview]
Message-ID: <867exusnn8.fsf@gmail.com> (raw)
In-Reply-To: <5febbe3e-926f-78bb-db88-901b44e2e258@nvidia.com> (Dmitry Antipov's message of "Tue, 22 Aug 2017 16:23:03 +0300")
Dmitry Antipov <dantipov@nvidia.com> writes:
> Is there a feature/option/etc. to gracefully handle the situation when gdbserver
> sits waiting for tracee status change and the network connection is
> getting lost?
>
I didn't try GDBserver under the case you described, but I find
something related int GDB manual,
https://sourceware.org/gdb/onlinedocs/gdb/Server.html
"Therefore, when the connection drops unexpectedly, and GDB cannot ask
gdbserver to kill its debugged processes, gdbserver stays running even
in the target remote mode."
GDBserver is able to handle this for tracepoint, which is called
disconnected-tracing.
https://sourceware.org/gdb/onlinedocs/gdb/Starting-and-Stopping-Trace-Experiments.html#disconnected-tracing
With tracepoint, GDBserver knows what it should do when tracee status
changed and don't have to communicate with GDB.
> AFAICS in case of Linux, linux_wait_for_event_filtered() just enters
> sigsuspend()
> waiting for SIGCHLD and ignoring anything else, thus having no
> opportunity to detect
> any socket status changes even if the latter are signaled with SIGIOs requested
> in enable_async_notification().
--
Yao (齐尧)
next prev parent reply other threads:[~2017-08-23 8:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 13:23 Dmitry Antipov
2017-08-23 8:18 ` Yao Qi [this message]
2017-08-23 9:37 ` Dmitry Antipov
2017-08-23 13:10 ` Pedro Alves
2017-08-23 13:56 ` Dmitry Antipov
2017-08-23 15:01 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=867exusnn8.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=dantipov@nvidia.com \
--cc=gdb@sourceware.org \
--cc=mfilimonov@nvidia.com \
--cc=rbissell@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox