This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ppc-linux-nat]: set access flag for h/w watchpoint even if it is only read or write
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Wu Zhou <woodzltc at cn dot ibm dot com>, gdb-patches at sourceware dot org
- Date: Fri, 7 Jul 2006 09:17:54 -0400
- Subject: Re: [ppc-linux-nat]: set access flag for h/w watchpoint even if it is only read or write
- References: <20060707003521.worrm140yso4g8s8@imap.linux.ibm.com> <u7j2prarv.fsf@gnu.org>
On Fri, Jul 07, 2006 at 01:04:36PM +0300, Eli Zaretskii wrote:
> I think the reason it works for me is that on x86, there's no real
> support for read watchpoints, so we actually set a read-write
> watchpoint, and then the logic of watchpoint_check does TRT.
Precisely.
> The question is, how to do that without breaking other platforms, like
> x86, which we cannot trust. If you can come up with a design that
> accommodates both types of situations, I will be happy to review it.
>
> Daniel, could you please point me to Ulrich's change, either in
> ChangeLogs or in the sources? I cannot find it forf some reason.
I must be mistaken; our S/390 support doesn't have any read watchpoints
(I don't know if the architecture does or not). In fact I can't find
any architecture that does this. But I immediately recognized
the description of the problem... so it must have happened somewhere.
I can't find the discussion of it, but the gdbserver crisv32 port does
the same thing:
/* Read watchpoints are set as access watchpoints, because of GDB's
inability to deal with pure read watchpoints. */
if (type == '3')
type = '4';
Here's some more about it:
http://sources.redhat.com/ml/gdb/2005-11/msg00231.html
In which I also claimed S/390 did it, which doesn't appear to be true,
but at least I've had the same misconception for a while now.
--
Daniel Jacobowitz
CodeSourcery