From patchwork Wed Jul 4 16:40:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 28237 Received: (qmail 58622 invoked by alias); 4 Jul 2018 16:40:24 -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 58610 invoked by uid 89); 4 Jul 2018 16:40:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1748 X-HELO: mail-wm0-f42.google.com Received: from mail-wm0-f42.google.com (HELO mail-wm0-f42.google.com) (74.125.82.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Jul 2018 16:40:22 +0000 Received: by mail-wm0-f42.google.com with SMTP id n17-v6so6795646wmh.2 for ; Wed, 04 Jul 2018 09:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id; bh=adXUfD6/TULCOd2yEcyQrRUKD5Y0VgHB0ZJpTjaCi+s=; b=CxPJJji1phPCXSjHD9IJ0xgPPQMXaQSssIsOW2wKKFPuuZFWjVU9vuFERMAWKopg9B 1LU0rL/g+DEUWxemVsc6DRecw/6Slb67T0Yv/SCklLlfR5LaxxybuobT6zSVRzG4nraj yYj7x7jOWuDUTWf1a3zQkKCjAo9AutMhgO5g5N69UA0DCxs5DIkNdXj7MgIP1fnbvOPe 7kVwhbdcq5BvHtlopSdygM6OOkidELP4M86FM97ghEKUvpBi4NMwGkid8cPgxnzR4YxG lD/P1kn8cOa+Q/ueqMjeXVU5Yv54DSrCTncmoDRhx13wgPO2/xJ2/cCWa+caQymeqPvL W2Qg== Return-Path: Received: from localhost (host86-164-199-62.range86-164.btcentralplus.com. [86.164.199.62]) by smtp.gmail.com with ESMTPSA id f2-v6sm4589775wre.16.2018.07.04.09.40.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 09:40:19 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH] gdb/testsuite: Run test when software watchpoints are used Date: Wed, 4 Jul 2018 17:40:17 +0100 Message-Id: <20180704164017.5849-1-andrew.burgess@embecosm.com> X-IsSubscribed: yes The test gdb.base/watchpoint-reuse-slot.exp can be run when software watchpoints are in use, we just need to update one test pattern to look for 'Watchpoint' instead of 'Hardware watchpoint' in one case. gdb/testsuite/ChangeLog: * gdb.base/watchpoint-reuse-slot.exp: Test can be run using software watchpoints, we just need to update a test pattern in one place. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp index f196b89eab..445c350ef2 100644 --- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp +++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp @@ -22,11 +22,6 @@ # operation. (Note that we don't have any of these watchpoints # trigger.) -if [target_info exists gdb,no_hardware_watchpoints] { - unsupported "no target support" - return -} - standard_testfile if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { @@ -193,8 +188,15 @@ proc watch_command {cmd base offset width} { gdb_test "hbreak $expr" "Hardware assisted breakpoint \[0-9\]+ at $hex" } elseif {$cmd == "watch"} { set expr "*(buf.byte + $base + $offset)@$width" + + if [target_info exists gdb,no_hardware_watchpoints] { + set wp_prefix "Watchpoint" + } else { + set wp_prefix "Hardware watchpoint" + } + gdb_test "$cmd $expr" \ - "Hardware watchpoint \[0-9\]+: [string_to_regexp $expr]" + "${wp_prefix} \[0-9\]+: [string_to_regexp $expr]" } elseif {$cmd == "awatch"} { set expr "*(buf.byte + $base + $offset)@$width" gdb_test "$cmd $expr" \