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 18:59:57 +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> <5697D70A dot 1070602 at redhat dot com> <83k2ncggqw dot fsf at gnu dot org>
On 01/14/2016 06:25 PM, Eli Zaretskii wrote:
>> Date: Thu, 14 Jan 2016 17:12:42 +0000
>> From: Pedro Alves <palves@redhat.com>
>> CC: gdb-patches@sourceware.org
>>
>>>> - 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.
>
> No: we already announce signals with "Program received signal". But
> with breakpoints, we just say "Breakpoint 1", not "Program hit
> breakpoint 1".
Sure. Following your suggestion ends up with:
Thread 1 "main": breakpoint 1
Thread 1 "main" received signal SIGINT, Interrupt.
which seems inconsistent to me. If you disregard how the
current/single-threaded output looks, it seems better to me
to be consistent at least when debugging multiple threads.
> Besides, "hit a breakpoint" is jargon, which is another reason I
> wanted to get rid of it.
What do you mean, jargon? GDB already uses the term:
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x000000000040073e in main at threads.c:40
breakpoint already hit 1 time
^^^^^^^^^^
Thanks,
Pedro Alves