Struct lldb::SBThread
[−]
[src]
pub struct SBThread {
pub raw: SBThreadRef,
}A thread of execution.
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.
Thread State
...
Execution Control
...
Frames
The thread contains stack frames. These can be iterated
over with frames:
// Iterate over the frames... for frame in thread.frames() { println!("Hello {:?}!", frame); } // Or collect them into a vector! let frames = thread.frames().collect::<Vec<SBFrame>>();
Some functions operate on the 'currently selected frame'. This can
retrieved via selected_frame and set via set_selected_frame.
Events
...
Fields
raw: SBThreadRef
The underlying raw SBThreadRef.
Methods
impl SBThread[src]
pub fn wrap(raw: SBThreadRef) -> SBThread[src]
Construct a new SBThread.
pub fn maybe_wrap(raw: SBThreadRef) -> Option<SBThread>[src]
Construct a new Some(SBThread) or None.
pub fn is_valid(&self) -> bool[src]
Check whether or not this is a valid SBThread value.
pub fn broadcaster_class_name() -> &'static str[src]
pub fn stop_reason(&self) -> StopReason[src]
Get the stop reason for this thread.
pub fn stop_return_value(&self) -> Option<SBValue>[src]
The return value from the last stop if we just stopped due to stepping out of a function
pub fn thread_id(&self) -> lldb_tid_t[src]
Returns a unique thread identifier for the current SBThread
that will remain constant throughout the thread's lifetime in
this process and will not be reused by another thread during this
process lifetime. On Mac OS X systems, this is a system-wide
unique thread identifier; this identifier is also used by
other tools like sample which helps to associate data from
those tools with lldb. See related SBThread::index_id.
pub fn index_id(&self) -> u32[src]
Return the index number for this SBThread. The index
number is the same thing that a user gives as an argument
to thread select in the command line lldb.
These numbers start at 1 (for the first thread lldb sees
in a debug session) and increments up throughout the process
lifetime. An index number will not be reused for a different
thread later in a process - thread 1 will always be associated
with the same thread. See related SBThread::thread_id.
pub fn name(&self) -> &str[src]
The name associated with the thread, if any.
pub fn queue(&self) -> Option<SBQueue>[src]
Return the queue associated with this thread, if any.
If this SBThread is actually a history thread, then there may be
a queue ID and name available, but not a full SBQueue as the
individual attributes may have been saved, but without enough
information to reconstitute the entire SBQueue at that time.
pub fn queue_name(&self) -> &str[src]
Return the queue name associated with this thread, if any.
For example, this would report a libdispatch (Grand Central Dispatch) queue name.
pub fn queue_id(&self) -> u64[src]
Return the dispatch_queue_id for this thread, if any.
For example, this would report a libdispatch (Grand Central Dispatch) queue ID.
pub fn suspend(&self) -> u8[src]
Set the user resume state for this thread to suspend.
LLDB currently supports process centric debugging which means when any
thread in a process stops, all other threads are stopped. The suspend
call here tells our process to suspend a thread and not let it run when
the other threads in a process are allowed to run. So when
SBProcess::continue() is called, any threads that aren't suspended will
be allowed to run. If any of the SBThread functions for stepping are
called (step_over, step_into, step_out, step_instruction,
run_to_address), the thread will not be allowed to run and these
functions will simply return.
pub fn resume(&self) -> u8[src]
Set the user resume state for this to allow it to run again.
See the discussion on suspend for further details.
pub fn is_suspended(&self) -> bool[src]
Is this thread set to the suspended user resume state?
See the discussion on suspend for further details.
pub fn is_stopped(&self) -> bool[src]
Is this thread stopped?
ⓘImportant traits for SBThreadFrameIter<'d>pub fn frames(&self) -> SBThreadFrameIter[src]
Get an iterator over the frames known to this thread instance.
pub fn selected_frame(&self) -> SBFrame[src]
Get the currently selected frame for this thread.
pub fn set_selected_frame(&self, frame_index: u32) -> Option<SBFrame>[src]
Set the currently selected frame for this thread. This takes a frame index.
pub fn process(&self) -> SBProcess[src]
Get the process in which this thread is running.
pub fn event_as_thread_event(event: &SBEvent) -> Option<SBThreadEvent>[src]
If the given event is a thread event, return it as an
SBThreadEvent. Otherwise, return None.
Trait Implementations
impl Debug for SBThread[src]
fn fmt(&self, fmt: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more