From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53342 invoked by alias); 14 Jan 2016 17:12:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 53330 invoked by uid 89); 14 Jan 2016 17:12:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 14 Jan 2016 17:12:45 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 0EE3EC40AC; Thu, 14 Jan 2016 17:12:44 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0EHCgdH025467; Thu, 14 Jan 2016 12:12:43 -0500 Message-ID: <5697D70A.1070602@redhat.com> Date: Thu, 14 Jan 2016 17:12:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sourceware.org Subject: Re: [PATCH+doc] Fix PR threads/19422 - show which thread caused stop References: <1451950202-18024-1-git-send-email-palves@redhat.com> <5697ABE8.7060705@redhat.com> <83ziw8gltt.fsf@gnu.org> In-Reply-To: <83ziw8gltt.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00310.txt.bz2 On 01/14/2016 04:36 PM, Eli Zaretskii wrote: > >> From: Pedro Alves >> 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