]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* mi/mi-main.c (mi_cmd_gdb_exit): Flush raw_stdout.
authorVladimir Prus <vladimir@codesourcery.com>
Mon, 21 Dec 2009 10:02:06 +0000 (10:02 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Mon, 21 Dec 2009 10:02:06 +0000 (10:02 +0000)
gdb/ChangeLog
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/mi/mi-main.c

index 3ba26408dd85b3bc233073fb6f240e22ace475ad..ea9d41370f5a568861fb49897c9688dbbf4c376e 100644 (file)
@@ -1,3 +1,7 @@
+2009-12-21  Vladimir Prus  <vladimir@codesourcery.com>
+
+       * mi/mi-main.c (mi_cmd_gdb_exit): Flush raw_stdout.
+
 2009-12-21  Vladimir Prus  <vladimir@codesourcery.com>
 
        PR gdb/10884
index e1e019fcb75e42ddde6020d3e48f9495f18a18da..aa6ab58c049d7774b472ece9558ec3b56e8440c8 100644 (file)
@@ -1,3 +1,8 @@
+2009-12-21  Vladimir Prus  <vladimir@codesourcery.com>
+
+       * gdb.texinfo (GDB/MI Miscellaneous Commands): Clarify that
+       -gdb-exit behaviour.
+
 2009-12-20  Joel Brobecker  <brobecker@adacore.com>
 
        * gpl.texi: Update to version 3 of the GPL.
index e880838191d6dd2ef883671d4f0942886d9b65ee..40bbe076d6f001f841a0c6f128dea220ce9371f5 100644 (file)
@@ -21955,6 +21955,13 @@ Quitting @value{GDBN} just prints the result class @samp{^exit}.
 <- ^exit
 @end smallexample
 
+Please note that @samp{^exit} is printed immediately, but it might
+take some time for @value{GDBN} to actually exit.  During that time, @value{GDBN}
+performs necessary cleanups, including killing programs being debugged
+or disconnecting from debug hardware, so the frontend should wait till
+@value{GDBN} exits and should only forcibly kill @value{GDBN} if it
+fails to exit in reasonable time.
+
 @subheading A Bad Command
 
 Here's what happens if you pass a non-existent command:
index 2332752b5744aee6d00f07e94a54bbe2bdc4d733..0c8e91782019b0353366bf506c97da0d92124855 100644 (file)
@@ -111,6 +111,7 @@ mi_cmd_gdb_exit (char *command, char **argv, int argc)
     fputs_unfiltered (current_token, raw_stdout);
   fputs_unfiltered ("^exit\n", raw_stdout);
   mi_out_put (uiout, raw_stdout);
+  gdb_flush (raw_stdout);
   /* FIXME: The function called is not yet a formal libgdb function.  */
   quit_force (NULL, FROM_TTY);
 }