* Re: specifying gdb's exit code [not found] ` <CAF5HaEV3wMHXfk3jLmbY-E6XAaZSmBRhzDjo2BvhQ7NbvvCtZQ@mail.gmail.com> @ 2014-04-17 21:52 ` Daniel Gutson 2014-04-22 12:37 ` Daniel Gutson 2014-04-23 17:11 ` Tom Tromey 0 siblings, 2 replies; 14+ messages in thread From: Daniel Gutson @ 2014-04-17 21:52 UTC (permalink / raw) To: Doug Evans; +Cc: gdb, gdb-patches [-- Attachment #1: Type: text/plain, Size: 1315 bytes --] What about this? (I'm not a native English speaker) If OK, please commit it for me since I don't have write-access. Thanks! Daniel. 2014-04-17 Daniel Gutson <daniel.gutson@tallertechnologies.com> gdb/cli/ * cli-cmds.c (_initialize_cli_cmds): Improve help message for the quit command. On Thu, Apr 17, 2014 at 6:34 PM, Daniel Gutson <daniel.gutson@tallertechnologies.com> wrote: > On Thu, Apr 17, 2014 at 6:32 PM, Doug Evans <dje@google.com> wrote: >> On Thu, Apr 17, 2014 at 12:08 PM, Daniel Gutson >> <daniel.gutson@tallertechnologies.com> wrote: >>> Sorry. Please ignore this email. >>> >>> I just noticed that "quit" already accepts an argument. >> >> Heh. >> IWBN if "help quit" pointed this out though. > > I thought the same, since that was the first thing I did (help quit > and apropos exit), > it would have helped. > I'll fix the help and send the patch. > > -- > > Daniel F. Gutson > Chief Engineering Officer, SPD > > > San Lorenzo 47, 3rd Floor, Office 5 > > Córdoba, Argentina > > > Phone: +54 351 4217888 / +54 351 4218211 > > Skype: dgutson -- Daniel F. Gutson Chief Engineering Officer, SPD San Lorenzo 47, 3rd Floor, Office 5 Córdoba, Argentina Phone: +54 351 4217888 / +54 351 4218211 Skype: dgutson [-- Attachment #2: quit_help.patch --] [-- Type: text/x-patch, Size: 636 bytes --] diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index bfcd975..40967bf 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1685,7 +1685,9 @@ strict == evaluate script according to filename extension, error if not supporte show_script_ext_mode, &setlist, &showlist); - add_com ("quit", class_support, quit_command, _("Exit gdb.")); + add_com ("quit", class_support, quit_command, _("\ +Exit gdb.\n\ +Can optionally be followed by the exit code that gdb should return.")); c = add_com ("help", class_support, help_command, _("Print list of commands.")); set_cmd_completer (c, command_completer); ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-17 21:52 ` specifying gdb's exit code Daniel Gutson @ 2014-04-22 12:37 ` Daniel Gutson 2014-04-23 17:11 ` Tom Tromey 1 sibling, 0 replies; 14+ messages in thread From: Daniel Gutson @ 2014-04-22 12:37 UTC (permalink / raw) To: Doug Evans; +Cc: gdb, gdb-patches ping for micro and trivial patch. (though I'm not sure if I should re-generate the .po files?) On Thu, Apr 17, 2014 at 6:51 PM, Daniel Gutson <daniel.gutson@tallertechnologies.com> wrote: > What about this? > (I'm not a native English speaker) > > If OK, please commit it for me since I don't have write-access. > > Thanks! > > Daniel. > > 2014-04-17 Daniel Gutson <daniel.gutson@tallertechnologies.com> > > gdb/cli/ > * cli-cmds.c (_initialize_cli_cmds): Improve help message for > the quit command. > > On Thu, Apr 17, 2014 at 6:34 PM, Daniel Gutson > <daniel.gutson@tallertechnologies.com> wrote: >> On Thu, Apr 17, 2014 at 6:32 PM, Doug Evans <dje@google.com> wrote: >>> On Thu, Apr 17, 2014 at 12:08 PM, Daniel Gutson >>> <daniel.gutson@tallertechnologies.com> wrote: >>>> Sorry. Please ignore this email. >>>> >>>> I just noticed that "quit" already accepts an argument. >>> >>> Heh. >>> IWBN if "help quit" pointed this out though. >> >> I thought the same, since that was the first thing I did (help quit >> and apropos exit), >> it would have helped. >> I'll fix the help and send the patch. >> >> -- >> >> Daniel F. Gutson >> Chief Engineering Officer, SPD >> >> >> San Lorenzo 47, 3rd Floor, Office 5 >> >> Córdoba, Argentina >> >> >> Phone: +54 351 4217888 / +54 351 4218211 >> >> Skype: dgutson > > > > -- > > Daniel F. Gutson > Chief Engineering Officer, SPD > > > San Lorenzo 47, 3rd Floor, Office 5 > > Córdoba, Argentina > > > Phone: +54 351 4217888 / +54 351 4218211 > > Skype: dgutson -- Daniel F. Gutson Chief Engineering Officer, SPD San Lorenzo 47, 3rd Floor, Office 5 Córdoba, Argentina Phone: +54 351 4217888 / +54 351 4218211 Skype: dgutson ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-17 21:52 ` specifying gdb's exit code Daniel Gutson 2014-04-22 12:37 ` Daniel Gutson @ 2014-04-23 17:11 ` Tom Tromey 2014-04-23 17:29 ` Eli Zaretskii 2014-04-23 17:29 ` Pedro Alves 1 sibling, 2 replies; 14+ messages in thread From: Tom Tromey @ 2014-04-23 17:11 UTC (permalink / raw) To: Daniel Gutson; +Cc: gdb-patches >>>>> "Daniel" == Daniel Gutson <daniel.gutson@tallertechnologies.com> writes: Daniel> What about this? Daniel> (I'm not a native English speaker) I wonder what you think of the appended. It adds an explicit "Usage" line, which gdb does in a few other spots and which I think it generally the most clear approach. Tom diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index bfcd975..298f54c 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1685,7 +1685,11 @@ strict == evaluate script according to filename extension, error if not supporte show_script_ext_mode, &setlist, &showlist); - 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 = add_com ("help", class_support, help_command, _("Print list of commands.")); set_cmd_completer (c, command_completer); ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 17:11 ` Tom Tromey @ 2014-04-23 17:29 ` Eli Zaretskii 2014-04-23 17:29 ` Pedro Alves 1 sibling, 0 replies; 14+ messages in thread From: Eli Zaretskii @ 2014-04-23 17:29 UTC (permalink / raw) To: Tom Tromey; +Cc: daniel.gutson, gdb-patches > From: Tom Tromey <tromey@redhat.com> > Cc: gdb-patches <gdb-patches@sourceware.org> > Date: Wed, 23 Apr 2014 11:11:40 -0600 > > >>>>> "Daniel" == Daniel Gutson <daniel.gutson@tallertechnologies.com> writes: > > Daniel> What about this? > Daniel> (I'm not a native English speaker) > > I wonder what you think of the appended. > It adds an explicit "Usage" line, which gdb does in a few other spots > and which I think it generally the most clear approach. Looks fine to me, thanks. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 17:11 ` Tom Tromey 2014-04-23 17:29 ` Eli Zaretskii @ 2014-04-23 17:29 ` Pedro Alves 2014-04-23 17:36 ` Paul_Koning 2014-04-23 17:49 ` Tom Tromey 1 sibling, 2 replies; 14+ messages in thread From: Pedro Alves @ 2014-04-23 17:29 UTC (permalink / raw) To: Tom Tromey; +Cc: Daniel Gutson, gdb-patches 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 = add_com ("help", class_support, help_command, > _("Print list of commands.")); > set_cmd_completer (c, command_completer); Would it be good if the online help and the manual agreed a bit more? The manual says "quit [expression]": @node Quitting GDB @section Quitting @value{GDBN} @cindex exiting @value{GDBN} @cindex leaving @value{GDBN} @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 you 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 -- Pedro Alves ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 17:29 ` Pedro Alves @ 2014-04-23 17:36 ` Paul_Koning 2014-04-23 17:46 ` Pedro Alves 2014-04-23 17:49 ` Tom Tromey 1 sibling, 1 reply; 14+ messages in thread From: Paul_Koning @ 2014-04-23 17:36 UTC (permalink / raw) To: alves.ped; +Cc: tromey, daniel.gutson, gdb-patches On Apr 23, 2014, at 1:29 PM, Pedro Alves <alves.ped@gmail.com> 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 = add_com ("help", class_support, help_command, >> _("Print list of commands.")); >> set_cmd_completer (c, command_completer); > > Would it be good if the online help and the manual agreed a bit > more? The manual says "quit [expression]": > > @node Quitting GDB > @section Quitting @value{GDBN} > @cindex exiting @value{GDBN} > @cindex leaving @value{GDBN} > > @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 you > 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 “exit code” rather than “error code”. Whether a given expression value is the code for an error depends on the value and on the host OS. paul ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 17:36 ` Paul_Koning @ 2014-04-23 17:46 ` Pedro Alves 0 siblings, 0 replies; 14+ messages in thread From: Pedro Alves @ 2014-04-23 17:46 UTC (permalink / raw) To: Paul_Koning; +Cc: tromey, daniel.gutson, gdb-patches On 04/23/2014 06:35 PM, Paul_Koning@Dell.com wrote: > > On Apr 23, 2014, at 1:29 PM, Pedro Alves <alves.ped@gmail.com> wrote: >> Would it be good if the online help and the manual agreed a bit >> more? The manual says "quit [expression]": >> To exit @value{GDBN}, use the @code{quit} command (abbreviated >> @code{q}), or type an end-of-file character (usually @kbd{Ctrl-d}). If you >> 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 “exit code” rather than “error code”. Whether a given expression value is the code for an error depends on the value and on the host OS. Agreed. I'd even call that an obvious change to the manual. -- Pedro Alves ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 17:29 ` Pedro Alves 2014-04-23 17:36 ` Paul_Koning @ 2014-04-23 17:49 ` Tom Tromey 2014-04-23 17:57 ` Pedro Alves 2014-04-23 18:17 ` Paul_Koning 1 sibling, 2 replies; 14+ messages in thread From: Tom Tromey @ 2014-04-23 17:49 UTC (permalink / raw) To: Pedro Alves; +Cc: Daniel Gutson, gdb-patches Pedro> Would it be good if the online help and the manual agreed a bit Pedro> more? The manual says "quit [expression]": Yeah, I forgot it can be an expression. What do you think of this? Tom diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index bfcd975..0eff952 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1685,7 +1685,11 @@ strict == evaluate script according to filename extension, error if not supporte show_script_ext_mode, &setlist, &showlist); - add_com ("quit", class_support, quit_command, _("Exit gdb.")); + add_com ("quit", class_support, quit_command, _("\ +Exit gdb.\n\ +Usage: quit [EXPR]\n\ +The optional expression EXPR, if present, is evaluated and the result\n\ +used as gdb's exit code. The default is zero.")); c = add_com ("help", class_support, help_command, _("Print list of commands.")); set_cmd_completer (c, command_completer); ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 17:49 ` Tom Tromey @ 2014-04-23 17:57 ` Pedro Alves 2014-04-25 15:44 ` Tom Tromey 2014-04-23 18:17 ` Paul_Koning 1 sibling, 1 reply; 14+ messages in thread From: Pedro Alves @ 2014-04-23 17:57 UTC (permalink / raw) To: Tom Tromey; +Cc: Daniel Gutson, gdb-patches On 04/23/2014 06:49 PM, Tom Tromey wrote: > diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c > index bfcd975..0eff952 100644 > --- a/gdb/cli/cli-cmds.c > +++ b/gdb/cli/cli-cmds.c > @@ -1685,7 +1685,11 @@ strict == evaluate script according to filename extension, error if not supporte > show_script_ext_mode, > &setlist, &showlist); > > - add_com ("quit", class_support, quit_command, _("Exit gdb.")); > + add_com ("quit", class_support, quit_command, _("\ > +Exit gdb.\n\ > +Usage: quit [EXPR]\n\ > +The optional expression EXPR, if present, is evaluated and the result\n\ > +used as gdb's exit code. The default is zero.")); I think this should be "GDB" in caps. "apropos gdb" seems to indicate that's how we spell it in the online help. Otherwise looks fine to me. Thanks, -- Pedro Alves ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 17:57 ` Pedro Alves @ 2014-04-25 15:44 ` Tom Tromey 0 siblings, 0 replies; 14+ messages in thread From: Tom Tromey @ 2014-04-25 15:44 UTC (permalink / raw) To: Pedro Alves; +Cc: Daniel Gutson, gdb-patches Pedro> I think this should be "GDB" in caps. "apropos gdb" seems to Pedro> indicate that's how we spell it in the online help. Pedro> Otherwise looks fine to me. Here is what I am checking in. Tom 2014-04-25 Tom Tromey <tromey@redhat.com> * cli/cli-cmds.c (_initialize_cli_cmds): Document "quit" command's argument. diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index bfcd975..a5ef9c6 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1685,7 +1685,11 @@ strict == evaluate script according to filename extension, error if not supporte show_script_ext_mode, &setlist, &showlist); - add_com ("quit", class_support, quit_command, _("Exit gdb.")); + add_com ("quit", class_support, quit_command, _("\ +Exit gdb.\n\ +Usage: quit [EXPR]\n\ +The optional expression EXPR, if present, is evaluated and the result\n\ +used as GDB's exit code. The default is zero.")); c = add_com ("help", class_support, help_command, _("Print list of commands.")); set_cmd_completer (c, command_completer); ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 17:49 ` Tom Tromey 2014-04-23 17:57 ` Pedro Alves @ 2014-04-23 18:17 ` Paul_Koning 2014-04-23 18:23 ` Tom Tromey 1 sibling, 1 reply; 14+ messages in thread From: Paul_Koning @ 2014-04-23 18:17 UTC (permalink / raw) To: tromey; +Cc: alves.ped, daniel.gutson, gdb-patches On Apr 23, 2014, at 1:49 PM, Tom Tromey <tromey@redhat.com> wrote: > Pedro> Would it be good if the online help and the manual agreed a bit > Pedro> more? The manual says "quit [expression]": > > Yeah, I forgot it can be an expression. > > What do you think of this? > > Tom > > diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c > index bfcd975..0eff952 100644 > --- a/gdb/cli/cli-cmds.c > +++ b/gdb/cli/cli-cmds.c > @@ -1685,7 +1685,11 @@ strict == evaluate script according to filename extension, error if not supporte > show_script_ext_mode, > &setlist, &showlist); > > - add_com ("quit", class_support, quit_command, _("Exit gdb.")); > + add_com ("quit", class_support, quit_command, _("\ > +Exit gdb.\n\ > +Usage: quit [EXPR]\n\ > +The optional expression EXPR, if present, is evaluated and the result\n\ > +used as gdb's exit code. The default is zero.")); > c = add_com ("help", class_support, help_command, > _("Print list of commands.")); > set_cmd_completer (c, command_completer); Is the default actually zero? The help that Pedro quoted says that the default is successful exit. On Unix, that’s zero, but on VMS, it’s one. paul ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 18:17 ` Paul_Koning @ 2014-04-23 18:23 ` Tom Tromey 2014-04-23 20:53 ` Daniel Gutson 0 siblings, 1 reply; 14+ messages in thread From: Tom Tromey @ 2014-04-23 18:23 UTC (permalink / raw) To: Paul_Koning; +Cc: alves.ped, daniel.gutson, gdb-patches >>>>> "Paul" == <Paul_Koning@Dell.com> writes: Paul> Is the default actually zero? The help that Pedro quoted says that Paul> the default is successful exit. On Unix, that’s zero, but on VMS, Paul> it’s one. Yeah, see top.c:quit_force. Tom ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 18:23 ` Tom Tromey @ 2014-04-23 20:53 ` Daniel Gutson 2014-04-23 20:55 ` Daniel Gutson 0 siblings, 1 reply; 14+ messages in thread From: Daniel Gutson @ 2014-04-23 20:53 UTC (permalink / raw) To: Tom Tromey; +Cc: Paul_Koning, alves.ped, gdb-patches On Wed, Apr 23, 2014 at 3:22 PM, Tom Tromey <tromey@redhat.com> wrote: >>>>>> "Paul" == <Paul_Koning@Dell.com> writes: > > Paul> Is the default actually zero? The help that Pedro quoted says that > Paul> the default is successful exit. On Unix, that’s zero, but on VMS, > Paul> it’s one. > > Yeah, see top.c:quit_force. Thanks for the review, should I update the patch or you will update and commit it for me? > > Tom -- Daniel F. Gutson Chief Engineering Officer, SPD San Lorenzo 47, 3rd Floor, Office 5 Córdoba, Argentina Phone: +54 351 4217888 / +54 351 4218211 Skype: dgutson ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: specifying gdb's exit code 2014-04-23 20:53 ` Daniel Gutson @ 2014-04-23 20:55 ` Daniel Gutson 0 siblings, 0 replies; 14+ messages in thread From: Daniel Gutson @ 2014-04-23 20:55 UTC (permalink / raw) To: Tom Tromey; +Cc: Paul_Koning, alves.ped, gdb-patches On Wed, Apr 23, 2014 at 5:53 PM, Daniel Gutson <daniel.gutson@tallertechnologies.com> wrote: > On Wed, Apr 23, 2014 at 3:22 PM, Tom Tromey <tromey@redhat.com> wrote: >>>>>>> "Paul" == <Paul_Koning@Dell.com> writes: >> >> Paul> Is the default actually zero? The help that Pedro quoted says that >> Paul> the default is successful exit. On Unix, that’s zero, but on VMS, >> Paul> it’s one. >> >> Yeah, see top.c:quit_force. > > Thanks for the review, should I update the patch > or you will update and commit it for me? (please note that I don't have write access) > >> >> Tom > > > > -- > > Daniel F. Gutson > Chief Engineering Officer, SPD > > > San Lorenzo 47, 3rd Floor, Office 5 > > Córdoba, Argentina > > > Phone: +54 351 4217888 / +54 351 4218211 > > Skype: dgutson -- Daniel F. Gutson Chief Engineering Officer, SPD San Lorenzo 47, 3rd Floor, Office 5 Córdoba, Argentina Phone: +54 351 4217888 / +54 351 4218211 Skype: dgutson ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-04-25 15:44 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAF5HaEVTZAxc0FNR9GnGNKJqxGSrbQaTfZ7ZRMoueTg6jQyL8A@mail.gmail.com>
[not found] ` <CAF5HaEWDv6Gb2m-iDpzcM4y_ybkT46R1b96xxdS9buLHbsgwRQ@mail.gmail.com>
[not found] ` <CADPb22RS0J3X8hcBiUiDPp62RYiKPE4vCSPV5WEMUF01KzsiLg@mail.gmail.com>
[not found] ` <CAF5HaEV3wMHXfk3jLmbY-E6XAaZSmBRhzDjo2BvhQ7NbvvCtZQ@mail.gmail.com>
2014-04-17 21:52 ` specifying gdb's exit code Daniel Gutson
2014-04-22 12:37 ` Daniel Gutson
2014-04-23 17:11 ` Tom Tromey
2014-04-23 17:29 ` Eli Zaretskii
2014-04-23 17:29 ` Pedro Alves
2014-04-23 17:36 ` Paul_Koning
2014-04-23 17:46 ` Pedro Alves
2014-04-23 17:49 ` Tom Tromey
2014-04-23 17:57 ` Pedro Alves
2014-04-25 15:44 ` Tom Tromey
2014-04-23 18:17 ` Paul_Koning
2014-04-23 18:23 ` Tom Tromey
2014-04-23 20:53 ` Daniel Gutson
2014-04-23 20:55 ` Daniel Gutson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox