From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 25B763858C36; Tue, 27 Feb 2024 15:18:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25B763858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709047106; bh=0hkVo6kFmEqJHIcJCIk0GtSZx5qaZqkEEGLYLS4jWaM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NSOg1YgIeP9mf3QO/V3X0h99Gp420yl6eZyDFey++9u/s/ganhq/rZ8wd2ly2o4X4 eRUck8+jV5SD0tE9Y7qZeM9zLZs7KLBv9eoesb0w3HR7RLuW4RMPkA+HUbOUWqiK42 3wA6SibQ5Jfiyc4Qg0UKitwU6S1cdau5jZ9SSVDk= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/31391] Incorrect FinishBreakpoint test Date: Tue, 27 Feb 2024 15:18:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31391 --- Comment #4 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dcfb9cb1afd93= dc71ea94ec7c7d9bfc0e43ace0bc commit cfb9cb1afd93dc71ea94ec7c7d9bfc0e43ace0bc Author: Tom de Vries Date: Tue Feb 27 16:18:32 2024 +0100 [gdb/testsuite] Fix test in gdb.python/py-finish-breakpoint.exp With test-case gdb.python/py-finish-breakpoint.exp, we run into: ... (gdb) python print (finishbp_default.hit_count) Traceback (most recent call last): File "", line 1, in RuntimeError: Breakpoint 3 is invalid. Error while executing Python code. (gdb) PASS: gdb.python/py-finish-breakpoint.exp: normal conditions: \ check finishBP on default frame has been hit ... The test producing the pass is: ... gdb_test "python print (finishbp_default.hit_count)" "1.*" \ "check finishBP on default frame has been hit" ... so the pass is produced because the 1 in "line 1" matches "1.*". Temporary breakpoints are removed when hit, and consequently accessing = the hit_count attribute of a temporary python breakpoint (gdb.Breakpoint cl= ass) is not possible, and as per spec we get a RuntimeError. So the RuntimeError is correct, and not specific to finish breakpoints. The test presumably attempts to match: ... (gdb) python print (finishbp_default.hit_count) 1 ... but most likely this output was never produced by any gdb version. Fix this by checking whether the finishbp_default breakpoint has hit by checking that finishbp_default.is_valid() is False. Tested on aarch64-linux. Approved-By: Tom Tromey PR testsuite/31391 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31391 --=20 You are receiving this mail because: You are on the CC list for the bug.=