public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix read and access watchpoint can't stop
@ 2020-06-17 16:17 Heiher
  2020-06-17 16:38 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Heiher @ 2020-06-17 16:17 UTC (permalink / raw)
  To: gdb-patches; +Cc: Heiher

gdb/ChangeLog:

2020-06-17  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 0a2dc2275d..ecd2ef7c65 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-17  Heiher  <r@hev.cc>
+
+	* breakpoint.c (bpstat_check_watchpoint):
+	Fix read and access watchpoint can't stop.
+
 2020-06-17  Heiher  <r@hev.cc>
 
 	* mips-linux-nat.c (mips_linux_nat_target::can_use_hw_breakpoint):
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index aead882acd..669ae191ab 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4952,7 +4952,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.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-18 15:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 16:17 [PATCH] Fix read and access watchpoint can't stop Heiher
2020-06-17 16:38 ` Eli Zaretskii
2020-06-18  2:05   ` Hev
2020-06-18 13:35     ` Eli Zaretskii
2020-06-18 15:35       ` Hev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).