From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 09EC2385840D; Wed, 24 Jan 2024 14:04:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09EC2385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706105064; bh=kZqfoMs1+NgErreqH//IBhGpy8gawmNfJw2wfI5wrQw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sVi61Xtx1fVUsQoiE4sFjFSJ2SVY3dnWIzmK8OYjDywM9Nq0LjUo13GPshaxKn5Sj yUMorjlq9B1JUUWN3jT3o4ZLj/fNoKQfF80g/k2BsDWfTcgJ7lI5QEZlcN9N6pW7Ye 2cSPAjle3HIafcy+sl0w70i57Dvwqf8ev1KlGo6A= From: "j3.soon777 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug python/29603] Python Watchpoints are not deleted Date: Wed, 24 Jan 2024 14:04:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: j3.soon777 at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status 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=3D29603 Johnson Sun changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #6 from Johnson Sun --- (In reply to Hannes Domani from comment #5) > (In reply to Sourceware Commits from comment #4) > > The master branch has been updated by Simon Marchi : > >=20 > > https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git; > > h=3D6e96d8a9702d1fef3eb6de47bb84bdea578eb1bb > >=20 > > commit 6e96d8a9702d1fef3eb6de47bb84bdea578eb1bb > > Author: Johnson Sun > > Date: Thu May 11 23:46:20 2023 +0800 > >=20 > > Disable out-of-scope watchpoints > >=20=20=20=20=20 > > Currently, when a local software watchpoint goes out of scope, GDB = sets > > the watchpoint's disposition to `delete at next stop' and then norm= al > > stops (i.e., stop and wait for the next GDB command). When GDB norm= al > > stops, it automatically deletes the breakpoints with their disposit= ion > > set to `delete at next stop'. > >=20=20=20=20=20 > > Suppose a Python script decides not to normal stop when a local > > software watchpoint goes out of scope, the watchpoint will not be > > automatically deleted even when its disposition is set to > > `delete at next stop'. > >=20=20=20=20=20 > > Since GDB single-steps the program and tests the watched expression > > after each instruction, not deleting the watchpoint causes the > > watchpoint to be hit many more times than it should, as reported in > > PR python/29603. > >=20=20=20=20=20 > > This was happening because the watchpoint is not deleted or disabled > > when going out of scope. > >=20=20=20=20=20 > > This commit fixes this issue by disabling the watchpoint when going= out > > of scope. It also adds a test to ensure this feature isn't regresse= d in > > the future. > >=20=20=20=20=20 > > Calling `breakpoint_auto_delete' on all kinds of stops (in > > `fetch_inferior_event') seem to solve this issue, but is in fact > > inappropriate, since `breakpoint_auto_delete' goes over all breakpo= ints > > instead of just going through the bpstat chain (which only contains= the > > breakpoints that were hit right now). > >=20=20=20=20=20 > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29603 > > Change-Id: Ia85e670b2bcba2799219abe4b6be3b582387e383 >=20 > Can this be closed? Yes, this can be closed. Thank you for the reminder. --=20 You are receiving this mail because: You are on the CC list for the bug.=