This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit/mips/hpux] Move HAVE_NONSTEPPABLE_WATCHPOINT to multi-arch
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 04 Sep 2003 14:02:09 -0400
- Subject: [commit/mips/hpux] Move HAVE_NONSTEPPABLE_WATCHPOINT to multi-arch
Hello,
This is mostly a forward step. It moves the various #define
HAVE_NONSTEPPABLE_WATCHPOINT into the architecture vector. More steps
are needed though - the other variations on NONSTEPPABLE all need to be
combined into an enum and moved into the architecture and/or target vector.
Note that both the architecture needs to set nonsteppable watchpoints
and the target needs supply stopped_by_watchpoint for anything to
happen. Hence, having the architecture unconditionally set this is safe.
committed,
Andrew
2003-09-04 Andrew Cagney <cagney@redhat.com>
* hppa-tdep.c (hppa_gdbarch_init): Set
"have_nonsteppable_watchpoint".
* config/pa/nm-hppah.h (HAVE_NONSTEPPABLE_WATCHPOINT): Delete.
* mips-tdep.c (mips_dump_tdep): Do not print
HAVE_NONSTEPPABLE_WATCHPOINT.
(mips_gdbarch_init): Set "have_nonsteppable_watchpoint".
* config/mips/tm-embed.h (HAVE_NONSTEPPABLE_WATCHPOINT): Delete.
* config/mips/nm-irix5.h (HAVE_NONSTEPPABLE_WATCHPOINT): Delete.
* config/mips/nm-irix4.h (HAVE_NONSTEPPABLE_WATCHPOINT): Delete.
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.90
diff -u -r1.90 hppa-tdep.c
--- hppa-tdep.c 28 Aug 2003 03:03:44 -0000 1.90
+++ hppa-tdep.c 4 Sep 2003 17:54:35 -0000
@@ -5205,6 +5205,12 @@
set_gdbarch_print_insn (gdbarch, print_insn_hppa);
+ /* When a hardware watchpoint triggers, we'll move the inferior past
+ it by removing all eventpoints; stepping past the instruction
+ that caused the trigger; reinserting eventpoints; and checking
+ whether any watched location changed. */
+ set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
+
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.226
diff -u -r1.226 mips-tdep.c
--- mips-tdep.c 28 Aug 2003 04:34:19 -0000 1.226
+++ mips-tdep.c 4 Sep 2003 17:54:37 -0000
@@ -6120,6 +6120,14 @@
set_gdbarch_print_insn (gdbarch, gdb_print_insn_mips);
+ /* FIXME: cagney/2003-08-29: The macros HAVE_STEPPABLE_WATCHPOINT,
+ HAVE_NONSTEPPABLE_WATCHPOINT, and HAVE_CONTINUABLE_WATCHPOINT
+ need to all be folded into the target vector. Since they are
+ being used as guards for STOPPED_BY_WATCHPOINT, why not have
+ STOPPED_BY_WATCHPOINT return the type of watchpoint that the code
+ is sitting on? */
+ set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
+
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
@@ -6300,9 +6308,6 @@
fprintf_unfiltered (file,
"mips_dump_tdep: GDB_TARGET_IS_MIPS64 = %d\n",
GDB_TARGET_IS_MIPS64);
- fprintf_unfiltered (file,
- "mips_dump_tdep: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
- XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
fprintf_unfiltered (file,
"mips_dump_tdep: HI_REGNUM = %d\n",
HI_REGNUM);
Index: config/mips/nm-irix4.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/nm-irix4.h,v
retrieving revision 1.5
diff -u -r1.5 nm-irix4.h
--- config/mips/nm-irix4.h 14 Oct 2002 20:46:58 -0000 1.5
+++ config/mips/nm-irix4.h 4 Sep 2003 17:54:37 -0000
@@ -54,8 +54,6 @@
procfs_stopped_by_watchpoint(inferior_ptid)
extern int procfs_stopped_by_watchpoint (ptid_t);
-#define HAVE_NONSTEPPABLE_WATCHPOINT 1
-
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
#define target_insert_watchpoint(ADDR, LEN, TYPE) \
Index: config/mips/nm-irix5.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/nm-irix5.h,v
retrieving revision 1.7
diff -u -r1.7 nm-irix5.h
--- config/mips/nm-irix5.h 14 Oct 2002 20:46:58 -0000 1.7
+++ config/mips/nm-irix5.h 4 Sep 2003 17:54:37 -0000
@@ -36,8 +36,6 @@
procfs_stopped_by_watchpoint(inferior_ptid)
extern int procfs_stopped_by_watchpoint (ptid_t);
-#define HAVE_NONSTEPPABLE_WATCHPOINT 1
-
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
#define target_insert_watchpoint(ADDR, LEN, TYPE) \
Index: config/mips/tm-embed.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-embed.h,v
retrieving revision 1.8
diff -u -r1.8 tm-embed.h
--- config/mips/tm-embed.h 29 Aug 2003 16:18:06 -0000 1.8
+++ config/mips/tm-embed.h 4 Sep 2003 17:54:37 -0000
@@ -18,14 +18,3 @@
Boston, MA 02111-1307, USA. */
#include "mips/tm-mips.h"
-
-/* We need to remove watchpoints when stepping, else we hit them again! */
-
-/* FIXME: cagney/2003-08-29: The macros HAVE_STEPPABLE_WATCHPOINT,
- HAVE_NONSTEPPABLE_WATCHPOINT, and HAVE_CONTINUABLE_WATCHPOINT need
- to all be folded into the target vector. Since they are being used
- as guards for STOPPED_BY_WATCHPOINT, why not have
- STOPPED_BY_WATCHPOINT return the type of watchpoint that the code
- is sitting on? */
-
-#define HAVE_NONSTEPPABLE_WATCHPOINT 1
Index: config/pa/nm-hppah.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/nm-hppah.h,v
retrieving revision 1.15
diff -u -r1.15 nm-hppah.h
--- config/pa/nm-hppah.h 19 Jun 2003 15:04:58 -0000 1.15
+++ config/pa/nm-hppah.h 4 Sep 2003 17:54:37 -0000
@@ -169,12 +169,6 @@
! stepped_after_stopped_by_watchpoint && \
bpstat_have_active_hw_watchpoints ())
-/* When a hardware watchpoint triggers, we'll move the inferior past it
- by removing all eventpoints; stepping past the instruction that caused
- the trigger; reinserting eventpoints; and checking whether any watched
- location changed. */
-#define HAVE_NONSTEPPABLE_WATCHPOINT 1
-
/* Our implementation of "hardware" watchpoints uses memory page-protection
faults. However, HP-UX has unfortunate interactions between these and
system calls; basically, it's unsafe to have page protections on when a