[Lldb-commits] [lldb] [lldb] Fix compilation error in ThreadPlanBase fallback tracer (PR #213581)

via lldb-commits lldb-commits at lists.llvm.org
Sun Aug 2 20:00:07 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: saif elden  (saifelden1)

<details>
<summary>Changes</summary>


Fixes a build failure in ThreadPlanBase::ThreadPlanBase when THREAD_PLAN_USE_ASSEMBLY_TRACER is disabled/undefined.

In lldb/source/Target/ThreadPlanBase.cpp the #else fallback branch attempts to instantiate ThreadPlanTracer using m_thread

However, m_thread is a pointer (Thread *) in ThreadPlan.h, whereas the ThreadPlanTracer constructor expects a reference (Thread &).

This PR updates the argument to thread (matching ThreadPlanAssemblyTracer(thread) in the #ifdef block), resolving the compilation error when the fallback branch is taken.

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


1 Files Affected:

- (modified) lldb/source/Target/ThreadPlanBase.cpp (+1-1) 


``````````diff
diff --git a/lldb/source/Target/ThreadPlanBase.cpp b/lldb/source/Target/ThreadPlanBase.cpp
index d4529895a61d7..c8988e9f374ea 100644
--- a/lldb/source/Target/ThreadPlanBase.cpp
+++ b/lldb/source/Target/ThreadPlanBase.cpp
@@ -37,7 +37,7 @@ ThreadPlanBase::ThreadPlanBase(Thread &thread)
 #ifdef THREAD_PLAN_USE_ASSEMBLY_TRACER
   ThreadPlanTracerSP new_tracer_sp(new ThreadPlanAssemblyTracer(thread));
 #else
-  ThreadPlanTracerSP new_tracer_sp(new ThreadPlanTracer(m_thread));
+  ThreadPlanTracerSP new_tracer_sp(new ThreadPlanTracer(thread));
 #endif
   new_tracer_sp->EnableTracing(thread.GetTraceEnabledState());
   SetThreadPlanTracer(new_tracer_sp);

``````````

</details>


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


More information about the lldb-commits mailing list