Memory

Struct Memory 

Source
pub struct Memory<B> { /* private fields */ }

Implementations§

Source§

impl<B: BV> Memory<B>

Source

pub fn new() -> Self

Source

pub fn kind_at(&self, addr: Address) -> &'static str

Source

pub fn log(&self)

Source

pub fn in_custom_region(&self, addr: Address) -> Option<&dyn CustomRegion<B>>

Source

pub fn add_region(&mut self, region: Region<B>)

Source

pub fn add_symbolic_region(&mut self, range: Range<Address>)

Source

pub fn add_symbolic_code_region(&mut self, range: Range<Address>)

Source

pub fn add_concrete_region( &mut self, range: Range<Address>, contents: HashMap<Address, u8>, )

Source

pub fn add_zero_region(&mut self, range: Range<Address>)

Source

pub fn set_client_info(&mut self, info: Box<dyn MemoryCallbacks<B>>)

Source

pub fn write_byte(&mut self, address: Address, byte: u8)

Source

pub fn read_initial( &self, address: Address, bytes: u32, ) -> Result<Val<B>, ExecError>

Source

pub fn read( &self, read_kind: Val<B>, address: Val<B>, bytes: Val<B>, solver: &mut Solver<'_, B>, tag: bool, ) -> Result<Val<B>, ExecError>

Read from the memory region determined by the address. If the address is symbolic the read value is always also symbolic. The number of bytes must be concrete otherwise will return a SymbolicLength error.

§Panics

Panics if the number of bytes to read is concrete but does not fit in a u32, which should never be the case.

Source

pub fn write( &mut self, write_kind: Val<B>, address: Val<B>, data: Val<B>, solver: &mut Solver<'_, B>, tag: Option<Val<B>>, ) -> Result<Val<B>, ExecError>

Source

pub fn smt_address_constraint( &self, address: &Exp, bytes: u32, kind: SmtKind, solver: &mut Solver<'_, B>, tag: Option<&Exp>, ) -> Exp

Trait Implementations§

Source§

impl<B: Clone> Clone for Memory<B>

Source§

fn clone(&self) -> Memory<B>

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<B: Debug> Debug for Memory<B>

Source§

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

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

impl<B: Default> Default for Memory<B>

Source§

fn default() -> Memory<B>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<B> Freeze for Memory<B>

§

impl<B> !RefUnwindSafe for Memory<B>

§

impl<B> Send for Memory<B>

§

impl<B> Sync for Memory<B>

§

impl<B> Unpin for Memory<B>

§

impl<B> !UnwindSafe for Memory<B>

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> Same for T

Source§

type Output = T

Should always be Self
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.