This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] target.c: eliminate one use of DEPRECATED_REGISTER_SIZE


On Sun, 11 Jan 2004 14:15:08 -0500
Andrew Cagney <cagney@gnu.org> wrote:

> >  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));
> >  }
> >  
> Ok, but with `TYPE_LENGTH (builtin_type_void_{code/data}_ptr)'.  Here I 
> believe that the data pointer would be more correct.

Okay.

Committed.  Here's what went in:

	* 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.

Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.69
diff -u -p -r1.69 target.c
--- target.c	19 Jan 2004 01:20:11 -0000	1.69
+++ target.c	19 Jan 2004 16:45:48 -0000
@@ -1360,7 +1360,7 @@ find_default_create_inferior (char *exec
 static int
 default_region_size_ok_for_hw_watchpoint (int byte_count)
 {
-  return (byte_count <= DEPRECATED_REGISTER_SIZE);
+  return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr));
 }
 
 static int


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]