From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22239 invoked by alias); 23 Apr 2014 17:36:09 -0000 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 Received: (qmail 22229 invoked by uid 89); 23 Apr 2014 17:36:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ausxippc101.us.dell.com Received: from ausxippc101.us.dell.com (HELO ausxippc101.us.dell.com) (143.166.85.207) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 23 Apr 2014 17:36:08 +0000 X-LoopCount0: from 10.175.216.251 From: To: CC: , , Subject: Re: specifying gdb's exit code Date: Wed, 23 Apr 2014 17:36:00 -0000 Message-ID: <0532FE81-AE98-4E34-B48B-D82091FC6CF2@dell.com> References: <87ppk89dir.fsf@fleche.redhat.com> <5357F862.306@gmail.com> In-Reply-To: <5357F862.306@gmail.com> Content-Type: text/plain; charset="Windows-1252" Content-ID: <4313A0DBA7D04D46AD39E1ADF4B97DD4@dell.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00452.txt.bz2 On Apr 23, 2014, at 1:29 PM, Pedro Alves wrote: > On 04/23/2014 06:11 PM, Tom Tromey wrote: >> - add_com ("quit", class_support, quit_command, _("Exit gdb.")); >> + add_com ("quit", class_support, quit_command, _("\ >> +Exit gdb.\n\ >> +Usage: quit [CODE]\n\ >> +The optional argument CODE, if present, is used as gdb's exit status.\n\ >> +The default is zero.")); >> c =3D add_com ("help", class_support, help_command, >> _("Print list of commands.")); >> set_cmd_completer (c, command_completer); >=20 > Would it be good if the online help and the manual agreed a bit > more? The manual says "quit [expression]": >=20 > @node Quitting GDB > @section Quitting @value{GDBN} > @cindex exiting @value{GDBN} > @cindex leaving @value{GDBN} >=20 > @table @code > @kindex quit @r{[}@var{expression}@r{]} > @kindex q @r{(@code{quit})} > @item quit @r{[}@var{expression}@r{]} > @itemx q > To exit @value{GDBN}, use the @code{quit} command (abbreviated > @code{q}), or type an end-of-file character (usually @kbd{Ctrl-d}). If y= ou > do not supply @var{expression}, @value{GDBN} will terminate normally; > otherwise it will terminate using the result of @var{expression} as the > error code. > @end table I think it should say =93exit code=94 rather than =93error code=94. Whethe= r a given expression value is the code for an error depends on the value an= d on the host OS. paul