Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb: improve usage strings
Date: Mon, 13 Aug 2012 20:29:00 -0000	[thread overview]
Message-ID: <CADPb22TPz3PsJW4_Xw+sgVrZyY-2GaqatfSdDeH4W35VhyOSgA@mail.gmail.com> (raw)
In-Reply-To: <1344823549-24684-1-git-send-email-vapier@gentoo.org>

On Sun, Aug 12, 2012 at 7:05 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> [...]
> diff --git a/gdb/infcmd.c b/gdb/infcmd.c
> index d56503c..78bfc04 100644
> --- a/gdb/infcmd.c
> +++ b/gdb/infcmd.c
> @@ -3017,40 +3017,45 @@ The target will wait for another debugger to connect.  Not available for\n\
>  all targets."));
>
>    c = add_com ("signal", class_run, signal_command, _("\
> -Continue program giving it signal specified by the argument.\n\
> -An argument of \"0\" means continue program without giving it a signal."));
> +Continue program and simultaneously send it the specified signal.\n\
> +Usage: signal SIGNAL\n\
> +An argument of \"0\" means continue the program without sending it a signal."));
>    set_cmd_completer (c, signal_completer);

That's ok I guess.  How about "Continue program with the specified signal." ?

Also, it would be good to augment the docs for "sig 0" to denote it
can be used to resume a program and discard the signal that is pending
for it, and would otherwise receive if you did a "continue".  It's
kinda implicit in the existing wording, but I've seen a few cases
where more clarity would have helped.

How about:

An argument of "0" means continue the program without sending it a signal.
This is useful in cases where the program stopped because of a signal,
and you want to resume the program and discard the signal.

Or some such.

E.g. [I'm just using SIGINT as an example here.]

(gdb) handle SIGINT stop print pass
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) y

Signal        Stop      Print   Pass to program Description
SIGINT        Yes       Yes     Yes             Interrupt
(gdb) r
Starting program: /home/dje/forever.x64
  C-c C-c
Program received signal SIGINT, Interrupt.
0x00007ffff7b04680 in __nanosleep_nocancel ()
    at ../sysdeps/unix/syscall-template.S:82
82      ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) sig 0
Continuing with no signal.
  C-c C-c
Program received signal SIGINT, Interrupt.
0x00007ffff7b04680 in __nanosleep_nocancel ()
    at ../sysdeps/unix/syscall-template.S:82
82      in ../sysdeps/unix/syscall-template.S
(gdb) c
Continuing.

Program terminated with signal SIGINT, Interrupt.
The program no longer exists.
(gdb)


  reply	other threads:[~2012-08-13 20:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-11 16:55 [PATCH] " Mike Frysinger
2012-08-11 17:16 ` Eli Zaretskii
2012-08-11 17:36   ` Mike Frysinger
2012-08-11 17:52     ` Eli Zaretskii
2012-08-11 18:08       ` Mike Frysinger
2012-08-14 15:08         ` Tom Tromey
2012-08-12  5:06     ` Doug Evans
2012-08-12  5:10       ` Mike Frysinger
2012-08-12 17:35       ` Eli Zaretskii
2012-08-13  2:06 ` [PATCH v2] " Mike Frysinger
2012-08-13 20:29   ` Doug Evans [this message]
2012-08-14  5:13     ` Mike Frysinger
2012-08-23 11:11     ` Pedro Alves
2012-08-14  5:29 ` [PATCH v3] " Mike Frysinger
2012-08-14 17:34   ` Doug Evans
2012-08-14 18:10     ` Eli Zaretskii
2012-08-15  1:58       ` Mike Frysinger
2012-08-15  7:22         ` Regression for gdb.base/help.exp [Re: [PATCH v3] gdb: improve usage strings] Jan Kratochvil
2012-08-15 16:25           ` Mike Frysinger
2012-08-15 16:27             ` Doug Evans
2012-08-20  4:29             ` Sergio Durigan Junior
2012-08-17  3:06           ` Mike Frysinger
2012-08-23 16:26         ` further improve "handle" help string Pedro Alves
2012-08-23 16:44           ` Eli Zaretskii
2012-08-23 17:18           ` Mike Frysinger
2012-08-23 17:38             ` Pedro Alves
2012-08-23 11:11     ` [PATCH v3] gdb: improve usage strings Pedro Alves
2012-08-23 16:45       ` 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=CADPb22TPz3PsJW4_Xw+sgVrZyY-2GaqatfSdDeH4W35VhyOSgA@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.org \
    /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