pub struct ExecutionConfig {
pub stop_conditions: Vec<StopCondition>,
pub stop_on_halt: bool,
pub trace_path: Option<PathBuf>,
pub verbose: bool,
}Expand description
Configuration for an execution run.
This struct is designed to be constructed either from CLI arguments or programmatically when using the crate as a library.
Fields§
§stop_conditions: Vec<StopCondition>Stop conditions (first one met will stop execution)
stop_on_halt: boolWhether to stop on any HLT instruction
trace_path: Option<PathBuf>Path to trace log file (if any)
verbose: boolVerbose output
Implementations§
Source§impl ExecutionConfig
impl ExecutionConfig
Sourcepub fn with_stop_condition(self, condition: StopCondition) -> Self
pub fn with_stop_condition(self, condition: StopCondition) -> Self
Add a stop condition
Sourcepub fn with_cycles(self, cycles: u128) -> Self
pub fn with_cycles(self, cycles: u128) -> Self
Set stop after N cycles
Sourcepub fn with_frames(self, frames: u64) -> Self
pub fn with_frames(self, frames: u64) -> Self
Set stop after N frames
Sourcepub fn with_pc_breakpoint(self, addr: u16) -> Self
pub fn with_pc_breakpoint(self, addr: u16) -> Self
Set stop when PC equals address
Sourcepub fn with_breakpoint(self, addr: u16) -> Self
pub fn with_breakpoint(self, addr: u16) -> Self
Add a breakpoint (alias for with_pc_breakpoint)
Sourcepub fn with_memory_watch(self, addr: u16, access_type: MemoryAccessType) -> Self
pub fn with_memory_watch(self, addr: u16, access_type: MemoryAccessType) -> Self
Add a memory watchpoint
Sourcepub fn with_trace(self, path: PathBuf) -> Self
pub fn with_trace(self, path: PathBuf) -> Self
Set trace log path
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Enable verbose output
Sourcepub fn with_stop_on_halt(self, stop: bool) -> Self
pub fn with_stop_on_halt(self, stop: bool) -> Self
Enable stop on HLT
Source§impl ExecutionConfig
impl ExecutionConfig
Sourcepub fn from_cli_args(args: &CliArgs) -> Self
pub fn from_cli_args(args: &CliArgs) -> Self
Build execution config from CLI arguments
Trait Implementations§
Source§impl Clone for ExecutionConfig
impl Clone for ExecutionConfig
Source§fn clone(&self) -> ExecutionConfig
fn clone(&self) -> ExecutionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionConfig
impl Debug for ExecutionConfig
Source§impl Default for ExecutionConfig
impl Default for ExecutionConfig
Source§fn default() -> ExecutionConfig
fn default() -> ExecutionConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExecutionConfig
impl RefUnwindSafe for ExecutionConfig
impl Send for ExecutionConfig
impl Sync for ExecutionConfig
impl Unpin for ExecutionConfig
impl UnsafeUnpin for ExecutionConfig
impl UnwindSafe for ExecutionConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().