pub trait ArchitectureOperations {
const INDEX_SELECTOR_REGISTER: &'static str;
const ARGUMENT_REGISTER_0: &'static str;
const ARGUMENT_REGISTER_1: &'static str;
const ARGUMENT_REGISTER_2: &'static str;
const POINTER_WIDTH_OVERRIDE: Option<i32> = None;
Show 17 methods
// Required methods
fn new(cpu: *mut ConfObject) -> Result<Self>
where Self: Sized;
fn cpu(&self) -> *mut ConfObject;
fn disassembler(&mut self) -> &mut dyn TracerDisassembler;
fn int_register(&mut self) -> &mut IntRegisterInterface;
fn processor_info_v2(&mut self) -> &mut ProcessorInfoV2Interface;
fn cpu_instruction_query(&mut self) -> &mut CpuInstructionQueryInterface;
fn cpu_instrumentation_subscribe(
&mut self,
) -> &mut CpuInstrumentationSubscribeInterface;
fn cycle(&mut self) -> &mut CycleInterface;
fn trace_pc(
&mut self,
instruction_query: *mut instruction_handle_t,
) -> Result<TraceEntry>;
fn trace_cmp(
&mut self,
instruction_query: *mut instruction_handle_t,
) -> Result<TraceEntry>;
// Provided methods
fn new_unchecked(_: *mut ConfObject) -> Result<Self>
where Self: Sized { ... }
fn get_magic_index_selector(&mut self) -> Result<u64> { ... }
fn get_magic_start_buffer_ptr_size_ptr(&mut self) -> Result<StartInfo> { ... }
fn get_magic_start_buffer_ptr_size_val(&mut self) -> Result<StartInfo> { ... }
fn get_magic_start_buffer_ptr_size_ptr_val(&mut self) -> Result<StartInfo> { ... }
fn get_manual_start_info(
&mut self,
info: &ManualStartInfo,
) -> Result<StartInfo> { ... }
fn write_start(&mut self, testcase: &[u8], info: &StartInfo) -> Result<()> { ... }
}Expand description
Each architecture must provide a struct that performs architecture-specific operations
Required Associated Constants§
const INDEX_SELECTOR_REGISTER: &'static str
const ARGUMENT_REGISTER_0: &'static str
const ARGUMENT_REGISTER_1: &'static str
const ARGUMENT_REGISTER_2: &'static str
Provided Associated Constants§
const POINTER_WIDTH_OVERRIDE: Option<i32> = None
Required Methods§
Sourcefn new(cpu: *mut ConfObject) -> Result<Self>where
Self: Sized,
fn new(cpu: *mut ConfObject) -> Result<Self>where
Self: Sized,
Create a new instance of the architecture operations
Sourcefn disassembler(&mut self) -> &mut dyn TracerDisassembler
fn disassembler(&mut self) -> &mut dyn TracerDisassembler
Return a mutable reference to the disassembler for this architecture
Sourcefn int_register(&mut self) -> &mut IntRegisterInterface
fn int_register(&mut self) -> &mut IntRegisterInterface
Return a mutable reference to the interface for reading and writing registers
Sourcefn processor_info_v2(&mut self) -> &mut ProcessorInfoV2Interface
fn processor_info_v2(&mut self) -> &mut ProcessorInfoV2Interface
Return a mutable reference to the interface for reading processor information
Sourcefn cpu_instruction_query(&mut self) -> &mut CpuInstructionQueryInterface
fn cpu_instruction_query(&mut self) -> &mut CpuInstructionQueryInterface
Return a mutable reference to the interface for querying CPU instructions
Sourcefn cpu_instrumentation_subscribe(
&mut self,
) -> &mut CpuInstrumentationSubscribeInterface
fn cpu_instrumentation_subscribe( &mut self, ) -> &mut CpuInstrumentationSubscribeInterface
Return a mutable reference to the interface for subscribing to CPU instrumentation events
Sourcefn cycle(&mut self) -> &mut CycleInterface
fn cycle(&mut self) -> &mut CycleInterface
Return a mutable reference to the interface for querying CPU cycles and timing
fn trace_pc( &mut self, instruction_query: *mut instruction_handle_t, ) -> Result<TraceEntry>
fn trace_cmp( &mut self, instruction_query: *mut instruction_handle_t, ) -> Result<TraceEntry>
Provided Methods§
Sourcefn new_unchecked(_: *mut ConfObject) -> Result<Self>where
Self: Sized,
fn new_unchecked(_: *mut ConfObject) -> Result<Self>where
Self: Sized,
Create a new instance of the architecture operations without checking the CPU
Sourcefn get_magic_index_selector(&mut self) -> Result<u64>
fn get_magic_index_selector(&mut self) -> Result<u64>
Return the value of the magic index selector register, which is used to determine whether a magic instruction should be used or skipped.
Sourcefn get_magic_start_buffer_ptr_size_ptr(&mut self) -> Result<StartInfo>
fn get_magic_start_buffer_ptr_size_ptr(&mut self) -> Result<StartInfo>
Get the magic start information from the harness which takes the arguments:
- buffer: The address of the buffer containing the testcase
- size_ptr: A pointer to a pointer-sized variable containing the size of the testcase
Sourcefn get_magic_start_buffer_ptr_size_val(&mut self) -> Result<StartInfo>
fn get_magic_start_buffer_ptr_size_val(&mut self) -> Result<StartInfo>
Get the magic start information from the harness which takes the arguments:
- buffer: The address of the buffer containing the testcase
- size_val: The maximum size of the testcase
Sourcefn get_magic_start_buffer_ptr_size_ptr_val(&mut self) -> Result<StartInfo>
fn get_magic_start_buffer_ptr_size_ptr_val(&mut self) -> Result<StartInfo>
Get the magic start information from the harness which takes the arguments:
- buffer: The address of the buffer containing the testcase
- size_ptr: A pointer to a pointer-sized variable to which the size is written
- size_val: The maximum size of the testcase
Sourcefn get_manual_start_info(&mut self, info: &ManualStartInfo) -> Result<StartInfo>
fn get_manual_start_info(&mut self, info: &ManualStartInfo) -> Result<StartInfo>
Returns the address and whether the address is virtual for the testcase buffer used by the manual start functionality
fn write_start(&mut self, testcase: &[u8], info: &StartInfo) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.