diff options
Diffstat (limited to 'gdb/config/i386')
-rw-r--r-- | gdb/config/i386/nm-i386sol2.h | 28 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386sol2.h | 10 |
2 files changed, 34 insertions, 4 deletions
diff --git a/gdb/config/i386/nm-i386sol2.h b/gdb/config/i386/nm-i386sol2.h index 8ccc910..2c4b4d4 100644 --- a/gdb/config/i386/nm-i386sol2.h +++ b/gdb/config/i386/nm-i386sol2.h @@ -20,3 +20,31 @@ #include "nm-sysv4.h" +#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 */ diff --git a/gdb/config/i386/tm-i386sol2.h b/gdb/config/i386/tm-i386sol2.h index 0967ba5..da231eb 100644 --- a/gdb/config/i386/tm-i386sol2.h +++ b/gdb/config/i386/tm-i386sol2.h @@ -42,9 +42,11 @@ extern char *sunpro_static_transform_name PARAMS ((char *)); #define FAULTED_USE_SIGINFO -/* Macros to extract process id and thread id from a composite pid/tid */ -#define PIDGET(pid) ((pid) & 0xffff) -#define TIDGET(pid) (((pid) >> 16) & 0xffff) -#define MERGEPID(pid, tid) (((tid) << 16) | (pid)) +/* Macros to extract process id and thread id from a composite pid/tid. + Allocate lower 16 bits for process id, next 15 bits for thread id, and + one bit for a flag to indicate a user thread vs. a kernel thread. */ +#define PIDGET(PID) (((PID) & 0xffff)) +#define TIDGET(PID) (((PID) & 0x7fffffff) >> 16) +#define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16)) #endif /* ifndef TM_I386SOL2_H */ |