From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9060 invoked by alias); 16 Sep 2014 13:27:49 -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 9047 invoked by uid 89); 16 Sep 2014 13:27:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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; Tue, 16 Sep 2014 13:27:47 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8GDRgrm024187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 16 Sep 2014 09:27:42 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8GDRegt021158; Tue, 16 Sep 2014 09:27:41 -0400 Message-ID: <54183ACC.7060001@redhat.com> Date: Tue, 16 Sep 2014 13:27:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Pierre Muller , gdb-patches@sourceware.org Subject: Re: [pushed] Add test to make sure GDB knows which "kind" of watchpoint the target has References: <1410873512-762-1-git-send-email-palves@redhat.com> <000601cfd1b1$718bd600$54a38200$@muller@ics-cnrs.unistra.fr> In-Reply-To: <000601cfd1b1$718bd600$54a38200$@muller@ics-cnrs.unistra.fr> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00537.txt.bz2 On 09/16/2014 02:23 PM, Pierre Muller wrote: > Hi Pedro, > > I think there is a typo inside this: >> + set sw_watch_pc [get_pc "get sw watchpoint PC"] >> + >> + delete_breakpoints >> + >> + # Allow hardware watchpoints again. >> + gdb_test_no_output "set can-use-hw-watchpoints 1" >> + >> + gdb_test "watch global" \ >> + "Hardware watchpoint .*: global" \ >> + "set hardware watchpoint on global variable" >> + >> + gdb_test "continue" \ >> + "Hardware watchpoint .*: global.*Old value = 1.*New value = >> 2.*set_global \\(val=2\\).*$srcfile.*" \ >> + "hardware watchpoint triggers" >> + >> + set hw_watch_pc [get_pc "get hw watchpoint PC"] >> + >> + gdb_assert {$sw_watch_pc == $sw_watch_pc} "hw watchpoint stops at >> right instruction" > Shouldn't this be > {$sw_watch_pc == $hw_watch_pc}? Argh... Right you are. Many thanks, Pedro Alves