From: Eli Zaretskii <eliz@gnu.org>
To: Wu Zhou <woodzltc@cn.ibm.com>, gdb-patches@sourceware.org
Subject: Re: Fw: [ppc-linux-nat]: set access flag for h/w watchpoint even if it is only read or write (fwd)
Date: Wed, 12 Jul 2006 18:15:00 -0000 [thread overview]
Message-ID: <uirm2n0yz.fsf@gnu.org> (raw)
In-Reply-To: <20060712173125.GC24622@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 12 Jul 2006 13:31:25 -0400)
> Date: Wed, 12 Jul 2006 13:31:25 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: eliz@gnu.org, gdb-patches@sourceware.org
>
> First, there's the question of targets which can't set true "read"
> watchpoints, but can set "access" watchpoints. Right now the x86
> simply accepts a request to insert a read watchpoint, and generates an
> access watchpoint instead. How about if we changed it to refuse to
> insert read watchpoints, changed breakpoint.c to attempt an access
> watchpoint if inserting a read watchpoint fails, and then store in the
> breakpoint which type was inserted?
Sorry, I don't understand your plan. How is it different from what
GDB does now (silently replace read with access watchpoint)? And what
type will we store when the user says "rwatch"?
> Second, there's the question of which sort of watchpoint we've hit. If
> the target could tell us, say, as a return value from
> target_stopped_data_address, then we could only check read watchpoints
> when a read watchpoint triggers. But I think this is a smaller issue;
> at worst we might report that both a write and read watchpoint had
> triggered when really only a write watchpoint had.
I think this is bad: if a user sets two different watchpoints at the
same address, she wants each watchpoint to fire when its specific
conditions are met.
My philosophy here is that watchpoints are a kind of silver bullet:
you use them when you have almost no idea who could touch the data in
question. So watchpoints should perform as close to the spec as
possible, because the user is already in a very confused state;
confusing her even more with imprecise watch reports would be a bad
mantra, IMO.
> And there's corner
> cases, like instructions which both read and write an address; they
> should trigger both read and write watchpoints but I doubt any platform
> gives us enough information to figure out that that's happened.
In those cases, it is okay to show both watchpoints, or even just the
write one.
next prev parent reply other threads:[~2006-07-12 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OF40F802D1.E1DA610C-ON482571A8.004F44D3-482571A8.004F3DA7@cn.ibm.com>
2006-07-11 15:09 ` Wu Zhou
2006-07-12 17:31 ` Daniel Jacobowitz
2006-07-12 18:15 ` Eli Zaretskii [this message]
2006-07-12 18:30 ` Daniel Jacobowitz
2006-07-13 3:21 ` 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=uirm2n0yz.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=woodzltc@cn.ibm.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