pub struct ProcessImage { /* private fields */ }Expand description
The ProcessImage contains all necessary ELF files for emulation
It
- parses its binaries into a tree structure instead of a linear memory image
- symbolizes all pointers in the ELF files
- lifts all RISC-V instructions into an IR
Implementations§
Source§impl ProcessImage
Accessor methods that handle the children of this process image element
impl ProcessImage
Accessor methods that handle the children of this process image element
Sourcepub fn set_cursor(&mut self, cursor: usize)
pub fn set_cursor(&mut self, cursor: usize)
Set the cursor of this process image element
Sourcepub fn move_cursor_beyond_end(&mut self)
pub fn move_cursor_beyond_end(&mut self)
Move the cursor of this process image element to the end of its children list. This enables appending children.
Sourcepub fn move_cursor_forward(&mut self) -> bool
pub fn move_cursor_forward(&mut self) -> bool
Increment the cursor of this process image element or return false if the cursor
is already at the last child
Sourcepub fn move_cursor_backwards(&mut self) -> bool
pub fn move_cursor_backwards(&mut self) -> bool
Decrement the cursor of this process image element or return false if it’s already
at the first child
Sourcepub fn elf(&self, id: Id) -> Option<&Elf>
pub fn elf(&self, id: Id) -> Option<&Elf>
Retrieve the child with the given ID of this process image element
Sourcepub fn cursor_elf(&self) -> Option<&Elf>
pub fn cursor_elf(&self) -> Option<&Elf>
Get the child at the current cursor position for this process image element
Sourcepub fn cursor_elf_mut(&mut self) -> Option<&mut Elf>
pub fn cursor_elf_mut(&mut self) -> Option<&mut Elf>
Get the child at the current cursor position for this process image element
Sourcepub fn insert_elf(&mut self, child: Elf) -> Id
pub fn insert_elf(&mut self, child: Elf) -> Id
Insert the given child into the list of children at the current cursor position for this process image element
Sourcepub fn delete_elf(&mut self) -> Elf
pub fn delete_elf(&mut self) -> Elf
Delete the child at the current cursor position of this process image element and return it
Sourcepub fn iter_elfs(&self) -> Iter<'_, Elf> ⓘ
pub fn iter_elfs(&self) -> Iter<'_, Elf> ⓘ
Iterate over all children of this process image element independent of the current cursor position
Sourcepub fn iter_elfs_mut(&mut self) -> IterMut<'_, Elf> ⓘ
pub fn iter_elfs_mut(&mut self) -> IterMut<'_, Elf> ⓘ
Iterate over all children of this process image element independent of the current cursor position
Source§impl ProcessImage
impl ProcessImage
Sourcepub fn entrypoint(&self) -> &FunctionPointer
pub fn entrypoint(&self) -> &FunctionPointer
The entrypoint of the ProcessImage determines where to start execution
Sourcepub fn set_entrypoint(&mut self, entrypoint: FunctionPointer)
pub fn set_entrypoint(&mut self, entrypoint: FunctionPointer)
Change the entrypoint of this ProcessImage
Sourcepub fn constructors(&self) -> &[FunctionPointer]
pub fn constructors(&self) -> &[FunctionPointer]
The constructors that are to be run before the entrypoint in the order given by this slice
Sourcepub fn constructors_mut(&mut self) -> &mut Vec<FunctionPointer>
pub fn constructors_mut(&mut self) -> &mut Vec<FunctionPointer>
Change the constructors of this ProcessImage