* config/s390/nm-linux.h (KERNEL_U_SIZE): Remove.
authorUlrich Weigand <uweigand@de.ibm.com>
Sun, 11 Sep 2005 21:54:59 +0000 (21:54 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Sun, 11 Sep 2005 21:54:59 +0000 (21:54 +0000)
(PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE): Likewise.
(s390_stopped_by_watchpoint, s390_insert_watchpoint,
s390_remove_watchpoint, TARGET_CAN_USE_HARDWARE_WATCHPOINT,
TARGET_REGION_OK_FOR_HW_WATCHPOINT, HAVE_CONTINUABLE_WATCHPOINT,
STOPPED_BY_WATCHPOINT, target_insert_watchpoint,
target_remove_watchpoint): Likewise.
* s390-nat.c: Remove include of <sys/user.h>.
(kernel_u_size): Remove.
(s390_stopped_by_watchpoint): Make static.
(s390_insert_watchpoint, s390_remove_watchpoint): Likewise.
(s390_can_use_hw_breakpoint): New function.
(s390_region_size_ok_for_hw_watchpoint): Likewise.
(_initialize_s390_nat): Add watchpoint methods to target.

gdb/ChangeLog
gdb/config/s390/nm-linux.h
gdb/s390-nat.c

index c1d85f18f97fcf82b16dd14a77b26a3197a323de..4db4f64516be3a8a26f4876569f1333bd17b17ab 100644 (file)
@@ -1,3 +1,20 @@
+2005-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * config/s390/nm-linux.h (KERNEL_U_SIZE): Remove.
+       (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE): Likewise.
+       (s390_stopped_by_watchpoint, s390_insert_watchpoint,
+       s390_remove_watchpoint, TARGET_CAN_USE_HARDWARE_WATCHPOINT,
+       TARGET_REGION_OK_FOR_HW_WATCHPOINT, HAVE_CONTINUABLE_WATCHPOINT,
+       STOPPED_BY_WATCHPOINT, target_insert_watchpoint,
+       target_remove_watchpoint): Likewise.
+       * s390-nat.c: Remove include of <sys/user.h>.
+       (kernel_u_size): Remove.
+       (s390_stopped_by_watchpoint): Make static.
+       (s390_insert_watchpoint, s390_remove_watchpoint): Likewise.
+       (s390_can_use_hw_breakpoint): New function.
+       (s390_region_size_ok_for_hw_watchpoint): Likewise.
+       (_initialize_s390_nat): Add watchpoint methods to target.
+
 2005-09-10  Daniel Jacobowitz  <dan@codesourcery.com>
            Ulrich Weigand  <uweigand@de.ibm.com>
 
index bf283cea80bd58d728a507837c01ca0fc57b1d20..8f9b6a84a26355508c14c76bb95331d6cba03de0 100644 (file)
 
 /* ptrace access.  */
 
-#define PTRACE_ARG3_TYPE long
-#define PTRACE_XFER_TYPE long
-
 #define FETCH_INFERIOR_REGISTERS
 
-#define KERNEL_U_SIZE kernel_u_size()
-extern int kernel_u_size (void);
-
-
-/* Hardware watchpoints.  */
-
-extern int s390_stopped_by_watchpoint (void);
-extern int s390_insert_watchpoint (CORE_ADDR addr, int len);
-extern int s390_remove_watchpoint (CORE_ADDR addr, int len);
-
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
-#define TARGET_REGION_OK_FOR_HW_WATCHPOINT(addr, len) 1
-#define HAVE_CONTINUABLE_WATCHPOINT 1
-
-#define STOPPED_BY_WATCHPOINT(w) \
-  s390_stopped_by_watchpoint ()
-
-#define target_insert_watchpoint(addr, len, type) \
-  s390_insert_watchpoint (addr, len)
-
-#define target_remove_watchpoint(addr, len, type) \
-  s390_remove_watchpoint (addr, len)
-
 
 #endif /* nm_linux.h */
index 98610d987b0d6d131dc17fba1872ce729efc9137..589d650a39f1f0c4f85b4c7025bbd706d9f1792b 100644 (file)
@@ -34,7 +34,6 @@
 #include <sys/ptrace.h>
 #include <asm/types.h>
 #include <sys/procfs.h>
-#include <sys/user.h>
 #include <sys/ucontext.h>
 
 
@@ -250,7 +249,7 @@ struct watch_area
 
 static struct watch_area *watch_base = NULL;
 
-int
+static int
 s390_stopped_by_watchpoint (void)
 {
   per_lowcore_bits per_lowcore;
@@ -310,7 +309,7 @@ s390_fix_watch_points (void)
     perror_with_name (_("Couldn't modify watchpoint status"));
 }
 
-int
+static int
 s390_insert_watchpoint (CORE_ADDR addr, int len)
 {
   struct watch_area *area = xmalloc (sizeof (struct watch_area));
@@ -327,7 +326,7 @@ s390_insert_watchpoint (CORE_ADDR addr, int len)
   return 0;
 }
 
-int
+static int
 s390_remove_watchpoint (CORE_ADDR addr, int len)
 {
   struct watch_area *area, **parea;
@@ -352,13 +351,19 @@ s390_remove_watchpoint (CORE_ADDR addr, int len)
   return 0;
 }
 
+static int
+s390_can_use_hw_breakpoint (int type, int cnt, int othertype)
+{
+  return 1;
+}
 
-int
-kernel_u_size (void)
+static int
+s390_region_size_ok_for_hw_watchpoint (int cnt)
 {
-  return sizeof (struct user);
+  return 1;
 }
 
+
 void _initialize_s390_nat (void);
 
 void
@@ -373,6 +378,14 @@ _initialize_s390_nat (void)
   t->to_fetch_registers = s390_linux_fetch_inferior_registers;
   t->to_store_registers = s390_linux_store_inferior_registers;
 
+  /* 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_have_continuable_watchpoint = 1;
+  t->to_stopped_by_watchpoint = s390_stopped_by_watchpoint;
+  t->to_insert_watchpoint = s390_insert_watchpoint;
+  t->to_remove_watchpoint = s390_remove_watchpoint;
+
   /* Register the target.  */
   add_target (t);
 }