This is the mail archive of the
mailing list for the GDB project.
[RFA] target.c: eliminate one use of DEPRECATED_REGISTER_SIZE
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 8 Jan 2004 20:20:11 -0700
- Subject: [RFA] target.c: eliminate one use of DEPRECATED_REGISTER_SIZE
On FR-V, we found that hardware watchpoints were no longer working.
The reason for this is that frv-tdep.c was changed a while back to no
longer define DEPRECATED_REGISTER_SIZE. As a consequence,
DEPRECATED_REGISTER_SIZE is always 0. This means that the expression
(byte_count <= DEPRECATED_REGISTER_SIZE)
always evaluates to false, which effectively (though unintentionally) means
that no memory region is ever suitable for hardware watchpoints.
The use of the register's size (width in bytes) in this expression was
dubious to begin with. It seems to me that using the size of a
pointer makes (somewhat) more sense.
* target.c (default_region_size_ok_for_hw_watchpoint): Compare
the region size against the size of a pointer, not the size of
a register as given by DEPRECATED_REGISTER_SIZE.
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.68
diff -u -p -r1.68 target.c
--- target.c 5 Jan 2004 22:32:23 -0000 1.68
+++ target.c 9 Jan 2004 03:01:23 -0000
@@ -1362,7 +1362,7 @@ find_default_create_inferior (char *exec
default_region_size_ok_for_hw_watchpoint (int byte_count)
- return (byte_count <= DEPRECATED_REGISTER_SIZE);
+ return (byte_count <= (TARGET_PTR_BIT / TARGET_CHAR_BIT));