From 6cd49edb317112acc73f7caeb285f4134a472d72 Mon Sep 17 00:00:00 2001 From: Fabian Freyer Date: Fri, 28 Jan 2022 01:36:26 +0100 Subject: rust: add linearview and related APIs This should include everything required to retrieve linear disassembly for a function. * add `highest_address` method to `Function` * add `DisassemblySettings` * add text getter for `InstructionTextToken` * add `LinearViewObject`, `LinearViewCursor` * add decompilation example --- rust/src/function.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rust/src/function.rs') diff --git a/rust/src/function.rs b/rust/src/function.rs index 865a22db..4ce90457 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -155,6 +155,10 @@ impl Function { unsafe { BNGetFunctionStart(self.handle) } } + pub fn highest_address(&self) -> u64 { + unsafe { BNGetFunctionHighestAddress(self.handle) } + } + pub fn comment(&self) -> BnString { unsafe { BnString::from_raw(BNGetFunctionComment(self.handle)) } } -- cgit v1.3.1