]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* breakpoint.c (TARGET_REGION_OK_FOR_HW_WATCHPOINT): Delete.
authorWu Zhou <woodzltc@cn.ibm.com>
Wed, 8 Feb 2006 06:43:00 +0000 (06:43 +0000)
committerWu Zhou <woodzltc@cn.ibm.com>
Wed, 8 Feb 2006 06:43:00 +0000 (06:43 +0000)
* config/i386/nm-i386sol2.h (TARGET_REGION_OK_FOR_HW_WATCHPOINT): New.
(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
* config/mips/nm-irix5.h (TARGET_REGION_OK_FOR_HW_WATCHPOINT): New.
(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
* config/sparc/nm-sol2.h (TARGET_REGION_OK_FOR_HW_WATCHPOINT): New.
(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
* inf-ttrace.c (inf_ttrace_region_ok_for_hw_watchpoint): New.
(inf_ttrace_region_size_ok_for_hw_watchpoint): Delete.
(inf_ttrace_target): Delete to_region_size_ok_for_hw_watchpoint and
add to_region_ok_for_hw_watchpoint.
* s390-nat.c (s390_region_size_ok_for_hw_watchpoint): Delete.
(s390_region_ok_for_hw_watchpoint): New.
(_initialize_s390_nat): Delete to_region_size_ok_for_hw_watchpoint
and add to_region_ok_for_hw_watchpoint.
* target.c (default_region_size_ok_for_hw_watchpoint,
debug_to_region_size_ok_for_hw_watchpoint): Delete prototype.
(update_current_target): Delete to_region_size_ok_for_hw_watchpoint
inheritance and default_region_size_ok_for_hw_watchpoint.
(default_region_ok_for_hw_watchpoint): If len is less than or equal
the length of void pointer, return ok.
(default_region_size_ok_for_hw_watchpoint): Delete.
(debug_to_region_size_ok_for_hw_watchpoint): Delete.
(setup_target_debug): Delete to_region_size_ok_for_hw_watchpoint.
* target.h (struct target_ops): Delete
to_region_size_ok_for_hw_watchpoint.
(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.

gdb/ChangeLog
gdb/breakpoint.c
gdb/inf-ttrace.c
gdb/s390-nat.c
gdb/target.c
gdb/target.h

index 679131a9dce57ea664bd54945fa57e6787e14670..8ac7f317c85a68e383fdc735360a5643c813eb94 100644 (file)
@@ -1,3 +1,33 @@
+2006-02-08  Wu Zhou  <woodzltc@cn.ibm.com>
+
+       * breakpoint.c (TARGET_REGION_OK_FOR_HW_WATCHPOINT): Delete.
+       * config/i386/nm-i386sol2.h (TARGET_REGION_OK_FOR_HW_WATCHPOINT): New.
+       (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
+       * config/mips/nm-irix5.h (TARGET_REGION_OK_FOR_HW_WATCHPOINT): New.
+       (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
+       * config/sparc/nm-sol2.h (TARGET_REGION_OK_FOR_HW_WATCHPOINT): New.
+       (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
+       * inf-ttrace.c (inf_ttrace_region_ok_for_hw_watchpoint): New.
+       (inf_ttrace_region_size_ok_for_hw_watchpoint): Delete.
+       (inf_ttrace_target): Delete to_region_size_ok_for_hw_watchpoint and
+       add to_region_ok_for_hw_watchpoint.
+       * s390-nat.c (s390_region_size_ok_for_hw_watchpoint): Delete.
+       (s390_region_ok_for_hw_watchpoint): New.
+       (_initialize_s390_nat): Delete to_region_size_ok_for_hw_watchpoint
+       and add to_region_ok_for_hw_watchpoint.
+       * target.c (default_region_size_ok_for_hw_watchpoint, 
+       debug_to_region_size_ok_for_hw_watchpoint): Delete prototype.
+       (update_current_target): Delete to_region_size_ok_for_hw_watchpoint
+       inheritance and default_region_size_ok_for_hw_watchpoint.
+       (default_region_ok_for_hw_watchpoint): If len is less than or equal
+       the length of void pointer, return ok.
+       (default_region_size_ok_for_hw_watchpoint): Delete.
+       (debug_to_region_size_ok_for_hw_watchpoint): Delete.
+       (setup_target_debug): Delete to_region_size_ok_for_hw_watchpoint.
+       * target.h (struct target_ops): Delete 
+       to_region_size_ok_for_hw_watchpoint.
+       (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
+       
 2006-02-08  Ben Elliston  <bje@au1.ibm.com>
            Wu Zhou  <woodzltc@cn.ibm.com>
 
index ddca4dfe35bb2b0109490806e9bfb896870608cd..386033056ab14d0d36a72549f5b586e768bf4c02 100644 (file)
@@ -5807,11 +5807,6 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
    in hardware.  If the watchpoint can not be handled
    in hardware return zero.  */
 
-#if !defined(TARGET_REGION_OK_FOR_HW_WATCHPOINT)
-#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(ADDR,LEN) \
-     (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(LEN))
-#endif
-
 static int
 can_use_hardware_watchpoint (struct value *v)
 {
index d9c3bba617bc08c456b6b2b2947b623adc6d3587..4648ef508515f371ae13c5e1874f0850b19ce2e1 100644 (file)
@@ -359,7 +359,7 @@ inf_ttrace_can_use_hw_breakpoint (int type, int len, int ot)
 }
 
 static int
-inf_ttrace_region_size_ok_for_hw_watchpoint (int len)
+inf_ttrace_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
 {
   return 1;
 }
@@ -1121,8 +1121,8 @@ inf_ttrace_target (void)
   t->to_insert_watchpoint = inf_ttrace_insert_watchpoint;
   t->to_remove_watchpoint = inf_ttrace_remove_watchpoint;
   t->to_stopped_by_watchpoint = inf_ttrace_stopped_by_watchpoint;
-  t->to_region_size_ok_for_hw_watchpoint =
-    inf_ttrace_region_size_ok_for_hw_watchpoint;
+  t->to_region_ok_for_hw_watchpoint =
+    inf_ttrace_region_ok_for_hw_watchpoint;
   t->to_kill = inf_ttrace_kill;
   t->to_create_inferior = inf_ttrace_create_inferior;
   t->to_follow_fork = inf_ttrace_follow_fork;
index b92534ac181d44c017318dfb0ea02b60a1e12848..da3f37e601e66f3d159871dd9a7c879ea1d41b4c 100644 (file)
@@ -358,7 +358,7 @@ s390_can_use_hw_breakpoint (int type, int cnt, int othertype)
 }
 
 static int
-s390_region_size_ok_for_hw_watchpoint (int cnt)
+s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt)
 {
   return 1;
 }
@@ -380,7 +380,7 @@ _initialize_s390_nat (void)
 
   /* Add our watchpoint methods.  */
   t->to_can_use_hw_breakpoint = s390_can_use_hw_breakpoint;
-  t->to_region_size_ok_for_hw_watchpoint = s390_region_size_ok_for_hw_watchpoint;
+  t->to_region_ok_for_hw_watchpoint = s390_region_ok_for_hw_watchpoint;
   t->to_have_continuable_watchpoint = 1;
   t->to_stopped_by_watchpoint = s390_stopped_by_watchpoint;
   t->to_insert_watchpoint = s390_insert_watchpoint;
index d542bbf1c1047a0b4b5aee0ea6a71a8d522d8f39..3da3e651311693fced34f065c8fec404be33ae5e 100644 (file)
@@ -50,8 +50,6 @@ static void default_terminal_info (char *, int);
 
 static int default_region_ok_for_hw_watchpoint (CORE_ADDR, int);
 
-static int default_region_size_ok_for_hw_watchpoint (int);
-
 static int nosymbol (char *, CORE_ADDR *);
 
 static void tcomplain (void);
@@ -133,8 +131,6 @@ static int debug_to_stopped_data_address (struct target_ops *, CORE_ADDR *);
 
 static int debug_to_region_ok_for_hw_watchpoint (CORE_ADDR, int);
 
-static int debug_to_region_size_ok_for_hw_watchpoint (int);
-
 static void debug_to_terminal_init (void);
 
 static void debug_to_terminal_inferior (void);
@@ -411,7 +407,6 @@ update_current_target (void)
       INHERIT (to_stopped_by_watchpoint, t);
       INHERIT (to_have_continuable_watchpoint, t);
       INHERIT (to_region_ok_for_hw_watchpoint, t);
-      INHERIT (to_region_size_ok_for_hw_watchpoint, t);
       INHERIT (to_terminal_init, t);
       INHERIT (to_terminal_inferior, t);
       INHERIT (to_terminal_ours_for_output, t);
@@ -539,8 +534,6 @@ update_current_target (void)
            return_zero);
   de_fault (to_region_ok_for_hw_watchpoint,
            default_region_ok_for_hw_watchpoint);
-  de_fault (to_region_size_ok_for_hw_watchpoint,
-           default_region_size_ok_for_hw_watchpoint);
   de_fault (to_terminal_init, 
            (void (*) (void)) 
            target_ignore);
@@ -1588,13 +1581,7 @@ find_default_create_inferior (char *exec_file, char *allargs, char **env,
 static int
 default_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
 {
-  return TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (len);
-}
-
-static int
-default_region_size_ok_for_hw_watchpoint (int byte_count)
-{
-  return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr));
+  return (len <= TYPE_LENGTH (builtin_type_void_data_ptr));
 }
 
 static int
@@ -2146,20 +2133,6 @@ debug_to_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
   return retval;
 }
 
-static int
-debug_to_region_size_ok_for_hw_watchpoint (int byte_count)
-{
-  CORE_ADDR retval;
-
-  retval = debug_target.to_region_size_ok_for_hw_watchpoint (byte_count);
-
-  fprintf_unfiltered (gdb_stdlog,
-                     "TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (%ld) = 0x%lx\n",
-                     (unsigned long) byte_count,
-                     (unsigned long) retval);
-  return retval;
-}
-
 static int
 debug_to_stopped_by_watchpoint (void)
 {
@@ -2566,7 +2539,6 @@ setup_target_debug (void)
   current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint;
   current_target.to_stopped_data_address = debug_to_stopped_data_address;
   current_target.to_region_ok_for_hw_watchpoint = debug_to_region_ok_for_hw_watchpoint;
-  current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint;
   current_target.to_terminal_init = debug_to_terminal_init;
   current_target.to_terminal_inferior = debug_to_terminal_inferior;
   current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output;
index 7a72c3668091b54526b23b14c2cec6a402e7e5b5..95e5defc9ff4ab5706a1985fc6d048f4f0c70da1 100644 (file)
@@ -347,7 +347,6 @@ struct target_ops
     int to_have_continuable_watchpoint;
     int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *);
     int (*to_region_ok_for_hw_watchpoint) (CORE_ADDR, int);
-    int (*to_region_size_ok_for_hw_watchpoint) (int);
     void (*to_terminal_init) (void);
     void (*to_terminal_inferior) (void);
     void (*to_terminal_ours_for_output) (void);
@@ -1037,11 +1036,6 @@ extern void (*deprecated_target_new_objfile_hook) (struct objfile *);
     (*current_target.to_region_ok_for_hw_watchpoint) (addr, len)
 #endif
 
-#if !defined(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
-#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(byte_count) \
-    (*current_target.to_region_size_ok_for_hw_watchpoint) (byte_count)
-#endif
-
 
 /* Set/clear a hardware watchpoint starting at ADDR, for LEN bytes.  TYPE is 0
    for write, 1 for read, and 2 for read/write accesses.  Returns 0 for