[Lldb-commits] [lldb] LLDB: correct event when removing all watchpoints (PR #125312)
Ben Jackson via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 31 14:46:05 PST 2025
https://github.com/puremourning updated https://github.com/llvm/llvm-project/pull/125312
>From 0bf7cf47b3373f3bd23802fcd41f6b831fff6adf Mon Sep 17 00:00:00 2001
From: Ben Jackson <puremourning at gmail.com>
Date: Fri, 31 Jan 2025 22:38:04 +0000
Subject: [PATCH] LLDB: correct event when removing all watchpoints
Previously we incorrectly checked for a "breakpoint changed" event
listener removing all watchpoints (e.g. via
SBTarget::DeleteAllWatchpoints()), although we would emit a "watchpoint
changed" event if there were a listener for 'breakpoint changed'.
This meant that we might not emit a "watchpoint changed" event if there
was a listener for this event.
Correct it to check for the "watchpoint changed" event.
---
lldb/source/Breakpoint/WatchpointList.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/source/Breakpoint/WatchpointList.cpp b/lldb/source/Breakpoint/WatchpointList.cpp
index f7564483e6f1fc..57369b76c03aff 100644
--- a/lldb/source/Breakpoint/WatchpointList.cpp
+++ b/lldb/source/Breakpoint/WatchpointList.cpp
@@ -236,7 +236,7 @@ void WatchpointList::RemoveAll(bool notify) {
wp_collection::iterator pos, end = m_watchpoints.end();
for (pos = m_watchpoints.begin(); pos != end; ++pos) {
if ((*pos)->GetTarget().EventTypeHasListeners(
- Target::eBroadcastBitBreakpointChanged)) {
+ Target::eBroadcastBitWatchpointChanged)) {
auto data_sp = std::make_shared<Watchpoint::WatchpointEventData>(
eWatchpointEventTypeRemoved, *pos);
(*pos)->GetTarget().BroadcastEvent(
More information about the lldb-commits
mailing list