aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/s390
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2004-02-18 03:47:35 +0000
committerJim Blandy <jimb@codesourcery.com>2004-02-18 03:47:35 +0000
commite1457d83a503024ed3834599409f11e1b1b7dabc (patch)
treeec50cabddf4595265c13a41fcf7c8737bba547c9 /gdb/config/s390
parentd0f54f9d4233d431dd70652503888cf03bc6e445 (diff)
downloadgdb-e1457d83a503024ed3834599409f11e1b1b7dabc.zip
gdb-e1457d83a503024ed3834599409f11e1b1b7dabc.tar.gz
gdb-e1457d83a503024ed3834599409f11e1b1b7dabc.tar.bz2
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>. * config/s390/nm-linux.h: Update comments. (target_insert_watchpoint, target_remove_watchpoint): Redefine. (STOPPED_BY_WATCHPOINT): Redefine. (TARGET_CAN_USE_HARDWARE_WATCHPOINT): Redefine to 1. (s390_insert_watchpoint, s390_remove_watchpoint): Update prototype. (s390_stopped_by_watchpoint): Likewise. (watch_area_cnt): Remove. * s390-nat.c: Update comments. (watch_area): Remove typedef. Global replace watch_area by struct watch_area. (watch_area_cnt, watch_lo_addr, watch_hi_addr): Remove. (s390_stopped_by_watchpoint): Remove pid argument, use s390_inferior_tid. Add short-cut for the no watchpoint case. (s390_fix_watch_points): Remove pid argument, use s390_inferior_tid. Recompute area spanned by watchpoints. (s390_insert_watchpoint, s390_remove_watchpoint): Remove pid argument. Reimplement.
Diffstat (limited to 'gdb/config/s390')
-rw-r--r--gdb/config/s390/nm-linux.h41
1 files changed, 16 insertions, 25 deletions
diff --git a/gdb/config/s390/nm-linux.h b/gdb/config/s390/nm-linux.h
index 6931efb..04cd863 100644
--- a/gdb/config/s390/nm-linux.h
+++ b/gdb/config/s390/nm-linux.h
@@ -39,33 +39,24 @@
extern int kernel_u_size (void);
-/* WATCHPOINT SPECIFIC STUFF */
+/* 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_HAS_HARDWARE_WATCHPOINTS
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) 1
#define HAVE_CONTINUABLE_WATCHPOINT 1
-#define target_insert_watchpoint(addr, len, type) \
- s390_insert_watchpoint (PIDGET (inferior_ptid), addr, len, type)
-
-#define target_remove_watchpoint(addr, len, type) \
- s390_remove_watchpoint (PIDGET (inferior_ptid), addr, len)
-
-extern int watch_area_cnt;
-/* gdb if really stupid & calls this all the time without a
- watchpoint even being set */
-#define STOPPED_BY_WATCHPOINT(W) \
- (watch_area_cnt&&s390_stopped_by_watchpoint (PIDGET(inferior_ptid)))
-
-extern CORE_ADDR s390_stopped_by_watchpoint (int);
-
-/*
- Type can be 1 for a read_watchpoint or 2 for an access watchpoint.
- */
-extern int s390_insert_watchpoint (int pid, CORE_ADDR addr, int len, int rw);
-extern int s390_remove_watchpoint (int pid, CORE_ADDR addr, int len);
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
- (((type) == bp_hardware_watchpoint)|| \
- ((type) == bp_watchpoint)|| \
- ((type) == bp_read_watchpoint) || \
- ((type) == bp_access_watchpoint))
+
+#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 */