From 3a3bc038c6dd5faa235dc1a13415ed1f0215c06d Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 4 Sep 2003 18:04:25 +0000 Subject: [PATCH] 2003-09-04 Andrew Cagney * 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. --- gdb/ChangeLog | 12 ++++++++++++ gdb/config/mips/nm-irix4.h | 2 -- gdb/config/mips/nm-irix5.h | 2 -- gdb/config/mips/tm-embed.h | 11 ----------- gdb/config/pa/nm-hppah.h | 6 ------ gdb/hppa-tdep.c | 6 ++++++ gdb/mips-tdep.c | 11 ++++++++--- 7 files changed, 26 insertions(+), 24 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fe40552b8cd..e999fb985a0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2003-09-04 Andrew Cagney + + * 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. + 2003-09-04 Corinna Vinschen * breakpoint.c (watchpoint_check): Remove accidentally checked in diff --git a/gdb/config/mips/nm-irix4.h b/gdb/config/mips/nm-irix4.h index bf4a02c2fc4..a2d9836cbba 100644 --- a/gdb/config/mips/nm-irix4.h +++ b/gdb/config/mips/nm-irix4.h @@ -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) \ diff --git a/gdb/config/mips/nm-irix5.h b/gdb/config/mips/nm-irix5.h index 4507ad1d7fb..6bdab300b19 100644 --- a/gdb/config/mips/nm-irix5.h +++ b/gdb/config/mips/nm-irix5.h @@ -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) \ diff --git a/gdb/config/mips/tm-embed.h b/gdb/config/mips/tm-embed.h index 31f703fecbd..ada9bfd5fdf 100644 --- a/gdb/config/mips/tm-embed.h +++ b/gdb/config/mips/tm-embed.h @@ -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 diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h index 05e7db2b91f..25cb1ac1649 100644 --- a/gdb/config/pa/nm-hppah.h +++ b/gdb/config/pa/nm-hppah.h @@ -169,12 +169,6 @@ extern int hppa_can_use_hw_watchpoint (int type, int cnt, int ot); ! 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 diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index c5b010c665c..1f0b3d06191 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -5205,6 +5205,12 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 727620986b1..ad268b6dd66 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -6120,6 +6120,14 @@ mips_gdbarch_init (struct gdbarch_info info, 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 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) 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); -- 2.30.2