diff options
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/llil/instruction.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rust/src/llil/instruction.rs b/rust/src/llil/instruction.rs index 9f2ad9b2..04673ab0 100644 --- a/rust/src/llil/instruction.rs +++ b/rust/src/llil/instruction.rs @@ -95,6 +95,15 @@ where M: FunctionMutability, V: NonSSAVariant, { + pub fn address(&self) -> u64 { + use binaryninjacore_sys::BNLowLevelILOperation::*; + + let expr_idx = + unsafe { BNGetLowLevelILIndexForInstruction(self.function.handle, self.instr_idx) }; + let op = unsafe { BNGetLowLevelILByIndex(self.function.handle, expr_idx) }; + return op.address; + } + pub fn info(&self) -> InstrInfo<'func, A, M, NonSSA<V>> { use binaryninjacore_sys::BNLowLevelILOperation::*; |
