pub struct AnalysisContext { /* private fields */ }Expand description
The AnalysisContext struct is used to represent the current state of analysis for a given function. It allows direct modification of IL and other analysis information.
Implementations§
source§impl AnalysisContext
impl AnalysisContext
sourcepub fn view(&self) -> Ref<BinaryView>
pub fn view(&self) -> Ref<BinaryView>
BinaryView for the current AnalysisContext
sourcepub unsafe fn lifted_il_function(
&self,
) -> Option<Ref<LowLevelILMutableFunction>>
pub unsafe fn lifted_il_function( &self, ) -> Option<Ref<LowLevelILMutableFunction>>
LowLevelILMutableFunction used to represent Lifted Level IL
pub fn set_lifted_il_function(&self, value: &LowLevelILRegularFunction)
sourcepub unsafe fn llil_function(&self) -> Option<Ref<LowLevelILMutableFunction>>
pub unsafe fn llil_function(&self) -> Option<Ref<LowLevelILMutableFunction>>
LowLevelILMutableFunction used to represent Low Level IL
pub fn set_llil_function(&self, value: &LowLevelILRegularFunction)
sourcepub fn mlil_function(&self) -> Option<Ref<MediumLevelILFunction>>
pub fn mlil_function(&self) -> Option<Ref<MediumLevelILFunction>>
MediumLevelILFunction used to represent Medium Level IL
pub fn set_mlil_function(&self, value: &MediumLevelILFunction)
sourcepub fn hlil_function(&self, full_ast: bool) -> Option<Ref<HighLevelILFunction>>
pub fn hlil_function(&self, full_ast: bool) -> Option<Ref<HighLevelILFunction>>
HighLevelILFunction used to represent High Level IL
pub fn inform(&self, request: &str) -> bool
pub fn set_basic_blocks<I>(&self, blocks: I)
sourcepub fn get_setting_bool(&self, key: &str) -> bool
pub fn get_setting_bool(&self, key: &str) -> bool
Get a boolean setting from the cached settings
sourcepub fn get_setting_double(&self, key: &str) -> f64
pub fn get_setting_double(&self, key: &str) -> f64
Get a double setting from the cached settings
sourcepub fn get_setting_int64(&self, key: &str) -> i64
pub fn get_setting_int64(&self, key: &str) -> i64
Get a signed 64-bit integer setting from the cached settings
sourcepub fn get_setting_uint64(&self, key: &str) -> u64
pub fn get_setting_uint64(&self, key: &str) -> u64
Get an unsigned 64-bit integer setting from the cached settings
sourcepub fn get_setting_string(&self, key: &str) -> BnString
pub fn get_setting_string(&self, key: &str) -> BnString
Get a string setting from the cached settings
sourcepub fn get_setting_string_list(&self, key: &str) -> Array<BnString>
pub fn get_setting_string_list(&self, key: &str) -> Array<BnString>
Get a string list setting from the cached settings
sourcepub fn is_offset_valid(&self, offset: u64) -> bool
pub fn is_offset_valid(&self, offset: u64) -> bool
Check if an offset is mapped in the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryView::offset_valid.
sourcepub fn is_offset_readable(&self, offset: u64) -> bool
pub fn is_offset_readable(&self, offset: u64) -> bool
Check if an offset is readable in the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryView::offset_readable.
sourcepub fn is_offset_writable(&self, offset: u64) -> bool
pub fn is_offset_writable(&self, offset: u64) -> bool
Check if an offset is writable in the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryView::offset_writable.
sourcepub fn is_offset_executable(&self, offset: u64) -> bool
pub fn is_offset_executable(&self, offset: u64) -> bool
Check if an offset is executable in the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryView::offset_executable.
sourcepub fn is_offset_backed_by_file(&self, offset: u64) -> bool
pub fn is_offset_backed_by_file(&self, offset: u64) -> bool
Check if an offset is backed by file in the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryView::offset_backed_by_file.
sourcepub fn is_offset_code_semantics(&self, offset: u64) -> bool
pub fn is_offset_code_semantics(&self, offset: u64) -> bool
Check if an offset has code semantics in the cached section map.
NOTE: This is a lock-free alternative to BinaryViewExt::offset_has_code_semantics.
sourcepub fn is_offset_extern_semantics(&self, offset: u64) -> bool
pub fn is_offset_extern_semantics(&self, offset: u64) -> bool
Check if an offset has external semantics in the cached section map.
NOTE: This is a lock-free alternative to BinaryViewExt::offset_has_extern_semantics.
sourcepub fn is_offset_writable_semantics(&self, offset: u64) -> bool
pub fn is_offset_writable_semantics(&self, offset: u64) -> bool
Check if an offset has writable semantics in the cached section map.
NOTE: This is a lock-free alternative to BinaryViewExt::offset_has_writable_semantics.
sourcepub fn is_offset_readonly_semantics(&self, offset: u64) -> bool
pub fn is_offset_readonly_semantics(&self, offset: u64) -> bool
Check if an offset has read-only semantics in the cached section map.
NOTE: This is a lock-free alternative to BinaryViewExt::offset_has_read_only_semantics.
sourcepub fn sections(&self) -> Array<Section>
pub fn sections(&self) -> Array<Section>
Get all sections from the cached section map.
NOTE: This is a lock-free alternative to BinaryViewExt::sections.
sourcepub fn section_by_name(&self, name: impl IntoCStr) -> Option<Ref<Section>>
pub fn section_by_name(&self, name: impl IntoCStr) -> Option<Ref<Section>>
Get a section by name from the cached section map.
NOTE: This is a lock-free alternative to BinaryViewExt::section_by_name.
sourcepub fn sections_at(&self, addr: u64) -> Array<Section>
pub fn sections_at(&self, addr: u64) -> Array<Section>
Get all sections containing the given address from the cached section map.
NOTE: This is a lock-free alternative to BinaryViewExt::sections_at.
sourcepub fn start(&self) -> u64
pub fn start(&self) -> u64
Get the start address (the lowest address) from the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryView::start.
sourcepub fn end(&self) -> u64
pub fn end(&self) -> u64
Get the end address (the highest address) from the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryViewExt::end.
sourcepub fn length(&self) -> u64
pub fn length(&self) -> u64
Get the length of the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryViewBase::len.
sourcepub fn next_valid_offset(&self, offset: u64) -> u64
pub fn next_valid_offset(&self, offset: u64) -> u64
Get the next valid offset after the given offset from the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryView::next_valid_offset_after.
sourcepub fn next_mapped_address(&self, addr: u64, flags: &SegmentFlags) -> u64
pub fn next_mapped_address(&self, addr: u64, flags: &SegmentFlags) -> u64
Get the next mapped address after the given address from the cached MemoryMap.
sourcepub fn next_backed_address(&self, addr: u64, flags: &SegmentFlags) -> u64
pub fn next_backed_address(&self, addr: u64, flags: &SegmentFlags) -> u64
Get the next backed address after the given address from the cached MemoryMap.
sourcepub fn segment_at(&self, addr: u64) -> Option<Ref<Segment>>
pub fn segment_at(&self, addr: u64) -> Option<Ref<Segment>>
Get the segment containing the given address from the cached MemoryMap.
NOTE: This is a lock-free alternative to BinaryViewExt::segment_at.
sourcepub fn mapped_address_ranges(&self) -> Array<AddressRange>
pub fn mapped_address_ranges(&self) -> Array<AddressRange>
Get all mapped address ranges from the cached MemoryMap.
sourcepub fn backed_address_ranges(&self) -> Array<AddressRange>
pub fn backed_address_ranges(&self) -> Array<AddressRange>
Get all backed address ranges from the cached MemoryMap.