pub struct SBValue {
pub raw: SBValueRef,
}
Expand description
The value of a variable, register or expression.
Fields
raw: SBValueRef
The underlying raw SBValueRef
.
Implementations
sourceimpl SBValue
impl SBValue
pub fn clear(&self)
pub fn error(&self) -> Option<SBError>
pub fn id(&self) -> lldb_user_id_t
pub fn name(&self) -> &str
pub fn type_name(&self) -> &str
pub fn display_type_name(&self) -> &str
pub fn byte_size(&self) -> usize
pub fn is_in_scope(&self) -> bool
pub fn format(&self) -> Format
pub fn set_format(&self, format: Format)
pub fn value(&self) -> &str
pub fn dereference(&self) -> Option<SBValue>
pub fn address_of(&self) -> Option<SBValue>
pub fn type_is_pointer_type(&self) -> bool
pub fn target(&self) -> SBTarget
pub fn process(&self) -> SBProcess
pub fn thread(&self) -> SBThread
pub fn frame(&self) -> SBFrame
sourcepub fn children(&self) -> SBValueChildIter<'_>
pub fn children(&self) -> SBValueChildIter<'_>
Get an iterator over the child values of this value.
sourcepub fn watch(
&self,
resolve_location: bool,
read: bool,
write: bool
) -> Result<SBWatchpoint, SBError>
pub fn watch(
&self,
resolve_location: bool,
read: bool,
write: bool
) -> Result<SBWatchpoint, SBError>
Find and watch a variable.
sourcepub fn watch_pointee(
&self,
resolve_location: bool,
read: bool,
write: bool
) -> Result<SBWatchpoint, SBError>
pub fn watch_pointee(
&self,
resolve_location: bool,
read: bool,
write: bool
) -> Result<SBWatchpoint, SBError>
Find and watch the location pointed to by a variable.
sourcepub fn pointee_data(&self, item_idx: u32, item_count: u32) -> Option<SBData>
pub fn pointee_data(&self, item_idx: u32, item_count: u32) -> Option<SBData>
Get an SBData
wrapping what this SBValue
points to.
This method will dereference the current SBValue
, if its
data type is a T*
or T[]
, and extract item_count
elements
of type T
from it, copying their contents into an SBData
.
item_idx
is the index of the first item to retrieve. For an array
this is equivalent to array[item_idx]
, for a pointer
to *(pointer + item_idx)
. In either case, the measurement
unit for item_idx
is the sizeof(T)
rather than bytes.
item_count
is how many items should be copied into the output.
By default only one item is copied, but more can be asked for.
Returns Some(SBData)
with the contents of the copied items, on success.
None
otherwise.
sourcepub fn data(&self) -> Option<SBData>
pub fn data(&self) -> Option<SBData>
Get an SBData
wrapping the contents of this SBValue
.
This method will read the contents of this object in memory
and copy them into an SBData
for future use.
Returns Some(SBData)
with the contents of this SBValue
, on success.
None
otherwise.