https://github.com/puremourning created https://github.com/llvm/llvm-project/pull/125312
Previously we incorrectly emitted a "breakpoint changed" event when removing all watchpoints (e.g. via SBTarget::DeleteAllWatchpoints()). Correct it to emit the "watchpoint changed" event, as that's what "Remove" does and what it checks for being registered. --- No test for now. It looks possible to add one though. >From c6c6e9bb4069193f1e3387492278ccad89df2ebd Mon Sep 17 00:00:00 2001 From: Ben Jackson <puremourn...@gmail.com> Date: Fri, 31 Jan 2025 22:38:04 +0000 Subject: [PATCH] LLDB: correct event when removing all watchpoints Previously we incorrectly emitted a "breakpoint changed" event when removing all watchpoints (e.g. via SBTarget::DeleteAllWatchpoints()). Correct it to emit the "watchpoint changed" event, as that's what "Remove" does and what it checks for being registered. --- 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 f7564483e6f1fcd..57369b76c03aff0 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( _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits