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.
Trait Implementations§
Source§impl ToOwned for AnalysisContext
impl ToOwned for AnalysisContext
Source§type Owned = Ref<AnalysisContext>
type Owned = Ref<AnalysisContext>
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Auto Trait Implementations§
impl Freeze for AnalysisContext
impl RefUnwindSafe for AnalysisContext
impl !Send for AnalysisContext
impl !Sync for AnalysisContext
impl Unpin for AnalysisContext
impl UnwindSafe for AnalysisContext
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
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>
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>
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 more