From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1983) id 2D1C53858D38; Wed, 12 Oct 2022 20:59:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D1C53858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665608365; bh=AKk4OXAO9bkvS8l8h7GVVZ06ygaB4PNIhDTeh0lKYBs=; h=From:To:Subject:Date:From; b=u24Zq+quVg8DauT1GV/kIjv2YSgW+Uugs2BzHdnfTTInOsmH+6d0PTUR/eitMesB0 AOGhmsPaptktsSiIU0KRylFy2xEmvSI2VLbXzL8nvItPbb0cYqK8l/t2saXWJNUeBf bF7lBO61n1LJiyf3dYaM22ETW0ikbh0gFZfHAJSE= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Carl Love To: gdb-cvs@sourceware.org Subject: [binutils-gdb] PowerPC, fix test gdb.base/watchpoint-stops-at-right-insn.exp X-Act-Checkin: binutils-gdb X-Git-Author: Carl Love X-Git-Refname: refs/heads/master X-Git-Oldrev: c0f327b81d1e46a9f860f3796eafc49d83b3d257 X-Git-Newrev: e610d38f83248ba2cbea4d8735c3f7ee5953a38b Message-Id: <20221012205925.2D1C53858D38@sourceware.org> Date: Wed, 12 Oct 2022 20:59:25 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De610d38f8324= 8ba2cbea4d8735c3f7ee5953a38b commit e610d38f83248ba2cbea4d8735c3f7ee5953a38b Author: Carl Love Date: Wed Oct 12 16:58:25 2022 -0400 PowerPC, fix test gdb.base/watchpoint-stops-at-right-insn.exp =20 Test gdb.base/watchpoint-stops-at-right-insn.exp generates 4 test errors on Power 9. The test uses the test [target_info exists gdb, no_hardware_watchpoints] to determine if the processor supports hardware watchpoints. The check only examines the processor type to determine if it supports hardware watchpoints. Note, the test works fine on Power 1= 0. =20 The PowerPC processors support hardware watchpoints with the exception of Power 9. The hardware watchpoint support is disabled on Power 9. The test skip_hw_watchpoint_tests must be used to correctly determine if the PowerPC processor supports hardware watchpoints. =20 This patch replaces the [target_info exists gdb,no_hardware_watchpoints] with the skip_hw_watchpoint_tests_p check. With the patch, the test is disabled on Power 9 but runs on all other PowerPC processors. =20 The patch has been tested on Power 9, Power 10 and X86-64 with no regression failures. Diff: --- gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gd= b/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp index f9adb1f4f91..6c445d4cbd8 100644 --- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp +++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp @@ -71,7 +71,7 @@ standard_testfile =20 # No use testing this if we can't use hardware watchpoints. -if {[target_info exists gdb,no_hardware_watchpoints]} { +if {[skip_hw_watchpoint_tests]} { return -1 }