From: Eli Zaretskii <eliz@gnu.org>
To: gdb@sources.redhat.com, Vladimir Prus <ghost@cs.msu.su>
Subject: Re: read watchpoints ignored?
Date: Mon, 14 Nov 2005 04:38:00 -0000 [thread overview]
Message-ID: <umzk7j137.fsf@gnu.org> (raw)
In-Reply-To: <20051114024345.GB10567@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 13 Nov 2005 21:43:45 -0500)
> Date: Sun, 13 Nov 2005 21:43:45 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sources.redhat.com, Vladimir Prus <ghost@cs.msu.su>
>
> > > it is not updating the values
> > > of watchpoints before resuming the instruction. That instruction
> > > happened to modify the value behind a read watchpoint.
> >
> > Then that's the bug, I'd say. Do you agree that this is what we
> > should fix to solve this bug? Because the following discussion of
> > problems with read watchpoints is only remotely related to the bug
> > reported by Vladimir.
>
> Yes, certainly this is the bug, I just don't know which way to fix it.
We need to find a way to get GDB to check whether the watchpoint fired
during such stepping.
> I'm talking about watchpoint_check. If that had been called, we would
> have updated the value stored in the watchpoint for "a", and at the
> next read watchpoint, it would not appear to have changed.
I think we need call watchpoint_check only if
target_stopped_data_address says the watchpoint fired.
> Fortunately any platform with read watchpoints probably also has access
> watchpoints, so we can get by with using those instead.
Exactly.
> But the first read after the value changes has a high chance of
> being the important one while debugging.
I think the current code should handle this well. But perhaps you are
thinking about some particular situation where it won't, so please
show the code you had in mind.
> Certainly there's no reason to disable rwatch. Conditionalize "skip
> this watchpoint if the value has changed" on "this is really an access
> watchpoint because the target does not support read watchpoints".
That's fine with me.
next prev parent reply other threads:[~2005-11-14 4:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-11 13:22 Vladimir Prus
2005-11-11 18:19 ` Eli Zaretskii
2005-11-13 16:45 ` Daniel Jacobowitz
2005-11-13 22:38 ` Eli Zaretskii
2005-11-14 2:43 ` Daniel Jacobowitz
2005-11-14 4:38 ` Eli Zaretskii [this message]
2005-11-14 14:42 ` Daniel Jacobowitz
2005-11-15 4:02 ` Eli Zaretskii
2005-11-14 10:10 ` Vladimir Prus
2005-11-14 14:41 ` Daniel Jacobowitz
2005-11-14 14:45 ` Daniel Jacobowitz
2005-11-15 4:02 ` Eli Zaretskii
2005-11-14 13:16 ` Johan Rydberg
2005-11-14 13:42 ` Vladimir Prus
2005-11-14 13:59 ` Johan Rydberg
2005-11-14 14:10 ` Vladimir Prus
2005-11-15 4:01 ` Eli Zaretskii
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=umzk7j137.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb@sources.redhat.com \
--cc=ghost@cs.msu.su \
/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).