Struct SBValue

Source
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

Source

pub fn is_valid(&self) -> bool

Check whether or not this is a valid SBValue value.

Source

pub fn clear(&self)

Source

pub fn error(&self) -> Option<SBError>

Source

pub fn id(&self) -> lldb_user_id_t

Source

pub fn name(&self) -> Option<&str>

Source

pub fn type_name(&self) -> Option<&str>

Source

pub fn display_type_name(&self) -> Option<&str>

Source

pub fn byte_size(&self) -> usize

Source

pub fn is_in_scope(&self) -> bool

Source

pub fn format(&self) -> Format

Source

pub fn set_format(&self, format: Format)

Source

pub fn value(&self) -> Option<&str>

Source

pub fn set_value_from_cstring(&self, val: &str) -> Result<(), SBError>

Source

pub fn dereference(&self) -> Option<SBValue>

Source

pub fn address_of(&self) -> Option<SBValue>

Source

pub fn type_is_pointer_type(&self) -> bool

Source

pub fn target(&self) -> SBTarget

Source

pub fn process(&self) -> SBProcess

Source

pub fn thread(&self) -> SBThread

Source

pub fn frame(&self) -> SBFrame

Source

pub fn children(&self) -> SBValueChildIter<'_>

Get an iterator over the child values of this value.

Source

pub fn watch( &self, resolve_location: bool, read: bool, write: bool, ) -> Result<SBWatchpoint, SBError>

Find and watch a variable.

Source

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.

Source

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.

Source

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.

Source

pub fn set_data(&self, data: &SBData) -> Result<(), SBError>

Source

pub fn load_address(&self) -> Option<lldb_addr_t>

Source

pub fn address(&self) -> Option<SBAddress>

Source

pub fn get_as_signed(&self) -> Result<i64, SBError>

Get the value as signed integer

Source

pub fn get_as_unsigned(&self) -> Result<u64, SBError>

Get the value as unsigned integer

Trait Implementations§

Source§

impl Clone for SBValue

Source§

fn clone(&self) -> SBValue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SBValue

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for SBValue

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for SBValue

Source§

impl Sync for SBValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.