diff options
| author | Glenn Smith <glenn@vector35.com> | 2026-05-03 02:30:34 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2026-05-20 17:10:35 -0400 |
| commit | 23f619a047ff754eafb84a6ec5f666bbe9e47711 (patch) | |
| tree | 9d128bc11c50c2a2bb9fbaa5ce291062afa9b979 /rust | |
| parent | 06611c17ae5ee5936889ff029cac042fdba8a0c5 (diff) | |
Sort switch blocks in graph view by case number
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/src/function.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs index 90432af6..320382de 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -510,6 +510,14 @@ impl Function { unsafe { Array::new(lines, count, ()) } } + pub fn block_sort_hint(&self, addr: u64, arch: Option<CoreArchitecture>) -> Option<i64> { + let arch = arch.unwrap_or_else(|| self.arch()); + let mut result = 0; + unsafe { + BNGetFunctionBlockSortHint(self.handle, arch.handle, addr, &mut result).then_some(result) + } + } + pub fn variable_name(&self, var: &Variable) -> String { unsafe { let raw_var = BNVariable::from(var); |
