From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A6FD23858D1E; Sun, 14 Jan 2024 14:26:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6FD23858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705242374; bh=vvBGP2OZI/PRlBaLBiH9WL0og7OYwCrbki3bQGGwMeQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V3ar/5Xdm+giM3VEdqdt/5DsZcLlk/255+IJSmeYrPFJyKu0t+RwvkKgK75eAeanJ z9wRU1A31Z87xdwldL6xB6lOmPMS9Og1gB0IaAqSN4mlt6jmLq7IYaNlFj5t7FKrvG BB1/3414FtMaMydkWsb5RIX2NoOkQ0vat+sSdAX0= From: "ssbssa at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug python/29603] Python Watchpoints are not deleted Date: Sun, 14 Jan 2024 14:26:13 +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: ssbssa at sourceware dot org X-Bugzilla-Status: UNCONFIRMED 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: cc 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 Hannes Domani changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ssbssa at sourceware dot o= rg --- Comment #5 from Hannes Domani --- (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 se= ts > the watchpoint's disposition to `delete at next stop' and then normal > stops (i.e., stop and wait for the next GDB command). When GDB normal > stops, it automatically deletes the breakpoints with their disposition > 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 o= ut > of scope. It also adds a test to ensure this feature isn't regressed = 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 breakpoin= ts > instead of just going through the bpstat chain (which only contains t= he > breakpoints that were hit right now). >=20=20=20=20=20 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29603 > Change-Id: Ia85e670b2bcba2799219abe4b6be3b582387e383 Can this be closed? --=20 You are receiving this mail because: You are on the CC list for the bug.=