[Lldb-commits] [lldb] [lldb] ThreadList tid_t to lldb::tid_t (PR #232608)

Dhruv Srivastava via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 22 23:15:10 PDT 2026


https://github.com/DhruvSrivastavaX updated https://github.com/llvm/llvm-project/pull/232608

>From 26fae4949156b94043a46dd502ebee8e04cf67c9 Mon Sep 17 00:00:00 2001
From: DhruvSrivastavaX <dhruv.srivastava at ibm.com>
Date: Fri, 16 Oct 2026 01:10:38 -0500
Subject: [PATCH 1/2] ThreadList tid_t to lldb::tid_t

---
 lldb/source/Target/ThreadList.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp
index 7d2feffeca11db..2a2b0a4ff71118 100644
--- a/lldb/source/Target/ThreadList.cpp
+++ b/lldb/source/Target/ThreadList.cpp
@@ -933,7 +933,7 @@ ThreadList::ExpressionExecutionThreadPusher::ExpressionExecutionThreadPusher(
 }
 
 void ThreadList::RegisterThreadSteppingOverBreakpoint(addr_t breakpoint_addr,
-                                                      tid_t tid) {
+                                                      lldb::tid_t tid) {
   std::lock_guard<std::recursive_mutex> guard(GetMutex());
   m_threads_stepping_over_bp[breakpoint_addr].insert(tid);
 
@@ -947,7 +947,7 @@ void ThreadList::RegisterThreadSteppingOverBreakpoint(addr_t breakpoint_addr,
 }
 
 void ThreadList::ThreadFinishedSteppingOverBreakpoint(addr_t breakpoint_addr,
-                                                      tid_t tid) {
+                                                      lldb::tid_t tid) {
   std::lock_guard<std::recursive_mutex> guard(GetMutex());
 
   Log *log = GetLog(LLDBLog::Step);

>From a1cf6dae31c02d9aaeaccd5bd42c247f7772f4a8 Mon Sep 17 00:00:00 2001
From: DhruvSrivastavaX <dhruv.srivastava at ibm.com>
Date: Fri, 23 Oct 2026 01:14:54 -0500
Subject: [PATCH 2/2] Covered other occurences

---
 lldb/source/API/SBProcess.cpp                                 | 2 +-
 lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp | 4 ++--
 lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp           | 2 +-
 .../Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp       | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index 53d8d3c3e5ddf8..bcfd6937671ebf 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -702,7 +702,7 @@ void SBProcess::SendAsyncInterrupt() {
   }
 }
 
-SBThread SBProcess::GetThreadByID(tid_t tid) {
+SBThread SBProcess::GetThreadByID(lldb::tid_t tid) {
   LLDB_INSTRUMENT_VA(this, tid);
 
   SBThread sb_thread;
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
index 1bc6e87a5d0ec1..86ea02e05ceb25 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -667,7 +667,7 @@ void ProcessWindows::OnDebuggerConnected(lldb::addr_t image_base) {
   ThreadSP main_thread =
       std::make_shared<TargetThreadWindows>(*this, host_main_thread);
 
-  tid_t id = host_main_thread.GetNativeThread().GetThreadId();
+  lldb::tid_t id = host_main_thread.GetNativeThread().GetThreadId();
   main_thread->SetID(id);
 
   m_session_data->m_new_threads[id] = main_thread;
@@ -770,7 +770,7 @@ void ProcessWindows::OnCreateThread(const HostThread &new_thread) {
   ThreadSP thread = std::make_shared<TargetThreadWindows>(*this, new_thread);
 
   const HostNativeThread &native_new_thread = new_thread.GetNativeThread();
-  tid_t id = native_new_thread.GetThreadId();
+  lldb::tid_t id = native_new_thread.GetThreadId();
   thread->SetID(id);
 
   m_session_data->m_new_threads[id] = thread;
diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
index 740af59d0c1abf..cd3f6eca0182ef 100644
--- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
@@ -577,7 +577,7 @@ Error TraceIntelPT::DoRefreshLiveProcessState(TraceGetStateResponse state,
     for (const TraceCpuState &cpu : *intelpt_state->cpus)
       cpus.push_back(cpu.id);
 
-    std::vector<tid_t> tids;
+    std::vector<lldb::tid_t> tids;
     for (const TraceThreadState &thread : intelpt_state->traced_threads)
       tids.push_back(thread.tid);
 
diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
index c00eebc823a8c7..33cec53c62b6a7 100644
--- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
@@ -330,7 +330,7 @@ Error TraceIntelPTBundleLoader::AugmentThreadsFromContextSwitches(
                              "context switch information is provided.");
 
   DenseMap<lldb::pid_t, JSONProcess *> indexed_processes;
-  DenseMap<JSONProcess *, DenseSet<tid_t>> indexed_threads;
+  DenseMap<JSONProcess *, DenseSet<lldb::tid_t>> indexed_threads;
 
   for (JSONProcess &process : *bundle_description.processes) {
     indexed_processes[process.pid] = &process;
@@ -338,7 +338,7 @@ Error TraceIntelPTBundleLoader::AugmentThreadsFromContextSwitches(
       indexed_threads[&process].insert(thread.tid);
   }
 
-  auto on_thread_seen = [&](lldb::pid_t pid, tid_t tid) {
+  auto on_thread_seen = [&](lldb::pid_t pid, lldb::tid_t tid) {
     auto proc = indexed_processes.find(pid);
     if (proc == indexed_processes.end())
       return;



More information about the lldb-commits mailing list