llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Ben Jackson (puremourning)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/125312.diff


1 Files Affected:

- (modified) lldb/source/Breakpoint/WatchpointList.cpp (+1-1) 


``````````diff
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(

``````````

</details>


https://github.com/llvm/llvm-project/pull/125312
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to