Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] stepi/nexti: skip signal handler if "handle nostop" signal arrives
Date: Tue, 14 Oct 2014 18:56:00 -0000	[thread overview]
Message-ID: <543D71CF.9070402@redhat.com> (raw)
In-Reply-To: <543D7044.2000703@redhat.com>

On 10/14/2014 07:49 PM, Pedro Alves wrote:
> On 10/14/2014 07:27 PM, Eli Zaretskii wrote:
>>> From: Pedro Alves <palves@redhat.com>
>>> Date: Tue, 14 Oct 2014 18:48:30 +0100
>>>
>>> --- a/gdb/doc/gdb.texinfo
>>> +++ b/gdb/doc/gdb.texinfo
>>> @@ -5526,6 +5526,11 @@ Their full names are:
>>>  @value{GDBN} should not stop your program when this signal happens.  It may
>>>  still print a message telling you that the signal has come in.
>>>  
>>> +If this signal arrives while a stepping command (e.g., @code{step}) is
>>> +in progress, the signal's handler is skipped (though still executed if
>>> +@code{pass} is in effect; see below).  @value{GDBN} will still stop
>>> +your program if the handler hits a breakpoint.
>>
>> This description is confusing.  For starters, it only mentions some of
>> the possible setting of signal handling, and keeps silence about the
>> rest.  Either we should describe what happens with all of them, one by
>> one, or (better) says something that will explain how we handle them
>> all, at once.
> 
> This paragraph is added to the "nostop" entry of the table.  It directly
> relates to the entry in question:
> 
> Specifically, it's a preemptive response to the question I'd have if
> I read the paragraph just above, which talks about the signal but
> leaves the question of the signal handler open:
> 
>  @table @code
>  @item nostop
>  @value{GDBN} should not stop your program when this signal happens.  It may
>  still print a message telling you that the signal has come in.
> 
>  If this signal arrives while a stepping command (e.g., @code{step}) is
>  in progress, the signal's handler is skipped (though still executed if
>  @code{pass} is in effect; see below).  @value{GDBN} will still stop
>  your program if the handler hits a breakpoint.
> 
> I could extend the "stop" item:
> 
>  @item stop
>  @value{GDBN} should stop your program when this signal happens.  This implies
>  the @code{print} keyword as well.
> 
> Like:
> 
> + The signal is not visible to the program until you continue.
> 
> WDYT?
> 
> 
> This is also said further below, after the table (and is what the
> "see below" referred to):
> 
>   When a signal stops your program, the signal is not visible to the
>   program until you
>   continue.  Your program sees the signal then, if @code{pass} is in
>   effect for the signal in question @emph{at that time}.  In other words,
>   after @value{GDBN} reports a signal, you can use the @code{handle}
>   command with @code{pass} or @code{nopass} to control whether your
>   program sees that signal when you continue.
> 
>  +If a stepping command is issued after the program stops for a signal,
>  +and @code{pass} is in effect for that signal, @value{GDBN} steps into
>  +the signal's handler (if the target supports it).
> 
> The '+' lines are what I'm adding.

Would this tweak below make it clearer?  The contrast against stepping
mainline code is really the point I'm trying to make:

 If a stepping command is issued after the program stops for a signal,
 and @code{pass} is in effect for that signal, @value{GDBN} steps into
 the signal's handler, instead of stepping the mainline code, if
 the target supports it.

Thanks,
Pedro Alves


  reply	other threads:[~2014-10-14 18:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14 17:48 Pedro Alves
2014-10-14 18:27 ` Eli Zaretskii
2014-10-14 18:49   ` Pedro Alves
2014-10-14 18:56     ` Pedro Alves [this message]
2014-10-14 19:22     ` Eli Zaretskii
2014-10-15 13:40       ` Pedro Alves
2014-10-15 14:31         ` Eli Zaretskii
2014-10-25 14:00           ` Pedro Alves
2014-10-27 17:39             ` Eli Zaretskii
2014-10-27 19:44               ` Pedro Alves
2014-10-27 19:58                 ` Eli Zaretskii
2014-10-27 20:34                   ` Pedro Alves
2014-10-15 11:12 ` Yao Qi
2014-10-15 13:44   ` 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=543D71CF.9070402@redhat.com \
    --to=palves@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.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