From: Stu Grossman Date: Mon, 22 May 1995 23:03:42 +0000 (+0000) Subject: * breakpoint.c: Move defaults of watchpoint related macros into X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=f5a8f1a6f38e8f87950258eb7a3f5417392458ac;p=deliverable%2Fbinutils-gdb.git * breakpoint.c: Move defaults of watchpoint related macros into target.h. * target.h: Macros from breakpoint.c. Conditionalize based on TARGET_HAS_HARDWARE_WATCHPOINTS. * i386v-nat.c procfs.c: Use TARGET_HAS_HARDWARE_WATCHPOINTS instead of TARGET_CAN_USE_HARDWARE_WATCHPOINT to enable watchpoint code. * config/i386/nm-linux.h, config/mips/nm-irix4.h, config/pa/nm-hppab.h, config/sparc/tm-sparclite.h: #define TARGET_HAS_HARDWARE_WATCHPOINTS to enable watchpoint code. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cdb74229b8..b066e57c28 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +Mon May 22 15:38:25 1995 Stu Grossman (grossman@cygnus.com) + + * breakpoint.c: Move defaults of watchpoint related macros into + target.h. + * target.h: Macros from breakpoint.c. Conditionalize based on + TARGET_HAS_HARDWARE_WATCHPOINTS. + * i386v-nat.c procfs.c: Use TARGET_HAS_HARDWARE_WATCHPOINTS + instead of TARGET_CAN_USE_HARDWARE_WATCHPOINT to enable watchpoint + code. + * config/i386/nm-linux.h, config/mips/nm-irix4.h, + config/pa/nm-hppab.h, config/sparc/tm-sparclite.h: #define + TARGET_HAS_HARDWARE_WATCHPOINTS to enable watchpoint code. + Mon May 22 06:47:30 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * breakpoint.c, target.h: Move defaults of watchpoint related diff --git a/gdb/config/mips/nm-irix4.h b/gdb/config/mips/nm-irix4.h index 07851e9713..da27b11138 100644 --- a/gdb/config/mips/nm-irix4.h +++ b/gdb/config/mips/nm-irix4.h @@ -35,6 +35,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define ONE_PROCESS_WRITETEXT +#define TARGET_HAS_HARDWARE_WATCHPOINTS + /* Temporary new watchpoint stuff */ #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \ ((type) == bp_hardware_watchpoint) diff --git a/gdb/config/pa/nm-hppab.h b/gdb/config/pa/nm-hppab.h index 421dfd7802..01bc5d4dc2 100644 --- a/gdb/config/pa/nm-hppab.h +++ b/gdb/config/pa/nm-hppab.h @@ -97,6 +97,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ fired because of a write to an address on the same page as a watchpoint, but no write to the watched address occured). */ +#define TARGET_HAS_HARDWARE_WATCHPOINTS /* Enable the code in procfs.c */ + /* The PA can watch any number of locations, there's no need for it to reject anything (generic routines already check that all intermediates are in memory). */ diff --git a/gdb/config/sparc/tm-sparclite.h b/gdb/config/sparc/tm-sparclite.h index 3b2956be24..8dd22a8aaa 100644 --- a/gdb/config/sparc/tm-sparclite.h +++ b/gdb/config/sparc/tm-sparclite.h @@ -60,6 +60,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define TARGET_HW_BREAK_LIMIT 2 #define TARGET_HW_WATCH_LIMIT 2 +/* Enable watchpoint macro's */ + +#define TARGET_HAS_HARDWARE_WATCHPOINTS + #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \ sparclite_check_watch_resources (type, cnt, ot) diff --git a/gdb/i386v-nat.c b/gdb/i386v-nat.c index 1dfda613bd..8ecbad99d7 100644 --- a/gdb/i386v-nat.c +++ b/gdb/i386v-nat.c @@ -34,7 +34,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include -#ifdef TARGET_CAN_USE_HARDWARE_WATCHPOINT +#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS #include #endif @@ -88,7 +88,7 @@ i386_register_u_addr (blockend, regnum) } -#ifdef TARGET_CAN_USE_HARDWARE_WATCHPOINT +#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS #if !defined (offsetof) #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER) @@ -272,7 +272,7 @@ i386_stopped_by_watchpoint (pid) return 0; } -#endif /* TARGET_CAN_USE_HARDWARE_WATCHPOINT */ +#endif /* TARGET_HAS_HARDWARE_WATCHPOINTS */ #if 0 /* using FLOAT_INFO as is would be a problem. FLOAT_INFO is called diff --git a/gdb/procfs.c b/gdb/procfs.c index dba7599cde..c2605d5738 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -3659,7 +3659,7 @@ procfs_can_run () { return(1); } -#ifdef TARGET_CAN_USE_HARDWARE_WATCHPOINT +#ifdef TARGET_HAS_HARDWARE_WATCHPOINTS /* Insert a watchpoint */ int