Time to expand "Program received signal" ?

Pedro Alves palves@redhat.com
Tue Nov 13 17:22:00 GMT 2012


On 11/13/2012 04:40 PM, Mark Kettenis wrote:
>> Date: Tue, 13 Nov 2012 08:25:30 -0800
>> From: Joel Brobecker <brobecker@adacore.com>
>>
>>> A patch like the below would result in:
>>>
>>>   Thread 2 [Thread 0x7ffff7fcf700 (LWP 12023) "sigstep-threads"] received signal SIGUSR1, User defined signal 1.
>> [...]
>>> An option to avoid the duplicate "Thread" would be to stick with the 
>>> current "stopped" output.
>> [...]
>>>   [Thread 0x7ffff7fcf700 (LWP 12023) "sigstep-threads"] #2 received signal SIGUSR1, User defined signal 1.
>>>   [Thread 0x7ffff7fd0740 (LWP 12019) "sigstep-threads"] #1 received signal SIGUSR1, User defined signal 1.
>>
>> FWIW, I think that your first choice is best. I don't think that
>> the "Thread" duplication is a problem, whereas I do indeed find
>> the #1/#2 confusing.
> 
> I do find the strings somewhat long though.  The lines wrap, and that
> distracts people from the important bit, which is that a signal was
> received.  Are people really interested in the bit between.  Isn't it
> better to print just:
> 
>   Thread 2 received signal SIGUSR1, User defined signal 1.
> 
> Folks can then use "info threads" to look at the details of the thread.

I've been hacking a bit today with a top gdb that has the patch
applied, and I've definitely come to agree.  The string is indeed too
long and distracting.  The idea was to have as much in a log as possible,
but I guess that if I want that, I can just issue extra "info threads".

-- 
Pedro Alves



More information about the Gdb mailing list