diff --git a/lldb/include/lldb/Target/Thread.h b/lldb/include/lldb/Target/Thread.h --- a/lldb/include/lldb/Target/Thread.h +++ b/lldb/include/lldb/Target/Thread.h @@ -1243,8 +1243,8 @@ uint32_t m_stop_info_override_stop_id; // The stop ID containing the last time // the stop info was checked against // the stop info override - const uint32_t m_index_id; ///< A unique 1 based index assigned to each thread - ///for easy UI/command line access. + uint32_t m_index_id; ///< A unique 1 based index assigned to each thread + /// for easy UI/command line access. lldb::RegisterContextSP m_reg_context_sp; ///< The register context for this ///thread's current register state. lldb::StateType m_state; ///< The state of our process. diff --git a/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp b/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp --- a/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp +++ b/lldb/source/Plugins/Process/scripted/ScriptedThread.cpp @@ -75,6 +75,8 @@ lldb::tid_t tid = scripted_thread_interface->GetThreadID(); SetID(tid); + process.AssignIndexIDToThread(tid); + m_index_id = process.GetNextThreadIndexID(tid); } ScriptedThread::~ScriptedThread() { DestroyThread(); }