This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH+doc] Fix PR threads/19422 - show which thread caused stop
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 14 Jan 2016 17:12:42 +0000
- Subject: Re: [PATCH+doc] Fix PR threads/19422 - show which thread caused stop
- Authentication-results: sourceware.org; auth=none
- References: <1451950202-18024-1-git-send-email-palves at redhat dot com> <5697ABE8 dot 7060705 at redhat dot com> <83ziw8gltt dot fsf at gnu dot org>
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