Add accessors on process to get & set the selected thread by IndexID (useful since that's the one that "thread list" shows and it won't get reused even if the underlying system thread ID gets reused.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160187 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/interface/SBProcess.i b/scripts/Python/interface/SBProcess.i
index 4efc135..018e2c2 100644
--- a/scripts/Python/interface/SBProcess.i
+++ b/scripts/Python/interface/SBProcess.i
@@ -127,12 +127,30 @@
uint32_t
GetNumThreads ();
+ %feature("autodoc", "
+ Returns the INDEX'th thread from the list of current threads. The index
+ of a thread is only valid for the current stop. For a persistent thread
+ identifier use either the thread ID or the IndexID. See help on SBThread
+ for more details.
+ ") GetThreadAtIndex;
lldb::SBThread
GetThreadAtIndex (size_t index);
+ %feature("autodoc", "
+ Returns the thread with the given thread ID.
+ ") GetThreadByID;
lldb::SBThread
GetThreadByID (lldb::tid_t sb_thread_id);
+
+ %feature("autodoc", "
+ Returns the thread with the given thread IndexID.
+ ") GetThreadByIndexID;
+ lldb::SBThread
+ GetThreadByIndexID (uint32_t index_id);
+ %feature("autodoc", "
+ Returns the currently selected thread.
+ ") GetSelectedThread;
lldb::SBThread
GetSelectedThread () const;
@@ -142,6 +160,9 @@
bool
SetSelectedThreadByID (uint32_t tid);
+ bool
+ SetSelectedThreadByIndexID (uint32_t index_id);
+
//------------------------------------------------------------------
// Stepping related functions
//------------------------------------------------------------------