Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <pedro@codesourcery.com>
Cc: brobecker@adacore.com, gdb-patches@sourceware.org
Subject: Re: PR7580 - Command to force abort when internal error
Date: Fri, 09 Jan 2009 14:25:00 -0000	[thread overview]
Message-ID: <uy6xkk146.fsf@gnu.org> (raw)
In-Reply-To: <200901072159.29879.pedro@codesourcery.com>

> From: Pedro Alves <pedro@codesourcery.com>
> Date: Wed, 7 Jan 2009 21:59:29 +0000
> Cc: gdb-patches@sourceware.org,
>  Eli Zaretskii <eliz@gnu.org>
> 
> Eli, is the documentation piece OK?

Yes, but I have a few comments.  See below.

> +const char internal_problem_ask[] = "ask";
> +const char internal_problem_yes[] = "yes";
> +const char internal_problem_no[] = "no";

Don't we want these strings to be translatable?  The questions we ask
about what to do are.

> +/* When GDB reports an internal problem (error or warning) it gives
> +   the user the opportunity to quit GDB and/or create a core file of
> +   the current debug session.  This function registers a few commands
> +   that make it possible to specify that GDB should always or never
> +   quit or create a core file, without asking.  The commands look
> +   like:
> +
> +   maint set PROBLEM-NAME quit ask|yes|no
> +   maint show PROBLEM-NAME quit
> +   maint set PROBLEM-NAME corefile ask|yes|no
> +   maint show PROBLEM-NAME corefile
> +
> +   Where PROBLEM-NAME is currently "internal-error" or
> +   "internal-warning".  */

I'd love to have this important infrastructure documented in
gdbint.texinfo.

> +  set_doc = xstrprintf (_("Configure what GDB does when an %s is detected."),
> +			problem->name);
> +
> +  show_doc = xstrprintf (_("Show what GDB does when an %s is detected."),
> +			 problem->name);

I would lose the "an" part: this is general infrastructure, so even if
all the currently known problem names fit "an", we cannot guarantee
that to be so in the future.  There's no need here for an article,
anyway, as something like

   Show what GDB does when FOO is detected.

sounds perfectly correct English to me.

> +  set_doc = xstrprintf (_("\
> +Set whether GDB should quit when an %s is detected"),
> +			problem->name);
> +  show_doc = xstrprintf (_("\
> +Show whether GDB will quit when an %s is detected"),
> +			 problem->name);

Same here.

> +  set_doc = xstrprintf (_("\
> +Set whether GDB should create a core file of GDB when an %s is detected"),
> +			problem->name);
> +  show_doc = xstrprintf (_("\
> +Show whether GDB will create a core file of GDB when an %s is detected"),
> +			 problem->name);

And here.

> +@kindex maint set internal-error quit
> +@kindex maint show internal-error quit
> +@kindex maint set internal-error corefile
> +@kindex maint show internal-error corefile
> +@kindex maint set internal-warning quit
> +@kindex maint show internal-warning quit
> +@kindex maint set internal-warning corefile
> +@kindex maint show internal-warning corefile
> +@item maint set internal-error quit [ask|yes|no]
> +@itemx maint show internal-error quit
> +@itemx maint set internal-error corefile [ask|yes|no]
> +@itemx maint show internal-error corefile
> +@itemx maint set internal-warning quit [ask|yes|no]
> +@itemx maint show internal-warning quit
> +@itemx maint set internal-warning corefile [ask|yes|no]
> +@itemx maint show internal-warning corefile

There's no need for listing all the possible ACTIONs here.  It is
enough to say

 @kindex maint set internal-error
 @kindex maint show internal-error
 @item maint set internal-error @var{action} [ask|yes|no]
 @itemx maint show internal-error @var{action}

and then list all the possible values of @var{action} and explain
them.  As a nice side-effect, this will always make the index less
cluttered.

I would also add here another index entry, for those who don't
remember or don't know the command's name, but are still looking for
this information.  How about

 @cindex @value{GDBN} internal error
 @cindex internal errors, control of @value{GDBN} behavior

?

Other than that, this is fine; thanks.


  reply	other threads:[~2009-01-09 14:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29  3:35 Pedro Alves
2008-12-29  4:41 ` Joel Brobecker
2008-12-29 14:27   ` Pedro Alves
2008-12-31  3:57     ` Joel Brobecker
2009-01-07 21:59       ` Pedro Alves
2009-01-09 14:25         ` Eli Zaretskii [this message]
2009-01-09 15:33           ` Andreas Schwab
2009-01-09 18:16             ` Eli Zaretskii
2009-01-09 20:01               ` Andreas Schwab
2009-01-09 20:07                 ` Eli Zaretskii
2009-01-09 20:15                   ` Andreas Schwab
2009-01-09 20:26                     ` Eli Zaretskii
2009-01-09 21:37                       ` Andreas Schwab
2009-01-10  9:04                         ` Eli Zaretskii
2009-01-25 23:19                           ` Pedro Alves
2009-01-26  3:53                             ` Eli Zaretskii
2009-01-26 16:27                               ` Pedro Alves
2009-01-09 18:29           ` Joel Brobecker
2009-01-09 20:11             ` Eli Zaretskii
2009-01-10  6:34               ` Daniel Jacobowitz
2009-01-09 20:36             ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uy6xkk146.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox