diff options
| author | Mason Reed <mason@vector35.com> | 2025-12-07 17:29:41 -0500 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-12-10 17:35:19 -0500 |
| commit | bc195c1c21da0400a1a1dde1fcdde45d687e666f (patch) | |
| tree | 988a57bfc57044127c902f31cc269507d9703a35 /rust/src/binary_view.rs | |
| parent | ce81158ad5495b888b190e042d8b9712730ee494 (diff) | |
[Rust] Add misc documentation
Diffstat (limited to 'rust/src/binary_view.rs')
| -rw-r--r-- | rust/src/binary_view.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rust/src/binary_view.rs b/rust/src/binary_view.rs index 31bdeb89..9952cf28 100644 --- a/rust/src/binary_view.rs +++ b/rust/src/binary_view.rs @@ -1322,6 +1322,11 @@ pub trait BinaryViewExt: BinaryViewBase { } } + /// This list contains the analysis entry function, and functions like init_array, fini_array, + /// and TLS callbacks etc. + /// + /// We see `entry_functions` as good starting points for analysis, these functions normally don't + /// have internal references. Exported functions in a dll/so file are not included. fn entry_point_functions(&self) -> Array<Function> { unsafe { let mut count = 0; @@ -1706,6 +1711,9 @@ pub trait BinaryViewExt: BinaryViewBase { } } + /// Retrieve the metadata as the type `T`. + /// + /// Fails if the metadata does not exist, or if the metadata failed to coerce to type `T`. fn get_metadata<T>(&self, key: &str) -> Option<Result<T>> where T: for<'a> TryFrom<&'a Metadata>, @@ -2235,6 +2243,9 @@ pub trait BinaryViewExt: BinaryViewBase { } } + /// Retrieve the string that falls on a given virtual address. + /// + /// NOTE: This returns discovered strings and is therefore governed by `analysis.limits.minStringLength` and other settings. fn string_at(&self, addr: u64) -> Option<BNStringReference> { let mut str_ref = BNStringReference::default(); let success = unsafe { BNGetStringAtAddress(self.as_ref().handle, addr, &mut str_ref) }; |
