<rdar://problem/12490558>
SBProcess::SetSelectedThreadByID() had a "uint32_t tid" parameter which would truncate 64 bit thread IDs (lldb::tid_t is 64 bit).
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165852 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/lldb/API/SBProcess.h b/include/lldb/API/SBProcess.h
index 76c34e7..c696091 100644
--- a/include/lldb/API/SBProcess.h
+++ b/include/lldb/API/SBProcess.h
@@ -116,7 +116,10 @@
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/scripts/Python/interface/SBProcess.i b/scripts/Python/interface/SBProcess.i
index 2a7bb77..c62caa3 100644
--- a/scripts/Python/interface/SBProcess.i
+++ b/scripts/Python/interface/SBProcess.i
@@ -158,7 +158,7 @@
SetSelectedThread (const lldb::SBThread &thread);
bool
- SetSelectedThreadByID (uint32_t tid);
+ SetSelectedThreadByID (lldb::tid_t tid);
bool
SetSelectedThreadByIndexID (uint32_t index_id);
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index ea2638c..e107874 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -398,6 +398,12 @@
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));
bool ret_val = false;
@@ -409,7 +415,7 @@
}
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;