diff options
Diffstat (limited to 'lldb/scripts/Python/interface')
-rw-r--r-- | lldb/scripts/Python/interface/SBProcess.i | 21 | ||||
-rw-r--r-- | lldb/scripts/Python/interface/SBThread.i | 6 |
2 files changed, 27 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBProcess.i b/lldb/scripts/Python/interface/SBProcess.i index 4efc1359d24..018e2c20c44 100644 --- a/lldb/scripts/Python/interface/SBProcess.i +++ b/lldb/scripts/Python/interface/SBProcess.i @@ -127,12 +127,30 @@ public: 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 @@ public: bool SetSelectedThreadByID (uint32_t tid); + bool + SetSelectedThreadByIndexID (uint32_t index_id); + //------------------------------------------------------------------ // Stepping related functions //------------------------------------------------------------------ diff --git a/lldb/scripts/Python/interface/SBThread.i b/lldb/scripts/Python/interface/SBThread.i index ac6e699fcc6..2f012ecf715 100644 --- a/lldb/scripts/Python/interface/SBThread.i +++ b/lldb/scripts/Python/interface/SBThread.i @@ -12,6 +12,12 @@ namespace lldb { %feature("docstring", "Represents a thread of execution. SBProcess contains SBThread(s). +SBThreads can be referred to by their ID, which maps to the system specific thread +identifier, or by IndexID. The ID may or may not be unique depending on whether the +system reuses its thread identifiers. The IndexID is a monotonically increasing identifier +that will always uniquely reference a particular thread, and when that thread goes +away it will not be reused. + SBThread supports frame iteration. For example (from test/python_api/ lldbutil/iter/TestLLDBIterator.py), |