[PATCH+doc] Fix PR threads/19422 - show which thread caused stop
Pedro Alves
palves@redhat.com
Thu Jan 14 17:12:00 GMT 2016
On 01/14/2016 04:36 PM, Eli Zaretskii wrote:
>
>> From: Pedro Alves <palves@redhat.com>
>> Subject: [PATCH] Fix PR threads/19422 - show which thread caused stop
>>
>> This commit changes GDB like this:
>>
>> - Program received signal SIGINT, Interrupt.
>> + Thread 1 "main" received signal SIGINT, Interrupt.
>>
>> - Breakpoint 1 at 0x40087a: file threads.c, line 87.
>> + Thread 3 "bar" hit Breakpoint 1 at 0x40087a: file threads.c, line 87.
>
> Would it make sense to lose the "hit" part, and have this say
>
> Thread 3 "bar": breakpoint 1 at 0x40087a: file threads.c, line 87.
>
Not sure. I kind of got used to how it was. Kind of the
counterpart of being explicit in saying "received", in the signal
case. If going that direction, I guess you'd also want:
Thread 1 "main": received signal SIGINT, Interrupt.
Thread 1 "main": signal SIGINT, Interrupt.
doesn't look right to me, for some reason. But it may just
be habituation.
> (Note that I also avoided capitalizing "breakpoint".)
>
Yeah, I initially thought of doing that as well, but then at least
with "hit", uppercase makes it easier to parse the message. At
least for me.
The second reason I didn't lower case is that it's easier to
implement not showing anything about threads until the program
goes multi-threaded this way, both in gdb and in the testsuite.
Otherwise we need extra logic.
The third reason I prefer the way it is, is that it's already
implemented this way. :-)
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list