This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] stepi/nexti: skip signal handler if "handle nostop" signal arrives
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 15 Oct 2014 14:40:49 +0100
- Subject: Re: [PATCH] stepi/nexti: skip signal handler if "handle nostop" signal arrives
- Authentication-results: sourceware.org; auth=none
- References: <1413308910-30423-1-git-send-email-palves at redhat dot com> <83ppdu5wx7 dot fsf at gnu dot org> <543D7044 dot 2000703 at redhat dot com> <83oate5uec dot fsf at gnu dot org>
On 10/14/2014 08:22 PM, Eli Zaretskii wrote:
>> Date: Tue, 14 Oct 2014 19:49:40 +0100
>> From: Pedro Alves <palves@redhat.com>
> I think this text mixes 2 different things: (1) how the signal
> handling affects whether the signal gets to the program or not, and is
> it announced or not; and (2) the fine details of when the signal
> becomes "known" to the program and how stepping commands affect and
> are affected by that.
>
> It might be the simplest to separate the two issues, and describe each
> one on its own.
I'll give that a try.
>
>>>> +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).
>>>
>>> Again, this left me wondering. E.g., if the program stops for a
>>> signal, then we are already in the signal handler, no?
>>
>> No, we intercept the signal before the program sees it. See above.
>
> But you wrote "the program stops for a signal". "The program stops"
> means (or at least could be interpreted as meaning) the signal was
> already seen by the program, and the program then stopped.
>
> See how this is confusing?
I don't see how one would be confused, as the paragraph just above
says "When a signal stops your program", and I feel that the that
wording I chose follows naturally from that.
But, anyway, I'll try to clarify this.
>>> So the fact
>>> that stepping commands continue there is a no-brainer, right? Or a I
>>> again confused?
>>
>> The latter. :-)
>
> Then our readers will be even more confused.
Eheh, so true... I often say that myself.
I'll come up with a new version once I have a chance.
Thanks,
Pedro Alves