mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 17:40:49 +00:00
gdb: imply --once if connecting via stdio
Currently, gdbserver hangs after stdin is closed while it tries to write: "Remote side has terminated connection. GDBserver will reopen the connection." This hang disappears if --once is also given. Since the stdin connection won't ever reopen if it's closed, it's safe to assume --once is desired. The gdb.server/server-pipe.exp test was also updated to reflect this change. There is now a second disconnect at the end of the proc, with a tighter-than-normal timeout to catch if the command hangs as it used to. Co-Authored-By: Guinevere Larsen <blarsen@redhat.com> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29796 Approved-By: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
committed by
Andrew Burgess
parent
0891970109
commit
a733b2c904
@@ -4209,6 +4209,10 @@ captured_main (int argc, char *argv[])
|
||||
/* "-" specifies a stdio connection and is a form of port
|
||||
specification. */
|
||||
port = STDIO_CONNECTION_NAME;
|
||||
|
||||
/* Implying --once here prevents a hang after stdin has been closed. */
|
||||
run_once = true;
|
||||
|
||||
next_arg++;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user