From ea561dcffb7f49b339af2ed90efcfb87f56b9f74 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 12 Oct 2012 23:32:11 +0000 Subject: [PATCH] SBProcess::SetSelectedThreadByID() had a "uint32_t tid" parameter which would truncate 64 bit thread IDs (lldb::tid_t is 64 bit). llvm-svn: 165852 --- lldb/include/lldb/API/SBProcess.h | 5 ++++- lldb/scripts/Python/interface/SBProcess.i | 2 +- lldb/source/API/SBProcess.cpp | 8 +++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lldb/include/lldb/API/SBProcess.h b/lldb/include/lldb/API/SBProcess.h index 76c34e729acb..c6960917a56b 100644 --- a/lldb/include/lldb/API/SBProcess.h +++ b/lldb/include/lldb/API/SBProcess.h @@ -116,7 +116,10 @@ public: SetSelectedThread (const lldb::SBThread &thread); bool - SetSelectedThreadByID (uint32_t tid); + SetSelectedThreadByID (uint32_t tid); // DEPRECATED + + bool + SetSelectedThreadByID (lldb::tid_t tid); bool SetSelectedThreadByIndexID (uint32_t index_id); diff --git a/lldb/scripts/Python/interface/SBProcess.i b/lldb/scripts/Python/interface/SBProcess.i index 2a7bb77dd8ce..c62caa39d088 100644 --- a/lldb/scripts/Python/interface/SBProcess.i +++ b/lldb/scripts/Python/interface/SBProcess.i @@ -158,7 +158,7 @@ public: SetSelectedThread (const lldb::SBThread &thread); bool - SetSelectedThreadByID (uint32_t tid); + SetSelectedThreadByID (lldb::tid_t tid); bool SetSelectedThreadByIndexID (uint32_t index_id); diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp index ea2638c4d846..e10787482178 100644 --- a/lldb/source/API/SBProcess.cpp +++ b/lldb/source/API/SBProcess.cpp @@ -397,6 +397,12 @@ SBProcess::SetSelectedThread (const SBThread &thread) bool SBProcess::SetSelectedThreadByID (uint32_t tid) +{ + return SetSelectedThreadByID ((lldb::tid_t)tid); +} + +bool +SBProcess::SetSelectedThreadByID (lldb::tid_t tid) { LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -409,7 +415,7 @@ SBProcess::SetSelectedThreadByID (uint32_t tid) } if (log) - log->Printf ("SBProcess(%p)::SetSelectedThreadByID (tid=0x%4.4x) => %s", + log->Printf ("SBProcess(%p)::SetSelectedThreadByID (tid=0x%4.4llx) => %s", process_sp.get(), tid, (ret_val ? "true" : "false")); return ret_val;