Trait gimli::EvaluationContext
[−]
[src]
pub trait EvaluationContext<'input>: Debug { type ContextError: From<Error>; fn read_memory(&self,
address: u64,
size: u8,
space: Option<u64>)
-> Result<u64, Self::ContextError>; fn read_register(&self, register: u64) -> Result<u64, Self::ContextError>; fn frame_base(&self) -> Result<u64, Self::ContextError>; fn read_tls(&self, index: u64) -> Result<u64, Self::ContextError>; fn call_frame_cfa(&self) -> Result<u64, Self::ContextError>; fn get_at_location(&self,
die: DieReference)
-> Result<&'input [u8], Self::ContextError>; fn evaluate_entry_value(&self,
expression: &[u8])
-> Result<u64, Self::ContextError>; }
Supply information to a DWARF expression evaluation.
Associated Types
type ContextError: From<Error>
The error type returned by the callback functions.
Required Methods
fn read_memory(&self,
address: u64,
size: u8,
space: Option<u64>)
-> Result<u64, Self::ContextError>
address: u64,
size: u8,
space: Option<u64>)
-> Result<u64, Self::ContextError>
Read the indicated number of bytes from memory at the indicated address. The number of bytes is guaranteed to be less than the word size of the target architecture.
If not None
, the "space" argument is a target-specific
address space value.
fn read_register(&self, register: u64) -> Result<u64, Self::ContextError>
Read the indicated register and return its value.
fn frame_base(&self) -> Result<u64, Self::ContextError>
Compute the frame base using DW_AT_frame_base
.
fn read_tls(&self, index: u64) -> Result<u64, Self::ContextError>
Compute the address of a thread-local variable.
fn call_frame_cfa(&self) -> Result<u64, Self::ContextError>
Compute the call frame CFA.
fn get_at_location(&self,
die: DieReference)
-> Result<&'input [u8], Self::ContextError>
die: DieReference)
-> Result<&'input [u8], Self::ContextError>
Find the DW_AT_location
attribute of the given DIE and
return the corresponding DWARF expression. If no expression
can be found, this should return an empty slice.
fn evaluate_entry_value(&self,
expression: &[u8])
-> Result<u64, Self::ContextError>
expression: &[u8])
-> Result<u64, Self::ContextError>
Evaluate an expression at the entry to the current subprogram.