public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug server/16359] New: gdbserver needs to handle gdb going away more robustly
@ 2013-12-20 20:09 dje at google dot com
2014-04-17 16:10 ` [Bug server/16359] " rtaylor at synopsys dot com
0 siblings, 1 reply; 2+ messages in thread
From: dje at google dot com @ 2013-12-20 20:09 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=16359
Bug ID: 16359
Summary: gdbserver needs to handle gdb going away more robustly
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: server
Assignee: unassigned at sourceware dot org
Reporter: dje at google dot com
gdbserver --multi, target extended-remote, amd64-linux
If you kill -9 gdb (as a proxy for gdb being terminated for unexpected
reasons), gdbserver will arrive here:
static void
input_interrupt (int unused)
{
fd_set readset;
struct timeval immediate = { 0, 0 };
/* Protect against spurious interrupts. This has been observed to
be a problem under NetBSD 1.4 and 1.5. */
FD_ZERO (&readset);
FD_SET (remote_desc, &readset);
if (select (remote_desc + 1, &readset, 0, 0, &immediate) > 0)
{
int cc;
char c = 0;
cc = read_prim (&c, 1);
if (cc != 1 || c != '\003' || current_inferior == NULL)
{
fprintf (stderr, "input_interrupt, count = %d c = %d ('%c')\n",
cc, c, c);
return;
}
(*the_target->request_interrupt) ();
}
}
and print:
input_interrupt, count = 0 c = 0 ('^@')
Subsequent connection attempts from gdb do not succeed.
gdbserver could handle this more robustly by detecting EOF and treating it like
any other disconnect (detaching from inferior and going back to waiting for a
connection).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug server/16359] gdbserver needs to handle gdb going away more robustly
2013-12-20 20:09 [Bug server/16359] New: gdbserver needs to handle gdb going away more robustly dje at google dot com
@ 2014-04-17 16:10 ` rtaylor at synopsys dot com
0 siblings, 0 replies; 2+ messages in thread
From: rtaylor at synopsys dot com @ 2014-04-17 16:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=16359
Randy Taylor <rtaylor at synopsys dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rtaylor at synopsys dot com
--- Comment #1 from Randy Taylor <rtaylor at synopsys dot com> ---
We are seeing this problem at Synopsys when trying to reconnect to disconnected
gdb sessions.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-17 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 20:09 [Bug server/16359] New: gdbserver needs to handle gdb going away more robustly dje at google dot com
2014-04-17 16:10 ` [Bug server/16359] " rtaylor at synopsys dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).