Skip to content

Commit 93409a2

Browse files
committed
add HighLevelILFunction::aliased_variables method
1 parent 72c9380 commit 93409a2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rust/src/hlil/function.rs

+10
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,16 @@ impl HighLevelILFunction {
230230
unsafe { Array::new(variables, count, ()) }
231231
}
232232

233+
/// This returns a list of Variables that are taken reference to and used
234+
/// elsewhere. You may also wish to consider [HighLevelILFunction::variables]
235+
/// and [crate::function::Function::parameter_variables]
236+
pub fn aliased_variables(&self) -> Array<Variable> {
237+
let mut count = 0;
238+
let variables = unsafe { BNGetHighLevelILAliasedVariables(self.handle, &mut count) };
239+
assert!(!variables.is_null());
240+
unsafe { Array::new(variables, count, ()) }
241+
}
242+
233243
/// This gets just the HLIL SSA variables - you may be interested in the union
234244
/// of [crate::function::Function::parameter_variables] and
235245
/// [crate::mlil::function::MediumLevelILFunction::aliased_variables] as well for all the

0 commit comments

Comments
 (0)