From 2f09097b734af8840d2141a26a53b9c67e67fcf2 Mon Sep 17 00:00:00 2001 From: Nicholas Duffek Date: Fri, 7 Apr 2000 01:14:10 +0000 Subject: * sol-thread.c (GET_LWP, GET_THREAD, BUILD_LWP, BUILD_THREAD): Change to rely on PIDGET etc. * config/i386/nm-i386sol2.h (TARGET_HAS_WATCHPOINTS, TARGET_CAN_USE_HARDWARE_WATCHPOINT, HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT, target_[insert/remove]_watchpoint): define. Allow target to use procfs hardware watchpoints. * config/sparc/nm-sun4sol2.h: ditto. * config/i386/tm-i386sol2.h (PIDGET, TIDGET, MERGEPID): modify definitions to use 16 bits for the pid, 15 bits for the tid, and 1 bit for the flag. * config/sparc/tm-sun4sol2.h: ditto. (SOFTWARE_SINGLE_STEP, SOFTWARE_SINGLE_STEP_P): undefine. * testsuite/gdb.threads/pthreads.exp (all_threads_running): Allow for more than 15 thread increments. --- gdb/config/sparc/nm-sun4sol2.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gdb/config/sparc/nm-sun4sol2.h') diff --git a/gdb/config/sparc/nm-sun4sol2.h b/gdb/config/sparc/nm-sun4sol2.h index 6e9e74f..9d5dd1d 100644 --- a/gdb/config/sparc/nm-sun4sol2.h +++ b/gdb/config/sparc/nm-sun4sol2.h @@ -30,3 +30,31 @@ #define PRSVADDR_BROKEN +#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */ + +#define TARGET_HAS_HARDWARE_WATCHPOINTS + +/* The man page for proc4 on solaris 6 and 7 says that the system + can support "thousands" of hardware watchpoints, but gives no + method for finding out how many. So just tell GDB 'yes'. */ +#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE, CNT, OT) 1 + +/* When a hardware watchpoint fires off the PC will be left at the + instruction following the one which caused the watchpoint. + It will *NOT* be necessary for GDB to step over the watchpoint. */ +#define HAVE_CONTINUABLE_WATCHPOINT + +extern int procfs_stopped_by_watchpoint PARAMS ((int)); +#define STOPPED_BY_WATCHPOINT(W) \ + procfs_stopped_by_watchpoint(inferior_pid) + +/* Use these macros for watchpoint insertion/deletion. */ +/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */ + +extern int procfs_set_watchpoint PARAMS ((int, CORE_ADDR, int, int, int)); +#define target_insert_watchpoint(ADDR, LEN, TYPE) \ + procfs_set_watchpoint (inferior_pid, ADDR, LEN, TYPE, 1) +#define target_remove_watchpoint(ADDR, LEN, TYPE) \ + procfs_set_watchpoint (inferior_pid, ADDR, 0, 0, 0) + +#endif /* NEW_PROC_API */ -- cgit v1.1