From: Eli Zaretskii <eliz@is.elta.co.il>
To: Orjan Friberg <orjan.friberg@axis.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Hardware watchpoints; dealing with false triggers?
Date: Tue, 04 Dec 2001 03:43:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1011204133402.27224C-100000@is> (raw)
In-Reply-To: <3C0CAEAF.E568773E@axis.com>
On Tue, 4 Dec 2001, Orjan Friberg wrote:
> > > And this is the key issue: could the interface to the target-specific
> > > code be extended to handle the concept of "actual watchpoint address"?
> >
> > We already have this: it's called target_stopped_data_address.
> > breakpoint.c uses this macro to see which watchpoint, if any,
> > triggered.
>
> Also great. Thank you very much for your comments on this, Eli.
I need to correct myself: there's a subtle point I forgot to mention.
The current code only calls target_stopped_data_address for read and
access watchpoints (those set by `rwatch' and `awatch' commands), but not
for regular, i.e. data-write, hardware watchpoints (those set by `watch'
command). Instead, GDB compares the previous and the current value of
the watched expression, and if they differ, it decides that the
corresponding watchpoint triggered, without ever considering the address!
I think it's a bug to do that with hardware watchpoints (as opposed to
software watchpoints), so I'm trying to convince The Powers That Be to
change that (in another thread called "Re: [RFC] Possible bug with i386
watchpoints on several targets", which see). But for now, that's how
the code works. Sorry I failed to mention that in my original message.
next prev parent reply other threads:[~2001-12-04 11:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-29 6:25 Orjan Friberg
2001-11-19 11:58 ` Orjan Friberg
2001-11-19 12:06 ` Eli Zaretskii
2001-11-29 7:01 ` Eli Zaretskii
2001-11-30 8:44 ` Orjan Friberg
2001-11-21 17:14 ` Orjan Friberg
2001-11-22 13:19 ` Eli Zaretskii
2001-11-30 10:33 ` Eli Zaretskii
2001-12-04 3:09 ` Orjan Friberg
2001-12-04 3:43 ` Eli Zaretskii [this message]
2001-12-04 5:51 ` Orjan Friberg
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=Pine.SUN.3.91.1011204133402.27224C-100000@is \
--to=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
--cc=orjan.friberg@axis.com \
/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