This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[PATCH] config/i386/nm-i386sol2.h: Fix for step over watchpoint problems
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH] config/i386/nm-i386sol2.h: Fix for step over watchpoint problems
- From: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Date: Thu, 13 Apr 2000 20:17:38 MET DST
FYI,
I checked in the attached patch to trunk and branch.
It gets rid of the following testsuite regressions on Solaris x86 2.6 and 2.7:
FAIL: gdb.base/watchpoint.exp: until to ival1 assignment
FAIL: gdb.base/watchpoint.exp: until to ival3 assignment
FAIL: gdb.base/watchpoint.exp: until out of loop
FAIL: gdb.base/watchpoint.exp: step to ival2 assignment
2000-04-13 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
* config/i386/nm-i386sol2.h (CANNOT_STEP_HW_WATCHPOINTS): Define.
--- ./config/i386/nm-i386sol2.h.orig Fri Apr 7 18:29:46 2000
+++ ./config/i386/nm-i386sol2.h Sat Apr 8 12:56:29 2000
@@ -34,6 +34,16 @@
It will *NOT* be necessary for GDB to step over the watchpoint. */
#define HAVE_CONTINUABLE_WATCHPOINT
+/* Solaris x86 2.6 and 2.7 targets 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. */
+#define CANNOT_STEP_HW_WATCHPOINTS
+
extern int procfs_stopped_by_watchpoint PARAMS ((int));
#define STOPPED_BY_WATCHPOINT(W) \
procfs_stopped_by_watchpoint(inferior_pid)
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de