mib updated this revision to Diff 399172.
mib edited the summary of this revision.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117076/new/

https://reviews.llvm.org/D117076

Files:
  lldb/include/lldb/Target/Thread.h
  lldb/source/Plugins/Process/scripted/ScriptedThread.cpp


Index: lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
===================================================================
--- lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
+++ 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(); }
Index: lldb/include/lldb/Target/Thread.h
===================================================================
--- lldb/include/lldb/Target/Thread.h
+++ 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.


Index: lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
===================================================================
--- lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
+++ 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(); }
Index: lldb/include/lldb/Target/Thread.h
===================================================================
--- lldb/include/lldb/Target/Thread.h
+++ 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.
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to