1061da546Spatrick //===-- SWIG Interface for SBThread -----------------------------*- C++ -*-===// 2061da546Spatrick // 3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information. 5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6061da546Spatrick // 7061da546Spatrick //===----------------------------------------------------------------------===// 8061da546Spatrick 9061da546Spatrick namespace lldb { 10061da546Spatrick 11061da546Spatrick %feature("docstring", 12be691f3bSpatrick "Represents a thread of execution. :py:class:`SBProcess` contains SBThread(s). 13061da546Spatrick 14061da546Spatrick SBThreads can be referred to by their ID, which maps to the system specific thread 15061da546Spatrick identifier, or by IndexID. The ID may or may not be unique depending on whether the 16061da546Spatrick system reuses its thread identifiers. The IndexID is a monotonically increasing identifier 17061da546Spatrick that will always uniquely reference a particular thread, and when that thread goes 18061da546Spatrick away it will not be reused. 19061da546Spatrick 20061da546Spatrick SBThread supports frame iteration. For example (from test/python_api/ 21be691f3bSpatrick lldbutil/iter/TestLLDBIterator.py), :: 22061da546Spatrick 23061da546Spatrick from lldbutil import print_stacktrace 24061da546Spatrick stopped_due_to_breakpoint = False 25061da546Spatrick for thread in process: 26061da546Spatrick if self.TraceOn(): 27061da546Spatrick print_stacktrace(thread) 28061da546Spatrick ID = thread.GetThreadID() 29061da546Spatrick if thread.GetStopReason() == lldb.eStopReasonBreakpoint: 30061da546Spatrick stopped_due_to_breakpoint = True 31061da546Spatrick for frame in thread: 32061da546Spatrick self.assertTrue(frame.GetThread().GetThreadID() == ID) 33061da546Spatrick if self.TraceOn(): 34061da546Spatrick print frame 35061da546Spatrick 36061da546Spatrick self.assertTrue(stopped_due_to_breakpoint) 37061da546Spatrick 38be691f3bSpatrick See also :py:class:`SBFrame` ." 39061da546Spatrick ) SBThread; 40061da546Spatrick class SBThread 41061da546Spatrick { 42061da546Spatrick public: 43061da546Spatrick //------------------------------------------------------------------ 44061da546Spatrick // Broadcaster bits. 45061da546Spatrick //------------------------------------------------------------------ 46061da546Spatrick enum 47061da546Spatrick { 48061da546Spatrick eBroadcastBitStackChanged = (1 << 0), 49061da546Spatrick eBroadcastBitThreadSuspended = (1 << 1), 50061da546Spatrick eBroadcastBitThreadResumed = (1 << 2), 51061da546Spatrick eBroadcastBitSelectedFrameChanged = (1 << 3), 52061da546Spatrick eBroadcastBitThreadSelected = (1 << 4) 53061da546Spatrick }; 54061da546Spatrick 55061da546Spatrick 56061da546Spatrick SBThread (); 57061da546Spatrick 58061da546Spatrick SBThread (const lldb::SBThread &thread); 59061da546Spatrick 60061da546Spatrick ~SBThread(); 61061da546Spatrick 62061da546Spatrick static const char * 63061da546Spatrick GetBroadcasterClassName (); 64061da546Spatrick 65061da546Spatrick static bool 66061da546Spatrick EventIsThreadEvent (const SBEvent &event); 67061da546Spatrick 68061da546Spatrick static SBFrame 69061da546Spatrick GetStackFrameFromEvent (const SBEvent &event); 70061da546Spatrick 71061da546Spatrick static SBThread 72061da546Spatrick GetThreadFromEvent (const SBEvent &event); 73061da546Spatrick 74061da546Spatrick bool 75061da546Spatrick IsValid() const; 76061da546Spatrick 77061da546Spatrick explicit operator bool() const; 78061da546Spatrick 79061da546Spatrick void 80061da546Spatrick Clear (); 81061da546Spatrick 82061da546Spatrick lldb::StopReason 83061da546Spatrick GetStopReason(); 84061da546Spatrick 85061da546Spatrick %feature("docstring", " 86061da546Spatrick Get the number of words associated with the stop reason. 87061da546Spatrick See also GetStopReasonDataAtIndex().") GetStopReasonDataCount; 88061da546Spatrick size_t 89061da546Spatrick GetStopReasonDataCount(); 90061da546Spatrick 91061da546Spatrick %feature("docstring", " 92061da546Spatrick Get information associated with a stop reason. 93061da546Spatrick 94061da546Spatrick Breakpoint stop reasons will have data that consists of pairs of 95061da546Spatrick breakpoint IDs followed by the breakpoint location IDs (they always come 96061da546Spatrick in pairs). 97061da546Spatrick 98061da546Spatrick Stop Reason Count Data Type 99061da546Spatrick ======================== ===== ========================================= 100061da546Spatrick eStopReasonNone 0 101061da546Spatrick eStopReasonTrace 0 102061da546Spatrick eStopReasonBreakpoint N duple: {breakpoint id, location id} 103061da546Spatrick eStopReasonWatchpoint 1 watchpoint id 104061da546Spatrick eStopReasonSignal 1 unix signal number 105061da546Spatrick eStopReasonException N exception data 106061da546Spatrick eStopReasonExec 0 107be691f3bSpatrick eStopReasonFork 1 pid of the child process 108be691f3bSpatrick eStopReasonVFork 1 pid of the child process 109be691f3bSpatrick eStopReasonVForkDone 0 110061da546Spatrick eStopReasonPlanComplete 0") GetStopReasonDataAtIndex; 111061da546Spatrick uint64_t 112061da546Spatrick GetStopReasonDataAtIndex(uint32_t idx); 113061da546Spatrick 114061da546Spatrick %feature("autodoc", " 115061da546Spatrick Collects a thread's stop reason extended information dictionary and prints it 116061da546Spatrick into the SBStream in a JSON format. The format of this JSON dictionary depends 117061da546Spatrick on the stop reason and is currently used only for instrumentation plugins.") GetStopReasonExtendedInfoAsJSON; 118061da546Spatrick bool 119061da546Spatrick GetStopReasonExtendedInfoAsJSON (lldb::SBStream &stream); 120061da546Spatrick 121061da546Spatrick %feature("autodoc", " 122061da546Spatrick Returns a collection of historical stack traces that are significant to the 123061da546Spatrick current stop reason. Used by ThreadSanitizer, where we provide various stack 124061da546Spatrick traces that were involved in a data race or other type of detected issue.") GetStopReasonExtendedBacktraces; 125061da546Spatrick SBThreadCollection 126061da546Spatrick GetStopReasonExtendedBacktraces (InstrumentationRuntimeType type); 127061da546Spatrick 128061da546Spatrick 129061da546Spatrick %feature("autodoc", " 130061da546Spatrick Pass only an (int)length and expect to get a Python string describing the 131061da546Spatrick stop reason.") GetStopDescription; 132061da546Spatrick size_t 133061da546Spatrick GetStopDescription (char *dst_or_null, size_t dst_len); 134061da546Spatrick 135061da546Spatrick SBValue 136061da546Spatrick GetStopReturnValue (); 137061da546Spatrick 138061da546Spatrick %feature("autodoc", " 139061da546Spatrick Returns a unique thread identifier (type lldb::tid_t, typically a 64-bit type) 140061da546Spatrick for the current SBThread that will remain constant throughout the thread's 141061da546Spatrick lifetime in this process and will not be reused by another thread during this 142061da546Spatrick process lifetime. On Mac OS X systems, this is a system-wide unique thread 143061da546Spatrick identifier; this identifier is also used by other tools like sample which helps 144061da546Spatrick to associate data from those tools with lldb. See related GetIndexID.") 145061da546Spatrick GetThreadID; 146061da546Spatrick lldb::tid_t 147061da546Spatrick GetThreadID () const; 148061da546Spatrick 149061da546Spatrick %feature("autodoc", " 150061da546Spatrick Return the index number for this SBThread. The index number is the same thing 151061da546Spatrick that a user gives as an argument to 'thread select' in the command line lldb. 152061da546Spatrick These numbers start at 1 (for the first thread lldb sees in a debug session) 153061da546Spatrick and increments up throughout the process lifetime. An index number will not be 154061da546Spatrick reused for a different thread later in a process - thread 1 will always be 155061da546Spatrick associated with the same thread. See related GetThreadID. 156061da546Spatrick This method returns a uint32_t index number, takes no arguments.") 157061da546Spatrick GetIndexID; 158061da546Spatrick uint32_t 159061da546Spatrick GetIndexID () const; 160061da546Spatrick 161061da546Spatrick const char * 162061da546Spatrick GetName () const; 163061da546Spatrick 164061da546Spatrick %feature("autodoc", " 165061da546Spatrick Return the queue name associated with this thread, if any, as a str. 166061da546Spatrick For example, with a libdispatch (aka Grand Central Dispatch) queue.") GetQueueName; 167061da546Spatrick 168061da546Spatrick const char * 169061da546Spatrick GetQueueName() const; 170061da546Spatrick 171061da546Spatrick %feature("autodoc", " 172061da546Spatrick Return the dispatch_queue_id for this thread, if any, as a lldb::queue_id_t. 173061da546Spatrick For example, with a libdispatch (aka Grand Central Dispatch) queue.") GetQueueID; 174061da546Spatrick 175061da546Spatrick lldb::queue_id_t 176061da546Spatrick GetQueueID() const; 177061da546Spatrick 178061da546Spatrick %feature("docstring", " 179061da546Spatrick Takes a path string and a SBStream reference as parameters, returns a bool. 180061da546Spatrick Collects the thread's 'info' dictionary from the remote system, uses the path 181061da546Spatrick argument to descend into the dictionary to an item of interest, and prints 182061da546Spatrick it into the SBStream in a natural format. Return bool is to indicate if 183061da546Spatrick anything was printed into the stream (true) or not (false).") GetInfoItemByPathAsString; 184061da546Spatrick 185061da546Spatrick bool 186061da546Spatrick GetInfoItemByPathAsString (const char *path, lldb::SBStream &strm); 187061da546Spatrick 188061da546Spatrick %feature("autodoc", " 189061da546Spatrick Return the SBQueue for this thread. If this thread is not currently associated 190061da546Spatrick with a libdispatch queue, the SBQueue object's IsValid() method will return false. 191061da546Spatrick If this SBThread is actually a HistoryThread, we may be able to provide QueueID 192061da546Spatrick and QueueName, but not provide an SBQueue. Those individual attributes may have 193061da546Spatrick been saved for the HistoryThread without enough information to reconstitute the 194061da546Spatrick entire SBQueue at that time. 195061da546Spatrick This method takes no arguments, returns an SBQueue.") GetQueue; 196061da546Spatrick 197061da546Spatrick lldb::SBQueue 198061da546Spatrick GetQueue () const; 199061da546Spatrick 200061da546Spatrick void 201061da546Spatrick StepOver (lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); 202061da546Spatrick 203061da546Spatrick %feature("autodoc", 204061da546Spatrick "Do a source level single step over in the currently selected thread.") StepOver; 205061da546Spatrick void 206061da546Spatrick StepOver (lldb::RunMode stop_other_threads, SBError &error); 207061da546Spatrick 208061da546Spatrick void 209061da546Spatrick StepInto (lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); 210061da546Spatrick 211061da546Spatrick void 212061da546Spatrick StepInto (const char *target_name, lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); 213061da546Spatrick 214061da546Spatrick %feature("autodoc", " 215061da546Spatrick Step the current thread from the current source line to the line given by end_line, stopping if 216061da546Spatrick the thread steps into the function given by target_name. If target_name is None, then stepping will stop 217061da546Spatrick in any of the places we would normally stop.") StepInto; 218061da546Spatrick void 219061da546Spatrick StepInto (const char *target_name, 220061da546Spatrick uint32_t end_line, 221061da546Spatrick SBError &error, 222061da546Spatrick lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping); 223061da546Spatrick 224061da546Spatrick void 225061da546Spatrick StepOut (); 226061da546Spatrick 227061da546Spatrick %feature("autodoc", 228061da546Spatrick "Step out of the currently selected thread.") StepOut; 229061da546Spatrick void 230061da546Spatrick StepOut (SBError &error); 231061da546Spatrick 232061da546Spatrick void 233061da546Spatrick StepOutOfFrame (SBFrame &frame); 234061da546Spatrick 235061da546Spatrick %feature("autodoc", 236061da546Spatrick "Step out of the specified frame.") StepOutOfFrame; 237061da546Spatrick void 238061da546Spatrick StepOutOfFrame (SBFrame &frame, SBError &error); 239061da546Spatrick 240061da546Spatrick void 241061da546Spatrick StepInstruction(bool step_over); 242061da546Spatrick 243061da546Spatrick %feature("autodoc", 244061da546Spatrick "Do an instruction level single step in the currently selected thread.") StepInstruction; 245061da546Spatrick void 246061da546Spatrick StepInstruction(bool step_over, SBError &error); 247061da546Spatrick 248061da546Spatrick SBError 249061da546Spatrick StepOverUntil (lldb::SBFrame &frame, 250061da546Spatrick lldb::SBFileSpec &file_spec, 251061da546Spatrick uint32_t line); 252061da546Spatrick 253061da546Spatrick SBError 254061da546Spatrick StepUsingScriptedThreadPlan (const char *script_class_name); 255061da546Spatrick 256061da546Spatrick SBError 257061da546Spatrick StepUsingScriptedThreadPlan (const char *script_class_name, bool resume_immediately); 258061da546Spatrick 259061da546Spatrick SBError 260061da546Spatrick StepUsingScriptedThreadPlan(const char *script_class_name, 261061da546Spatrick lldb::SBStructuredData &args_data, 262061da546Spatrick bool resume_immediately); 263061da546Spatrick 264061da546Spatrick SBError 265061da546Spatrick JumpToLine (lldb::SBFileSpec &file_spec, uint32_t line); 266061da546Spatrick 267061da546Spatrick void 268061da546Spatrick RunToAddress (lldb::addr_t addr); 269061da546Spatrick 270061da546Spatrick void 271061da546Spatrick RunToAddress (lldb::addr_t addr, SBError &error); 272061da546Spatrick 273061da546Spatrick %feature("autodoc", " 274061da546Spatrick Force a return from the frame passed in (and any frames younger than it) 275061da546Spatrick without executing any more code in those frames. If return_value contains 276061da546Spatrick a valid SBValue, that will be set as the return value from frame. Note, at 277061da546Spatrick present only scalar return values are supported.") ReturnFromFrame; 278061da546Spatrick 279061da546Spatrick SBError 280061da546Spatrick ReturnFromFrame (SBFrame &frame, SBValue &return_value); 281061da546Spatrick 282061da546Spatrick %feature("autodoc", " 283061da546Spatrick Unwind the stack frames from the innermost expression evaluation. 284061da546Spatrick This API is equivalent to 'thread return -x'.") UnwindInnermostExpression; 285061da546Spatrick 286061da546Spatrick SBError 287061da546Spatrick UnwindInnermostExpression(); 288061da546Spatrick 289061da546Spatrick %feature("docstring", " 290061da546Spatrick LLDB currently supports process centric debugging which means when any 291061da546Spatrick thread in a process stops, all other threads are stopped. The Suspend() 292061da546Spatrick call here tells our process to suspend a thread and not let it run when 293061da546Spatrick the other threads in a process are allowed to run. So when 294061da546Spatrick SBProcess::Continue() is called, any threads that aren't suspended will 295061da546Spatrick be allowed to run. If any of the SBThread functions for stepping are 296061da546Spatrick called (StepOver, StepInto, StepOut, StepInstruction, RunToAddres), the 297061da546Spatrick thread will now be allowed to run and these functions will simply return. 298061da546Spatrick 299061da546Spatrick Eventually we plan to add support for thread centric debugging where 300061da546Spatrick each thread is controlled individually and each thread would broadcast 301061da546Spatrick its state, but we haven't implemented this yet. 302061da546Spatrick 303061da546Spatrick Likewise the SBThread::Resume() call will again allow the thread to run 304061da546Spatrick when the process is continued. 305061da546Spatrick 306061da546Spatrick Suspend() and Resume() functions are not currently reference counted, if 307061da546Spatrick anyone has the need for them to be reference counted, please let us 308061da546Spatrick know.") Suspend; 309061da546Spatrick bool 310061da546Spatrick Suspend(); 311061da546Spatrick 312061da546Spatrick bool 313061da546Spatrick Suspend(SBError &error); 314061da546Spatrick 315061da546Spatrick bool 316061da546Spatrick Resume (); 317061da546Spatrick 318061da546Spatrick bool 319061da546Spatrick Resume (SBError &error); 320061da546Spatrick 321061da546Spatrick bool 322061da546Spatrick IsSuspended(); 323061da546Spatrick 324061da546Spatrick bool 325061da546Spatrick IsStopped(); 326061da546Spatrick 327061da546Spatrick uint32_t 328061da546Spatrick GetNumFrames (); 329061da546Spatrick 330061da546Spatrick lldb::SBFrame 331061da546Spatrick GetFrameAtIndex (uint32_t idx); 332061da546Spatrick 333061da546Spatrick lldb::SBFrame 334061da546Spatrick GetSelectedFrame (); 335061da546Spatrick 336061da546Spatrick lldb::SBFrame 337061da546Spatrick SetSelectedFrame (uint32_t frame_idx); 338061da546Spatrick 339061da546Spatrick lldb::SBProcess 340061da546Spatrick GetProcess (); 341061da546Spatrick 342061da546Spatrick bool 343061da546Spatrick GetDescription (lldb::SBStream &description) const; 344061da546Spatrick 345061da546Spatrick %feature("docstring", " 346061da546Spatrick Get the description strings for this thread that match what the 347061da546Spatrick lldb driver will present, using the thread-format (stop_format==false) 348061da546Spatrick or thread-stop-format (stop_format = true).") GetDescription; 349061da546Spatrick bool GetDescription(lldb::SBStream &description, bool stop_format) const; 350061da546Spatrick 351061da546Spatrick bool 352061da546Spatrick GetStatus (lldb::SBStream &status) const; 353061da546Spatrick 354061da546Spatrick bool 355061da546Spatrick operator == (const lldb::SBThread &rhs) const; 356061da546Spatrick 357061da546Spatrick bool 358061da546Spatrick operator != (const lldb::SBThread &rhs) const; 359061da546Spatrick 360061da546Spatrick %feature("autodoc"," 361061da546Spatrick Given an argument of str to specify the type of thread-origin extended 362061da546Spatrick backtrace to retrieve, query whether the origin of this thread is 363061da546Spatrick available. An SBThread is retured; SBThread.IsValid will return true 364061da546Spatrick if an extended backtrace was available. The returned SBThread is not 365061da546Spatrick a part of the SBProcess' thread list and it cannot be manipulated like 366061da546Spatrick normal threads -- you cannot step or resume it, for instance -- it is 367061da546Spatrick intended to used primarily for generating a backtrace. You may request 368061da546Spatrick the returned thread's own thread origin in turn.") GetExtendedBacktraceThread; 369061da546Spatrick lldb::SBThread 370061da546Spatrick GetExtendedBacktraceThread (const char *type); 371061da546Spatrick 372061da546Spatrick %feature("autodoc"," 373061da546Spatrick Takes no arguments, returns a uint32_t. 374061da546Spatrick If this SBThread is an ExtendedBacktrace thread, get the IndexID of the 375061da546Spatrick original thread that this ExtendedBacktrace thread represents, if 376061da546Spatrick available. The thread that was running this backtrace in the past may 377061da546Spatrick not have been registered with lldb's thread index (if it was created, 378061da546Spatrick did its work, and was destroyed without lldb ever stopping execution). 379061da546Spatrick In that case, this ExtendedBacktrace thread's IndexID will be returned.") GetExtendedBacktraceOriginatingIndexID; 380061da546Spatrick uint32_t 381061da546Spatrick GetExtendedBacktraceOriginatingIndexID(); 382061da546Spatrick 383061da546Spatrick %feature("autodoc"," 384061da546Spatrick Returns an SBValue object represeting the current exception for the thread, 385061da546Spatrick if there is any. Currently, this works for Obj-C code and returns an SBValue 386061da546Spatrick representing the NSException object at the throw site or that's currently 387061da546Spatrick being processes.") GetCurrentException; 388061da546Spatrick lldb::SBValue 389061da546Spatrick GetCurrentException(); 390061da546Spatrick 391061da546Spatrick %feature("autodoc"," 392061da546Spatrick Returns a historical (fake) SBThread representing the stack trace of an 393061da546Spatrick exception, if there is one for the thread. Currently, this works for Obj-C 394061da546Spatrick code, and can retrieve the throw-site backtrace of an NSException object 395061da546Spatrick even when the program is no longer at the throw site.") GetCurrentExceptionBacktrace; 396061da546Spatrick lldb::SBThread 397061da546Spatrick GetCurrentExceptionBacktrace(); 398061da546Spatrick 399061da546Spatrick %feature("autodoc"," 400061da546Spatrick Takes no arguments, returns a bool. 401061da546Spatrick lldb may be able to detect that function calls should not be executed 402061da546Spatrick on a given thread at a particular point in time. It is recommended that 403061da546Spatrick this is checked before performing an inferior function call on a given 404061da546Spatrick thread.") SafeToCallFunctions; 405061da546Spatrick bool 406061da546Spatrick SafeToCallFunctions (); 407061da546Spatrick 408*f6aab3d8Srobert %feature("autodoc"," 409*f6aab3d8Srobert Retruns a SBValue object representing the siginfo for the current signal. 410*f6aab3d8Srobert ") GetSiginfo; 411*f6aab3d8Srobert lldb::SBValue 412*f6aab3d8Srobert GetSiginfo(); 413*f6aab3d8Srobert 414061da546Spatrick STRING_EXTENSION(SBThread) 415061da546Spatrick 416061da546Spatrick #ifdef SWIGPYTHON 417061da546Spatrick %pythoncode %{ 418061da546Spatrick def __iter__(self): 419061da546Spatrick '''Iterate over all frames in a lldb.SBThread object.''' 420061da546Spatrick return lldb_iter(self, 'GetNumFrames', 'GetFrameAtIndex') 421061da546Spatrick 422061da546Spatrick def __len__(self): 423061da546Spatrick '''Return the number of frames in a lldb.SBThread object.''' 424061da546Spatrick return self.GetNumFrames() 425061da546Spatrick 426061da546Spatrick class frames_access(object): 427061da546Spatrick '''A helper object that will lazily hand out frames for a thread when supplied an index.''' 428061da546Spatrick def __init__(self, sbthread): 429061da546Spatrick self.sbthread = sbthread 430061da546Spatrick 431061da546Spatrick def __len__(self): 432061da546Spatrick if self.sbthread: 433061da546Spatrick return int(self.sbthread.GetNumFrames()) 434061da546Spatrick return 0 435061da546Spatrick 436061da546Spatrick def __getitem__(self, key): 437061da546Spatrick if type(key) is int and key < self.sbthread.GetNumFrames(): 438061da546Spatrick return self.sbthread.GetFrameAtIndex(key) 439061da546Spatrick return None 440061da546Spatrick 441061da546Spatrick def get_frames_access_object(self): 442061da546Spatrick '''An accessor function that returns a frames_access() object which allows lazy frame access from a lldb.SBThread object.''' 443061da546Spatrick return self.frames_access (self) 444061da546Spatrick 445061da546Spatrick def get_thread_frames(self): 446061da546Spatrick '''An accessor function that returns a list() that contains all frames in a lldb.SBThread object.''' 447061da546Spatrick frames = [] 448061da546Spatrick for frame in self: 449061da546Spatrick frames.append(frame) 450061da546Spatrick return frames 451061da546Spatrick 452061da546Spatrick id = property(GetThreadID, None, doc='''A read only property that returns the thread ID as an integer.''') 453061da546Spatrick idx = property(GetIndexID, None, doc='''A read only property that returns the thread index ID as an integer. Thread index ID values start at 1 and increment as threads come and go and can be used to uniquely identify threads.''') 454061da546Spatrick return_value = property(GetStopReturnValue, None, doc='''A read only property that returns an lldb object that represents the return value from the last stop (lldb.SBValue) if we just stopped due to stepping out of a function.''') 455061da546Spatrick process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that owns this thread.''') 456061da546Spatrick num_frames = property(GetNumFrames, None, doc='''A read only property that returns the number of stack frames in this thread as an integer.''') 457061da546Spatrick frames = property(get_thread_frames, None, doc='''A read only property that returns a list() of lldb.SBFrame objects for all frames in this thread.''') 458061da546Spatrick frame = property(get_frames_access_object, None, doc='''A read only property that returns an object that can be used to access frames as an array ("frame_12 = lldb.thread.frame[12]").''') 459061da546Spatrick name = property(GetName, None, doc='''A read only property that returns the name of this thread as a string.''') 460061da546Spatrick queue = property(GetQueueName, None, doc='''A read only property that returns the dispatch queue name of this thread as a string.''') 461061da546Spatrick queue_id = property(GetQueueID, None, doc='''A read only property that returns the dispatch queue id of this thread as an integer.''') 462061da546Spatrick stop_reason = property(GetStopReason, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eStopReason") that represents the reason this thread stopped.''') 463061da546Spatrick is_suspended = property(IsSuspended, None, doc='''A read only property that returns a boolean value that indicates if this thread is suspended.''') 464061da546Spatrick is_stopped = property(IsStopped, None, doc='''A read only property that returns a boolean value that indicates if this thread is stopped but not exited.''') 465061da546Spatrick %} 466061da546Spatrick #endif 467061da546Spatrick 468061da546Spatrick }; 469061da546Spatrick 470061da546Spatrick } // namespace lldb 471