From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102077 invoked by alias); 22 Jan 2016 16:55:11 -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 102064 invoked by uid 89); 22 Jan 2016 16:55:11 -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=aspect, Hx-languages-length:1811, watchpoints, UD:watchpoint-hw-hit-once.exp 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; Fri, 22 Jan 2016 16:55:10 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id C52ADC0AC934 for ; Fri, 22 Jan 2016 16:55:08 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0MGt7jX016242; Fri, 22 Jan 2016 11:55:08 -0500 Message-ID: <56A25EEB.306@redhat.com> Date: Fri, 22 Jan 2016 16:55: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: Jan Kratochvil 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> <20160122164429.GA28687@host1.jankratochvil.net> In-Reply-To: <20160122164429.GA28687@host1.jankratochvil.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00573.txt.bz2 On 01/22/2016 04:44 PM, Jan Kratochvil wrote: > On Thu, 14 Jan 2016 15:08:40 +0100, Pedro Alves wrote: > [...] >> * gdb.base/watchpoint-hw-hit-once.exp: Adjust expected output. > [...] >> diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp >> index 5c1be00..46d5c62 100644 >> --- a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp >> +++ b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp >> @@ -31,7 +31,7 @@ gdb_test "rwatch watchee" >> >> gdb_breakpoint [gdb_get_line_number "dummy = 2"] >> >> -gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*" >> +gdb_test "continue" "Continuing.\r\n\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*" > > I haven't seen a comment why such change is necessary. It probably happens > from some of the changes involved but not sure if it was really required. Previously, all breakpoint hits had that extra line, except watchpoints. The patch made every breakpoint kind call the same function to print the breakpoint hit, which had the side effect of making that inconsistency disappear. That is, before we had: (gdb) c Continuing. Breakpoint 2, thread_function0 (arg=0x0) at /home/pedro/gdb/tests/threads.c:87 87 int_return (); (gdb) c Continuing. Hardware watchpoint 4: args[i] Old value = 0 New value = 1 main () at /home/pedro/gdb/tests/threads.c:57 57 res = pthread_create(&threads[i], Now watchpoint hits are consistent with all other breakpoints in that aspect: (gdb) c Continuing. Hardware watchpoint 2: args[i] Old value = 0 New value = 1 main () at /home/pedro/gdb/tests/threads.c:57 57 res = pthread_create(&threads[i], Thanks, Pedro Alves