* [PATCH] Force rda (for unix) to exit when debugged program exits
@ 2004-07-20 0:48 Kevin Buettner
0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2004-07-20 0:48 UTC (permalink / raw)
To: rda
I've just committed the patch below. I found this patch necessary to
make RDA exit when debugging via a serial connection upon which CLOCAL
had been set. CLOCAL causes the hardware modem control signals to be
ignored. As a consequence, the serial port will always appear to
be open.
* server.c (main): Set ``server_quit_p'' when debugged process
exits or terminates.
Index: server.c
===================================================================
RCS file: /cvs/src/src/rda/unix/server.c,v
retrieving revision 1.6
diff -u -p -r1.6 server.c
--- server.c 3 Jun 2004 18:29:18 -0000 1.6
+++ server.c 20 Jul 2004 00:41:10 -0000
@@ -415,9 +415,17 @@ main (int argc, char **argv)
break;
case 'X':
gdbserver.fromtarget_terminate (process);
+ server_quit_p = 1; /* See below. */
break;
case 'W':
gdbserver.fromtarget_exit (process);
+ /* If we're connected to a serial port which is not
+ observing the modem control signals (e.g. "stty
+ clocal"), then we'll never notice that the port has
+ been closed. For this reason, when we notice that
+ the target has exited or terminated, we need to set
+ ``server_quit_p'' explicitly. */
+ server_quit_p = 1;
break;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-07-20 0:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-20 0:48 [PATCH] Force rda (for unix) to exit when debugged program exits Kevin Buettner
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).