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.
This commit is contained in:
Jim Blandy
2004-02-18 03:47:35 +00:00
parent d0f54f9d42
commit e1457d83a5
3 changed files with 102 additions and 130 deletions

View File

@@ -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)
#define STOPPED_BY_WATCHPOINT(w) \
s390_stopped_by_watchpoint ()
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)))
#define target_insert_watchpoint(addr, len, type) \
s390_insert_watchpoint (addr, len)
extern CORE_ADDR s390_stopped_by_watchpoint (int);
#define target_remove_watchpoint(addr, len, type) \
s390_remove_watchpoint (addr, len)
/*
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))
#endif /* nm_linux.h */