From: Pedro Alves <palves@redhat.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: Eli Zaretskii <eliz@gnu.org>, Doug Evans <dje@google.com>,
gdb-patches@sourceware.org
Subject: Re: further improve "handle" help string
Date: Thu, 23 Aug 2012 17:38:00 -0000 [thread overview]
Message-ID: <50366A70.2010602@redhat.com> (raw)
In-Reply-To: <201208231318.36988.vapier@gentoo.org>
On 08/23/2012 06:18 PM, Mike Frysinger wrote:
> On Thursday 23 August 2012 12:26:32 Pedro Alves wrote:
>> Multiple signals may be specified. Signal numbers and signal names
>> may be interspersed with actions, with the actions being performed for
>> all signals cumulatively specified.
>
> this doesn't accurately describe real world behavior (but maybe that's a
> bug?). this is why i avoided that aspect in the first place :(.
> for example:
> (gdb) handle SIGHUP SIGUSR1 SIGUSR2 SIGPWR
> Signal Stop Print Pass to program Description
> SIGHUP Yes Yes Yes Hangup
> SIGUSR1 Yes Yes Yes User defined signal 1
> SIGUSR2 Yes Yes Yes User defined signal 2
> SIGPWR Yes Yes Yes Power fail/restart
> (gdb) handle SIGHUP SIGUSR1 SIGUSR2 nostop SIGPWR
> Signal Stop Print Pass to program Description
> SIGHUP No Yes Yes Hangup
> SIGUSR1 No Yes Yes User defined signal 1
> SIGUSR2 No Yes Yes User defined signal 2
> SIGPWR Yes Yes Yes Power fail/restart
> (gdb) handle SIGPWR
> Signal Stop Print Pass to program Description
> SIGPWR Yes Yes Yes Power fail/restart
> (gdb) handle SIGHUP SIGUSR1 SIGUSR2 SIGPWR nostop
> Signal Stop Print Pass to program Description
> SIGHUP No Yes Yes Hangup
> SIGUSR1 No Yes Yes User defined signal 1
> SIGUSR2 No Yes Yes User defined signal 2
> SIGPWR No Yes Yes Power fail/restart
>
> so saying "all signals cumulatively" is not how the code is behaving.
I had interpreted "cumulatively" as what the code is doing. As in,
"all signals specified so far, when the action is parsed". That's what
we see above. Another e.g.,
(gdb) handle SIGHUP SIGUSR1 noprint SIGUSR2 SIGPWR nopass
Signal Stop Print Pass to program Description
SIGHUP No No No Hangup
SIGUSR1 No No No User defined signal 1
SIGUSR2 Yes Yes No User defined signal 2
SIGPWR Yes Yes No Power fail/restart
IOW, I interpreted it as "noprint" (implies nostop) applying to all signals
accumulated that far (SIGHUP, SIGUSR1), and then "nopass" applying to
all accumulated signals at the end (all 4).
Consequently, this:
(gdb) handle SIGHUP SIGUSR1 pass SIGUSR2 SIGPWR nopass
Sets all signals to "nopass".
I don't frequently intersperse. Rather, I do things like:
handle SIGTRAP SIG34 SIG35 pass nostop noprint
I have already applied the patch, but if we want to change the
behavior, or the text, that's fine with me.
--
Pedro Alves
next prev parent reply other threads:[~2012-08-23 17:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-11 16:55 [PATCH] gdb: improve usage strings 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
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 [this message]
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=50366A70.2010602@redhat.com \
--to=palves@redhat.com \
--cc=dje@google.com \
--cc=eliz@gnu.org \
--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