File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ pub use binaryninjacore_sys::BNAnalysisSkipReason as AnalysisSkipReason;
30
30
pub use binaryninjacore_sys:: BNFunctionAnalysisSkipOverride as FunctionAnalysisSkipOverride ;
31
31
pub use binaryninjacore_sys:: BNFunctionUpdateType as FunctionUpdateType ;
32
32
33
-
34
33
use std:: hash:: Hash ;
35
34
use std:: { fmt, mem} ;
36
35
@@ -315,6 +314,22 @@ impl Function {
315
314
}
316
315
}
317
316
317
+ pub fn parameter_variables ( & self ) -> Conf < Vec < Variable > > {
318
+ unsafe {
319
+ let mut variables = BNGetFunctionParameterVariables ( self . handle ) ;
320
+ let mut result = Vec :: with_capacity ( variables. count ) ;
321
+ let confidence = variables. confidence ;
322
+ let vars = std:: slice:: from_raw_parts ( variables. vars , variables. count ) ;
323
+
324
+ for i in 0 ..variables. count {
325
+ result. push ( Variable :: from_raw ( vars[ i] ) ) ;
326
+ }
327
+
328
+ BNFreeParameterVariables ( & mut variables) ;
329
+ Conf :: new ( result, confidence)
330
+ }
331
+ }
332
+
318
333
pub fn apply_imported_types ( & self , sym : & Symbol , t : Option < & Type > ) {
319
334
unsafe {
320
335
BNApplyImportedTypes (
You can’t perform that action at this time.
0 commit comments