[Lldb-commits] [lldb] [lldb] Override Should{Select, Show} in StopReasonBreakpoint (PR #135637)

via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 14 09:02:06 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Felipe de Azevedo Piovezan (felipepiovezan)

<details>
<summary>Changes</summary>

This is necessary so that LLDB does not select (or show the stop reason for) a thread which stopped at an internal breakpoint.

Other than manual testing/inspection, which I've done, this does not seem to lend itself to API testing, as we cannot set internal breakpoints through the SBAPI.

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


1 Files Affected:

- (modified) lldb/source/Target/StopInfo.cpp (+8) 


``````````diff
diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp
index f1272a723a8cb..6bdc467af6746 100644
--- a/lldb/source/Target/StopInfo.cpp
+++ b/lldb/source/Target/StopInfo.cpp
@@ -263,6 +263,14 @@ class StopInfoBreakpoint : public StopInfo {
     return bp_site_sp->GetSuggestedStackFrameIndex();
   }
 
+  bool ShouldShow() const override {
+    return !m_was_all_internal;
+  }
+
+  bool ShouldSelect() const override {
+    return !m_was_all_internal;
+  }
+
 protected:
   bool ShouldStop(Event *event_ptr) override {
     // This just reports the work done by PerformAction or the synchronous

``````````

</details>


https://github.com/llvm/llvm-project/pull/135637


More information about the lldb-commits mailing list