From 899e5db0af821d467ba2fff3d1aa46fa4c36f14b Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Mon, 27 May 2024 14:19:48 -0300 Subject: [PATCH] add `HighLevelILFunction::aliased_variables` method --- rust/src/hlil/function.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rust/src/hlil/function.rs b/rust/src/hlil/function.rs index a6895ec8c..d6c9f404f 100644 --- a/rust/src/hlil/function.rs +++ b/rust/src/hlil/function.rs @@ -230,6 +230,16 @@ impl HighLevelILFunction { unsafe { Array::new(variables, count, ()) } } + /// This returns a list of Variables that are taken reference to and used + /// elsewhere. You may also wish to consider [HighLevelILFunction::variables] + /// and [crate::function::Function::parameter_variables] + pub fn aliased_variables(&self) -> Array { + let mut count = 0; + let variables = unsafe { BNGetHighLevelILAliasedVariables(self.handle, &mut count) }; + assert!(!variables.is_null()); + unsafe { Array::new(variables, count, ()) } + } + /// This gets just the HLIL SSA variables - you may be interested in the union /// of [crate::function::Function::parameter_variables] and /// [crate::mlil::function::MediumLevelILFunction::aliased_variables] as well for all the