This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: fix handling of catch signal SIGTRAP/SIGINT


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]