Struct StorageLocations
pub struct StorageLocations<'ctx, A: Arch, S: SmtSolver<'ctx>> { /* private fields */ }Expand description
A container that maps storage locations to SMT solver bitvectors.
Implementations§
§impl<'ctx, A: Arch, S: SmtSolver<'ctx>> StorageLocations<'ctx, A, S>
 
impl<'ctx, A: Arch, S: SmtSolver<'ctx>> StorageLocations<'ctx, A, S>
pub fn get(
    &mut self,
    context: &mut S,
    key: FilledLocation<A>,
    sizes: &Sizes,
) -> S::BV
 👎Deprecated: use StorageLocatinos::get_sized instead
pub fn get( &mut self, context: &mut S, key: FilledLocation<A>, sizes: &Sizes, ) -> S::BV
Retrieves the mapping for the provided location key.
If the location has no mapping, a new SMT bitvector constant is created.
If the register is a zero register, a bitvector with value 0 is returned.
Masks the result by the mask of the location.
§Problems
This function returns the raw bitvector value of the location.
For byte values (ValueType::Bytes), this causes an inconsistency:
The values are not stored in the same order as the output of computations.
So a simple assertion of input_bv == output_bv would fail.
You should use the function StorageLocations::get_sized instead, which automatically performs this byte swapping when needed.
pub fn get_sized(
    &mut self,
    context: &mut S,
    key: FilledLocation<A>,
    sizes: &Sizes,
    input_size: Size,
    is_bytes: bool,
) -> S::BV
pub fn get_sized( &mut self, context: &mut S, key: FilledLocation<A>, sizes: &Sizes, input_size: Size, is_bytes: bool, ) -> S::BV
Retrieves the mapping for the provided location key.
If the location has no mapping, a new SMT bitvector constant is created.
If the register is a zero register, a bitvector with value 0 is returned.
Crops the result to the provided input_size.
pub fn get_raw(
    &mut self,
    context: &mut S,
    key: FilledLocation<A>,
    sizes: &Sizes,
) -> S::BV
pub fn get_raw( &mut self, context: &mut S, key: FilledLocation<A>, sizes: &Sizes, ) -> S::BV
Retrieves the mapping for the provided location key.
If the location has no mapping, a new SMT bitvector constant is created.
If the register is a zero register, a bitvector with value 0 is returned.
Does not mask or crop the result in any way.
pub fn get_instr(&self) -> &S::BV
pub fn get_instr(&self) -> &S::BV
Returns the bitvector constant representing the instruction bitstring.
pub fn instr_bits(&self, bits: impl Iterator<Item = usize>) -> S::BV
pub fn instr_bits(&self, bits: impl Iterator<Item = usize>) -> S::BV
Returns a bitvector constructed of the bits in the instruction bitvector at the bit indices in bits.
pub fn iter(&self) -> impl Iterator<Item = (&FilledLocation<A>, &S::BV)>
pub fn iter(&self) -> impl Iterator<Item = (&FilledLocation<A>, &S::BV)>
Iterates over all locations in this container
Auto Trait Implementations§
impl<'ctx, A, S> Freeze for StorageLocations<'ctx, A, S>
impl<'ctx, A, S> RefUnwindSafe for StorageLocations<'ctx, A, S>
impl<'ctx, A, S> Send for StorageLocations<'ctx, A, S>
impl<'ctx, A, S> Sync for StorageLocations<'ctx, A, S>
impl<'ctx, A, S> Unpin for StorageLocations<'ctx, A, S>
impl<'ctx, A, S> UnwindSafe for StorageLocations<'ctx, A, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
§impl<T> Identity for Twhere
    T: ?Sized,
 
impl<T> Identity for Twhere
    T: ?Sized,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more