public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "j3.soon777 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/29603] Python Watchpoints are not deleted
Date: Wed, 24 Jan 2024 14:04:22 +0000 [thread overview]
Message-ID: <bug-29603-4717-HXalPDoEvf@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29603-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=29603
Johnson Sun <j3.soon777 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #6 from Johnson Sun <j3.soon777 at gmail dot com> ---
(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 <simark@sourceware.org>:
> >
> > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
> > h=6e96d8a9702d1fef3eb6de47bb84bdea578eb1bb
> >
> > commit 6e96d8a9702d1fef3eb6de47bb84bdea578eb1bb
> > Author: Johnson Sun <j3.soon777@gmail.com>
> > Date: Thu May 11 23:46:20 2023 +0800
> >
> > Disable out-of-scope watchpoints
> >
> > Currently, when a local software watchpoint goes out of scope, GDB sets
> > 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'.
> >
> > 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'.
> >
> > 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.
> >
> > This was happening because the watchpoint is not deleted or disabled
> > when going out of scope.
> >
> > 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 regressed in
> > the future.
> >
> > 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 breakpoints
> > instead of just going through the bpstat chain (which only contains the
> > breakpoints that were hit right now).
> >
> > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29603
> > Change-Id: Ia85e670b2bcba2799219abe4b6be3b582387e383
>
> Can this be closed?
Yes, this can be closed. Thank you for the reminder.
--
You are receiving this mail because:
You are on the CC list for the bug.
prev parent reply other threads:[~2024-01-24 14:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 8:02 [Bug python/29603] New: " j3.soon777 at gmail dot com
2022-09-23 8:03 ` [Bug python/29603] " j3.soon777 at gmail dot com
2022-09-23 8:04 ` j3.soon777 at gmail dot com
2022-09-23 8:04 ` j3.soon777 at gmail dot com
2022-09-25 5:36 ` j3.soon777 at gmail dot com
2023-05-11 16:10 ` cvs-commit at gcc dot gnu.org
2024-01-14 14:26 ` ssbssa at sourceware dot org
2024-01-24 14:04 ` j3.soon777 at gmail dot com [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-29603-4717-HXalPDoEvf@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).