From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32211 invoked by alias); 21 Dec 2009 10:02:39 -0000 Received: (qmail 32132 invoked by uid 22791); 21 Dec 2009 10:02:37 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Dec 2009 10:02:31 +0000 Received: (qmail 7451 invoked from network); 21 Dec 2009 10:02:30 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 21 Dec 2009 10:02:30 -0000 From: Vladimir Prus To: Eli Zaretskii Subject: Re: [MI, doc] flush output in -gdb-exit Date: Mon, 21 Dec 2009 10:02:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-14-generic-pae; KDE/4.3.2; i686; ; ) Cc: gdb-patches@sourceware.org References: <200912171046.03355.vladimir@codesourcery.com> <83aaxh74tj.fsf@gnu.org> In-Reply-To: <83aaxh74tj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_0e0LL6Jip8MmUAq" Message-Id: <200912211302.28145.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00297.txt.bz2 --Boundary-00=_0e0LL6Jip8MmUAq Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-length: 693 On Thursday 17 December 2009 22:56:08 Eli Zaretskii wrote: > > From: Vladimir Prus > > Date: Thu, 17 Dec 2009 10:46:03 +0300 > > > > OK? > > Yes, after this: > > > +take some time for GDB to actually exit. During that time, GDB > ^^^ ^^^ > @value{GDBN} > > > +performs necessary cleanups, including killing programs being debugged > > +or disconnecting from debug hardware, so the frontend should wait till > > +GDB exits and should only forcibly kill GDB if it fails to exit in > ^^^ ^^^ > Likewise. Thanks for review. Here's what I've checked in. - Volodya --Boundary-00=_0e0LL6Jip8MmUAq Content-Type: text/x-patch; charset="UTF-8"; name="gdb-exit-flush-final.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-exit-flush-final.diff" Content-length: 2610 Index: gdb/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.11158 diff -u -p -r1.11158 ChangeLog --- gdb/ChangeLog 21 Dec 2009 09:50:26 -0000 1.11158 +++ gdb/ChangeLog 21 Dec 2009 10:01:18 -0000 @@ -1,5 +1,9 @@ 2009-12-21 Vladimir Prus + * mi/mi-main.c (mi_cmd_gdb_exit): Flush raw_stdout. + +2009-12-21 Vladimir Prus + PR gdb/10884 * value.c (value_primitive_field): Call check_typedef Index: gdb/doc/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/doc/ChangeLog,v retrieving revision 1.982 diff -u -p -r1.982 ChangeLog --- gdb/doc/ChangeLog 21 Dec 2009 07:30:10 -0000 1.982 +++ gdb/doc/ChangeLog 21 Dec 2009 10:01:19 -0000 @@ -1,3 +1,8 @@ +2009-12-21 Vladimir Prus + + * gdb.texinfo (GDB/MI Miscellaneous Commands): Clarify that + -gdb-exit behaviour. + 2009-12-20 Joel Brobecker * gpl.texi: Update to version 3 of the GPL. Index: gdb/doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.648 diff -u -p -r1.648 gdb.texinfo --- gdb/doc/gdb.texinfo 8 Dec 2009 14:06:02 -0000 1.648 +++ gdb/doc/gdb.texinfo 21 Dec 2009 10:01:20 -0000 @@ -21955,6 +21955,13 @@ Quitting @value{GDBN} just prints the re <- ^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: gdb/mi/mi-main.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-main.c,v retrieving revision 1.159 diff -u -p -r1.159 mi-main.c --- gdb/mi/mi-main.c 30 Oct 2009 17:34:53 -0000 1.159 +++ gdb/mi/mi-main.c 21 Dec 2009 10:01:20 -0000 @@ -111,6 +111,7 @@ mi_cmd_gdb_exit (char *command, char **a 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); } --Boundary-00=_0e0LL6Jip8MmUAq--