This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] 2018-03-27 Heiher <r at hev dot cc>


From: Heiher <r@hev.cc>

	* breakpoint.c (bpstat_check_watchpoint):
	Fix read and access watchpoint can't stop.
---
 gdb/ChangeLog    | 5 +++++
 gdb/breakpoint.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 64130c5392..730a4ef5b3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-03-27  Heiher  <r@hev.cc>
+
+	* breakpoint.c (bpstat_check_watchpoint):
+	Fix read and access watchpoint can't stop.
+
 2018-03-26  Tom Tromey  <tom@tromey.com>
 
 	* stack.c (backtrace_command_1): Remove verbose code.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 9de0e6330c..221260dbf7 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -5039,7 +5039,7 @@ bpstat_check_watchpoint (bpstat bs)
 	   this watchpoint.  */
 	must_check_value = 1;
       else if (b->watchpoint_triggered == watch_triggered_unknown
-	       && b->type == bp_hardware_watchpoint)
+	       && is_hardware_watchpoint (bs->breakpoint_at))
 	/* We were stopped by a hardware watchpoint, but the target could
 	   not report the data address.  We must check the watchpoint's
 	   value.  Access and read watchpoints are out of luck; without
-- 
2.16.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]