summaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2000-03-28 22:30:19 +0000
committerMichael Snyder <msnyder@specifix.com>2000-03-28 22:30:19 +0000
commit16878a13c0c1d0a9034b548b0f64d7ff7a1cdeb3 (patch)
treebec3ee20da9a40bd3a74e30592d3323f8fb0c2a2 /gdb/infrun.c
parent5679036e207c1d847846f52d251639d48806099a (diff)
downloadgdb-16878a13c0c1d0a9034b548b0f64d7ff7a1cdeb3.tar.gz
2000-03-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
breakpoint.c, breakpoint.h (remove_hw_watchpoints): New function. infrun.c (resume): Remove hardware watchpoints before stepping when CANNOT_STEP_HW_WATCHPOINTS is nonzero.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 96a659ebf4a..6bc32d803be 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -296,6 +296,13 @@ a command like `return' or `jump' to continue execution.\n");
#define HAVE_CONTINUABLE_WATCHPOINT 1
#endif
+#ifndef CANNOT_STEP_HW_WATCHPOINTS
+#define CANNOT_STEP_HW_WATCHPOINTS 0
+#else
+#undef CANNOT_STEP_HW_WATCHPOINTS
+#define CANNOT_STEP_HW_WATCHPOINTS 1
+#endif
+
/* Tables of how to react to signals; the user sets them. */
static unsigned char *signal_stop;
@@ -796,6 +803,18 @@ resume (int step, enum target_signal sig)
step = 0;
#endif
+ /* Some targets (e.g. Solaris x86) have a kernel bug when stepping
+ over an instruction that causes a page fault without triggering
+ a hardware watchpoint. The kernel properly notices that it shouldn't
+ stop, because the hardware watchpoint is not triggered, but it forgets
+ the step request and continues the program normally.
+ Work around the problem by removing hardware watchpoints if a step is
+ requested, GDB will check for a hardware watchpoint trigger after the
+ step anyway. */
+ if (CANNOT_STEP_HW_WATCHPOINTS && step && breakpoints_inserted)
+ remove_hw_watchpoints ();
+
+
/* Normally, by the time we reach `resume', the breakpoints are either
removed or inserted, as appropriate. The exception is if we're sitting
at a permanent breakpoint; we need to step over it, but permanent