pub struct SBValue {
pub raw: SBValueRef,
}
Expand description
The value of a variable, register or expression.
Fields§
§raw: SBValueRef
The underlying raw SBValueRef
.
Implementations§
Source§impl 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) -> Option<&str>
pub fn type_name(&self) -> Option<&str>
pub fn display_type_name(&self) -> Option<&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) -> Option<&str>
pub fn set_value_from_cstring(&self, val: &str) -> Result<(), SBError>
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.
pub fn set_data(&self, data: &SBData) -> Result<(), SBError>
pub fn load_address(&self) -> Option<lldb_addr_t>
pub fn address(&self) -> Option<SBAddress>
Sourcepub fn get_as_signed(&self) -> Result<i64, SBError>
pub fn get_as_signed(&self) -> Result<i64, SBError>
Get the value as signed integer
Sourcepub fn get_as_unsigned(&self) -> Result<u64, SBError>
pub fn get_as_unsigned(&self) -> Result<u64, SBError>
Get the value as unsigned integer