[Lldb-commits] [lldb] [lldb] Implement bidirectional access for backing<->backed thread relationship (PR #125300)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 31 13:49:45 PST 2025


================
@@ -72,12 +72,17 @@ class ThreadMemory : public lldb_private::Thread {
 
   void ClearStackFrames() override;
 
-  void ClearBackingThread() override { m_backing_thread_sp.reset(); }
+  void ClearBackingThread() override {
+    if (m_backing_thread_sp)
+      m_backing_thread_sp->ClearBackedThread();
+    m_backing_thread_sp.reset();
+  }
----------------
felipepiovezan wrote:

I really wanted to make `ClearBackedThread` a protected member of Thread, but then we can't access it here. Protected only works if you're going through `this`.

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


More information about the lldb-commits mailing list