Skip to content

Commit

Permalink
add HighLevelILFunction::aliased_variables method
Browse files Browse the repository at this point in the history
  • Loading branch information
rbran committed May 31, 2024
1 parent 00d7d42 commit 899e5db
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rust/src/hlil/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Variable> {
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
Expand Down

0 comments on commit 899e5db

Please sign in to comment.