This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix handling of catch signal SIGTRAP/SIGINT
- From: Pedro Alves <palves at redhat dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 03 May 2013 15:24:01 +0100
- Subject: Re: RFA: fix handling of catch signal SIGTRAP/SIGINT
- References: <1367433782 dot 2626 dot 142 dot camel at soleil> <5182B441 dot 3000703 at redhat dot com> <1367531384 dot 3007 dot 83 dot camel at soleil>
On 05/02/2013 10:49 PM, Philippe Waroquiers wrote:
>>From the doc and the above, I understand the idea is to have 3 different
> "use cases":
> 1. catch signal
> 2. catch signal all
> 3. catch signal ... 1 or more explicit signals ...
> (the explicit signals are the same as what can be given to handle).
> The line above properly implemented the difference between 1 and 2
> but was also used for signals listed in 3. This was ok for not internals
> signals, but was always ignoring internal signals member of
> signals_to_be_caught.
> So, I think the condition "|| !INTERNAL_SIGNAL" is still needed
> otherwise the case 1. will change of behaviour.
Indeed. Makes sense. I should have checked the manual.
>>From my point of view, the behaviour described by the doc is quite
> ok (but needs this patch :).
I agree.
> As described above, I think the '|| !INTERNAL_SIGNAL' is needed to
> only catch non internal signals when 'catch signal' was given by the
> user rather than 'catch signal all'.
Agreed.
>> There are other uses of INTERNAL_SIGNAL(signal_number) in the file.
>> Wouldn't they need updating too?
> I checked the other uses, I think these are ok e.g. INTERNAL_SIGNAL
> is not used when an explicit list of signal is given.
That's good info.
> Thanks for the detailed review. Waiting for more feedback from Tromey,
> I will already prepare another version.
Knowing the "catch signal" vs "catch signal all" difference, the updated
patch becomes obviously correct then. If you had sent it, I'd
probably okay it. ;-)
Thanks,
--
Pedro Alves