diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2023-10-16 21:07:25 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2023-10-17 18:46:47 -0400 |
| commit | 56c03df44461971e3fd23e3ee1793bfe8f6310fb (patch) | |
| tree | 3b250d2bdef436c6906d871d5777eb6b1617d245 | |
| parent | a85a6d8ddb1682238ba6a117000175f496f79293 (diff) | |
BNGetVariablesForParameters register list also works for float regs
| -rw-r--r-- | binaryninjacore.h | 14 | ||||
| -rw-r--r-- | rust/src/callingconvention.rs | 16 |
2 files changed, 15 insertions, 15 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index 3791f723..0461a16c 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -37,14 +37,14 @@ // Current ABI version for linking to the core. This is incremented any time // there are changes to the API that affect linking, including new functions, // new types, or modifications to existing functions or types. -#define BN_CURRENT_CORE_ABI_VERSION 39 +#define BN_CURRENT_CORE_ABI_VERSION 40 // Minimum ABI version that is supported for loading of plugins. Plugins that // are linked to an ABI version less than this will not be able to load and // will require rebuilding. The minimum version is increased when there are // incompatible changes that break binary compatibility, such as changes to // existing types or functions. -#define BN_MINIMUM_CORE_ABI_VERSION 39 +#define BN_MINIMUM_CORE_ABI_VERSION 40 #ifdef __GNUC__ #ifdef BINARYNINJACORE_LIBRARY @@ -5819,11 +5819,11 @@ extern "C" BNCallingConvention* cc, uint32_t reg, BNFunction* func); BINARYNINJACOREAPI BNRegisterValue BNGetIncomingFlagValue(BNCallingConvention* cc, uint32_t reg, BNFunction* func); - BINARYNINJACOREAPI BNVariable* BNGetVariablesForParametersDefaultIntArgs( - BNCallingConvention* cc, const BNFunctionParameter* params, size_t paramCount, size_t* count); - BINARYNINJACOREAPI BNVariable* BNGetVariablesForParameters( - BNCallingConvention* cc, const BNFunctionParameter* params, size_t paramCount, - const uint32_t* intArgs, size_t intArgCount, size_t* count); + BINARYNINJACOREAPI BNVariable* BNGetVariablesForParametersDefaultPermittedArgs( + BNCallingConvention* cc, const BNFunctionParameter* params, size_t paramCount, size_t* count); + BINARYNINJACOREAPI BNVariable* BNGetVariablesForParameters(BNCallingConvention* cc, + const BNFunctionParameter* params, size_t paramCount, const uint32_t* permittedArgs, size_t permittedArgCount, + size_t* count); BINARYNINJACOREAPI BNVariable* BNGetParameterOrderingForVariables( BNCallingConvention* cc, const BNVariable* paramVars, const BNType** paramTypes, size_t paramCount, size_t* count); diff --git a/rust/src/callingconvention.rs b/rust/src/callingconvention.rs index 86abbd6c..484afee6 100644 --- a/rust/src/callingconvention.rs +++ b/rust/src/callingconvention.rs @@ -451,7 +451,7 @@ impl<A: Architecture> CallingConvention<A> { pub fn variables_for_parameters<S: Clone + BnStrCompatible>( &self, params: &[FunctionParameter<S>], - int_arg_registers: Option<&[A::Register]>, + permitted_registers: Option<&[A::Register]>, ) -> Vec<Variable> { let mut bn_params: Vec<BNFunctionParameter> = vec![]; let mut name_strings = vec![]; @@ -474,10 +474,10 @@ impl<A: Architecture> CallingConvention<A> { } let mut count: usize = 0; - let vars: *mut BNVariable = if let Some(int_args) = int_arg_registers { - let mut int_regs = vec![]; - for r in int_args { - int_regs.push(r.id()); + let vars: *mut BNVariable = if let Some(permitted_args) = permitted_registers { + let mut permitted_regs = vec![]; + for r in permitted_args { + permitted_regs.push(r.id()); } unsafe { @@ -485,14 +485,14 @@ impl<A: Architecture> CallingConvention<A> { self.handle, bn_params.as_ptr(), bn_params.len(), - int_regs.as_ptr(), - int_regs.len(), + permitted_regs.as_ptr(), + permitted_regs.len(), &mut count, ) } } else { unsafe { - BNGetVariablesForParametersDefaultIntArgs( + BNGetVariablesForParametersDefaultPermittedArgs( self.handle, bn_params.as_ptr(), bn_params.len(), |
