From patchwork Tue Sep 16 14:25:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 2860 Received: (qmail 9630 invoked by alias); 16 Sep 2014 14:26:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 9618 invoked by uid 89); 16 Sep 2014 14:26:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, 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 14:26:01 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8GEPrUF028058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 16 Sep 2014 10:25:54 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8GEPpvu002064; Tue, 16 Sep 2014 10:25:52 -0400 Message-ID: <5418486F.7030506@redhat.com> Date: Tue, 16 Sep 2014 15:25:51 +0100 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> <54183ACC.7060001@redhat.com> In-Reply-To: <54183ACC.7060001@redhat.com> On 09/16/2014 02:27 PM, Pedro Alves wrote: > On 09/16/2014 02:23 PM, Pierre Muller wrote: >>> + 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 > I've pushed the obvious fix. Thanks again Pierre. --------- From 635856f584de7af4b21bb72688c05cd6d9a0aec6 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 16 Sep 2014 14:27:57 +0100 Subject: [PATCH] Fix watchpoint-stops-at-right-insn.exp Silly typo... gdb/testsuite/ 2014-09-16 Pedro Alves * gdb.base/watchpoint-stops-at-right-insn.exp (test): Compare software and hardware addresses, not software address against itself. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c2588d3..c06ba4d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2014-09-16 Pedro Alves + * gdb.base/watchpoint-stops-at-right-insn.exp (test): Compare + software and hardware addresses, not software address against + itself. + +2014-09-16 Pedro Alves + * gdb.base/watchpoint-stops-at-right-insn.c: New file. * gdb.base/watchpoint-stops-at-right-insn.exp: New file. diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp index 9ad6080..6039c4c 100644 --- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp +++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp @@ -168,7 +168,7 @@ proc test {always_inserted} { set hw_watch_pc [get_pc "get hw watchpoint PC"] - gdb_assert {$sw_watch_pc == $sw_watch_pc} "hw watchpoint stops at right instruction" + gdb_assert {$sw_watch_pc == $hw_watch_pc} "hw watchpoint stops at right instruction" } }