callingconvention module¶
Class |
Description |
|---|---|
|
|
|
CallLayout¶
- class CallLayout[source]¶
Bases:
objectCallLayout(parameters: List[ForwardRef(‘types.ValueLocation’)], return_value: Optional[ForwardRef(‘types.ValueLocation’)], stack_adjustment: int, reg_stack_adjustments: Dict[ForwardRef(‘architecture.RegisterIndex’), int])
- __init__(parameters: List[ValueLocation], return_value: ValueLocation | None, stack_adjustment: int, reg_stack_adjustments: Dict[RegisterIndex, int]) None¶
- Parameters:
parameters (List[ValueLocation])
return_value (ValueLocation | None)
stack_adjustment (int)
- Return type:
None
- parameters: List[ValueLocation]¶
- return_value: ValueLocation | None¶
CallingConvention¶
- class CallingConvention[source]¶
Bases:
objectclass CallingConventiondescribes how parameters, return values, and the stack are handled when a function is called. Subclasses ofCallingConventiondefine the behavior of a calling convention by setting the class attributes below and, where necessary, overriding the methods.- Variables:
name – The name of this calling convention.
caller_saved_regs – The list of registers that are not preserved across a call (caller-saved / volatile registers).
callee_saved_regs – The list of registers that a callee must preserve across a call (callee-saved / non-volatile registers).
int_arg_regs – The registers used to pass integer and pointer arguments, in the order they are used.
float_arg_regs – The registers used to pass floating point arguments, in the order they are used.
required_arg_regs – The set of registers that must be arguments for heuristic calling convention detection to consider this calling convention as a valid option.
required_clobbered_regs – The set of registers that must be clobbered for heuristic calling convention detection to consider this calling convention as a valid option.
arg_regs_share_index – Whether the integer and floating point argument registers share a single argument index. When
True, the Nth argument consumes the Nth slot of both the integer and float register lists regardless of its type. WhenFalse, integer and float arguments are assigned from their respective register lists independently.arg_regs_for_varargs – Whether argument registers are used to pass variadic arguments.
stack_reserved_for_arg_regs – Whether stack space is reserved by the caller for the register arguments (for example, the shadow/home space used by the Windows x64 calling convention).
stack_adjusted_on_return – Whether the callee adjusts the stack to remove the arguments before returning (as in stdcall), rather than leaving the caller to clean up the stack (as in cdecl).
eligible_for_heuristics – Whether this calling convention may be selected by heuristic calling convention detection.
int_return_reg – The register that holds the integer return value.
high_int_return_reg – The register that holds the high part of an integer return value that is too large to fit in a single register, or
Noneif there is none.float_return_reg – The register that holds the floating point return value, or
Noneif there is none.global_pointer_reg – Deprecated. Use
global_pointer_regsinstead. The register that holds the global pointer, if the calling convention defines one, orNoneif there is none.global_pointer_regs – The registers that hold global pointers, if the calling convention defines any.
implicitly_defined_regs – The registers that are implicitly given a known value on function entry by this calling convention.
stack_args_naturally_aligned – Whether arguments passed on the stack are aligned to their natural alignment. If
False, arguments are aligned to the address size.stack_args_pushed_left_to_right – Whether arguments passed on the stack are pushed left-to-right, as opposed to the more common right-to-left order.
- __init__(arch: Architecture | None = None, name: str | None = None, handle=None, confidence: int = 255)[source]¶
- Parameters:
arch (Architecture | None)
name (str | None)
confidence (int)
- default_is_arg_type_reg_compatible(type: Type) bool[source]¶
default_is_arg_type_reg_compatibleis the default implementation ofis_arg_type_reg_compatible. The default implementation allows register arguments for types that fit in a single register, or are a floating point type whenfloat_arg_regshas valid registers.
- default_is_return_type_reg_compatible(type: Type) bool[source]¶
default_is_return_type_reg_compatibleis the default implementation ofis_return_type_reg_compatible. The default implementation allows register returns for types that fit in a single register, have a size equal to two registers whenhigh_int_return_regis set, or are a floating point type whenfloat_return_regis set.
- get_call_layout(view: BinaryView | None, return_value: types.ReturnValueOrType | None, params: types.ParamsType, func: Function | None = None, permitted_regs: List[architecture.RegisterIndex] | None = None) CallLayout[source]¶
get_call_layoutcomputes the complete call layout (parameter locations, return value location, and stack adjustments) for a call with the given return value and parameters. It is recommended to only override this method if the calling convention behavior cannot be modeled withget_return_value_locationand/orget_parameter_locations.The default implementation calls
get_default_call_layout.When calling this method to query the layout of a function, the return value and parameters should have their named type references dereferenced before passing them to this method. Calling the methods
BinaryView.deref_return_value_named_type_referencesandBinaryView.deref_parameter_named_type_referenceswill perform this dereferencing.- Parameters:
view (BinaryView) – binary view providing type information
return_value (types.ReturnValueOrType | None) – return value of the call
params (types.ParamsType) – parameters of the call
func (Function) – function used to resolve the architecture of the resulting locations
permitted_regs (List[architecture.RegisterIndex] | None) – optional set of register indices that argument passing is restricted to; if not provided, the calling convention’s default registers are used
- Returns:
the computed call layout
- Return type:
- get_default_call_layout(view: BinaryView | None, return_value: types.ReturnValueOrType | None, params: types.ParamsType, func: Function | None = None, permitted_regs: List[architecture.RegisterIndex] | None = None) CallLayout[source]¶
get_default_call_layoutis the default implementation ofget_call_layout. The default implementation usesget_return_value_location,get_parameter_locations,get_stack_adjustment_for_locations, andget_register_stack_adjustmentsto compute the layout.- Parameters:
view (BinaryView) – binary view providing type information
return_value (types.ReturnValueOrType | None) – return value of the call
params (types.ParamsType) – parameters of the call
func (Function) – function used to resolve the architecture of the resulting locations
permitted_regs (List[architecture.RegisterIndex] | None) – optional set of register indices that argument passing is restricted to; if not provided, the calling convention’s default registers are used
- Returns:
the computed call layout
- Return type:
- get_default_indirect_return_value_location() CoreVariable[source]¶
get_default_indirect_return_value_locationis the default implementation ofget_indirect_return_value_location. The default location is the first integer argument register, or the first stack slot if there are no integer argument registers.- Returns:
the location of the indirect return value pointer
- Return type:
- get_default_parameter_locations(view: BinaryView | None, return_value: ValueLocation | None, params: types.ParamsType, arch: Architecture | None = None, permitted_regs: List[architecture.RegisterIndex] | None = None) List[ValueLocation][source]¶
get_default_parameter_locationsis the default implementation ofget_parameter_locations. The default implementation usesint_arg_regs,float_arg_regs,arg_regs_share_index,stack_reserved_for_arg_regs,is_arg_type_reg_compatible,is_non_reg_arg_indirect,stack_args_naturally_aligned, andstack_args_pushed_left_to_rightto compute the parameter layout.This function is usually sufficient unless the calling convention has unusual parameter passing behavior. Most calling conventions can be defined per-argument using the attributes and methods listed above.
- Parameters:
view (BinaryView) – binary view providing type information
return_value (ValueLocation | None) – optional location of the return value
params (types.ParamsType) – parameters of the call
arch (Architecture) – architecture used to resolve the resulting locations
permitted_regs (List[architecture.RegisterIndex] | None) – optional set of register indices that argument passing is restricted to; if not provided, the calling convention’s default registers are used
- Returns:
the locations of the parameters, in order
- Return type:
List[ValueLocation]
- get_default_parameter_ordering_for_variables(params: Dict[CoreVariable, Type]) List[CoreVariable][source]¶
get_default_parameter_ordering_for_variablesis the default implementation ofget_parameter_ordering_for_variables. The default implementation first checksarg_regs_share_indexto see if the parameter ordering is well defined. If the arguments do not share an index, it places all integer arguments before the floating point arguments. Arguments that are not passed in a normal location are placed last.- Parameters:
params (Dict[CoreVariable, Type]) – map of parameter variables to their types
- Returns:
the parameter variables in the order they are passed
- Return type:
List[CoreVariable]
- get_default_register_stack_adjustments(return_value: ValueLocation | None, params: List[ValueLocation]) Dict[RegisterIndex, int][source]¶
get_default_register_stack_adjustmentsis the default implementation ofget_register_stack_adjustments. The default implementation compares the register stack slots used by the parameters and the return value to compute the adjustments.- Parameters:
return_value (ValueLocation | None) – optional location of the return value
params (List[ValueLocation]) – locations of the parameters
- Returns:
a map from register stack index to its adjustment
- Return type:
Dict[RegisterIndex, int]
- get_default_return_value_location(view: BinaryView | None, return_value: types.ReturnValueOrType) ValueLocation | None[source]¶
get_default_return_value_locationis the default implementation ofget_return_value_location. The default implementation checksis_return_type_reg_compatibleand places the return value in registers if it can, or uses an indirect return by pointer if not. If an indirect return is required, thenget_indirect_return_value_locationandget_returned_indirect_return_value_pointerare used to provide the location of the indirect return value.- Parameters:
view (BinaryView) – binary view providing type information
return_value (types.ReturnValueOrType) – return value to compute the location for
- Returns:
the location of the return value
- Return type:
Optional[ValueLocation]
- get_default_stack_adjustment_for_locations(return_value: ValueLocation | None, params: List[Tuple[ValueLocation, Type]])[source]¶
get_default_stack_adjustment_for_locationsis the default implementation ofget_stack_adjustment_for_locations. The default implementation first checksstack_adjusted_on_return, and returns zero if that isFalse. Otherwise, it checks the stack parameter locations andstack_args_naturally_alignedto compute the stack adjustment necessary to cover all parameters.- Parameters:
return_value (ValueLocation | None) – optional location of the return value
params (List[Tuple[ValueLocation, Type]]) – list of
(location, type)tuples for the parameters
- Returns:
the stack adjustment in bytes
- Return type:
- get_incoming_flag_value(reg: RegisterName, func: Function) RegisterValue[source]¶
get_incoming_flag_valuegets the known value of a flag on entry to a function.- Parameters:
reg (RegisterName) – flag to query
func (Function) – function being analyzed
- Returns:
the incoming value of the flag
- Return type:
- get_incoming_reg_value(reg: RegisterName, func: Function) RegisterValue[source]¶
get_incoming_reg_valuegets the known value of a register on entry to a function.- Parameters:
reg (RegisterName) – register to query
func (Function) – function being analyzed
- Returns:
the incoming value of the register
- Return type:
- get_incoming_var_for_parameter_var(in_var: CoreVariable, func: Function | None = None) CoreVariable[source]¶
get_incoming_var_for_parameter_vargets the incoming variable that corresponds to the given parameter variable. This is the inverse ofget_parameter_var_for_incoming_var.- Parameters:
in_var (CoreVariable) – parameter variable
func (Function) – function being analyzed
- Returns:
the incoming variable corresponding to the parameter variable
- Return type:
- get_indirect_return_value_location() CoreVariable[source]¶
get_indirect_return_value_locationgets the location used to pass the hidden pointer argument for return values that are returned indirectly through memory.- Returns:
the location of the indirect return value pointer
- Return type:
- get_parameter_locations(view: BinaryView | None, return_value: ValueLocation | None, params: types.ParamsType, arch: Architecture | None = None, permitted_regs: List[architecture.RegisterIndex] | None = None) List[ValueLocation][source]¶
get_parameter_locationscomputes the locations of the parameters for a call with the given return value and parameters.The default implementation calls
get_default_parameter_locations.- Parameters:
view (BinaryView) – binary view providing type information
return_value (ValueLocation | None) – optional location of the return value, which may affect parameter placement (for example, when an indirect return pointer consumes an argument register)
params (types.ParamsType) – parameters of the call
arch (Architecture) – architecture used to resolve the resulting locations
permitted_regs (List[architecture.RegisterIndex] | None) – optional set of register indices that argument passing is restricted to; if not provided, the calling convention’s default registers are used
- Returns:
the locations of the parameters, in order
- Return type:
List[ValueLocation]
- get_parameter_ordering_for_variables(view: BinaryView | None, params: Dict[CoreVariable, Type]) List[CoreVariable][source]¶
get_parameter_ordering_for_variablescomputes the order in which the given parameter variables are passed. Used by the heuristic calling convention detection to create a function type from a list of parameter variables.The default implementation calls
get_default_parameter_ordering_for_variables.- Parameters:
view (BinaryView) – binary view providing type information
params (Dict[CoreVariable, Type]) – map of parameter variables to their types
- Returns:
the parameter variables in the order they are passed
- Return type:
List[CoreVariable]
- get_parameter_var_for_incoming_var(in_var: CoreVariable, func: Function | None = None) CoreVariable[source]¶
get_parameter_var_for_incoming_vargets the parameter variable that corresponds to the given incoming variable. This is the inverse ofget_incoming_var_for_parameter_var.- Parameters:
in_var (CoreVariable) – incoming variable
func (Function) – function being analyzed
- Returns:
the parameter variable corresponding to the incoming variable
- Return type:
- get_register_stack_adjustments(view: BinaryView | None, return_value: ValueLocation | None, params: List[ValueLocation]) Dict[RegisterIndex, int][source]¶
get_register_stack_adjustmentscomputes the per-register-stack adjustments (for architectures with register stacks, such as the x87 floating point stack) for a call with the given return value and parameter locations.The default implementation calls
get_default_register_stack_adjustments.- Parameters:
view (BinaryView) – binary view providing type information
return_value (ValueLocation | None) – optional location of the return value
params (List[ValueLocation]) – locations of the parameters
- Returns:
a map from register stack index to its adjustment
- Return type:
Dict[RegisterIndex, int]
- get_return_value_location(view: BinaryView | None, return_value: types.ReturnValueOrType) ValueLocation | None[source]¶
get_return_value_locationcomputes the location of the return value for the given return value type and location structure.The default implementation calls
get_default_return_value_location.- Parameters:
view (BinaryView) – binary view providing type information
return_value (types.ReturnValueOrType) – return value to compute the location for
- Returns:
the location of the return value
- Return type:
Optional[ValueLocation]
- get_returned_indirect_return_value_pointer() CoreVariable | None[source]¶
get_returned_indirect_return_value_pointergets the location in which the hidden indirect return value pointer is returned to the caller, for calling conventions that return it.- Returns:
the location the indirect return value pointer is returned in, or
Noneif it is not returned- Return type:
Optional[CoreVariable]
- get_stack_adjustment_for_locations(view: BinaryView | None, return_value: ValueLocation | None, params: List[Tuple[ValueLocation, Type]])[source]¶
get_stack_adjustment_for_locationscomputes the stack adjustment applied on return for a call with the given return value and parameter locations.The default implementation calls
get_default_stack_adjustment_for_locations.- Parameters:
view (BinaryView) – binary view providing type information
return_value (ValueLocation | None) – optional location of the return value
params (List[Tuple[ValueLocation, Type]]) – list of
(location, type)tuples for the parameters
- Returns:
the stack adjustment in bytes
- Return type:
- is_arg_type_reg_compatible(view: BinaryView | None, type: Type) bool[source]¶
is_arg_type_reg_compatibledetermines whether a value of the given type can be passed as an argument in registers.- Parameters:
view (BinaryView) – binary view providing type information
type (Type) – argument type to check
- Returns:
whether the argument type is register compatible
- Return type:
- is_non_reg_arg_indirect(view: BinaryView | None, type: Type | None) bool[source]¶
is_non_reg_arg_indirectdetermines whether an argument that cannot be passed in registers is passed indirectly by pointer as opposed to being passed directly on the stack.- Parameters:
view (BinaryView) – binary view providing type information
type (Type) – argument type to check
- Returns:
whether the non-register argument is passed indirectly by pointer
- Return type:
- is_return_type_reg_compatible(view: BinaryView | None, type: Type) bool[source]¶
is_return_type_reg_compatibledetermines whether a value of the given type can be returned in registers, as opposed to being returned indirectly through memory.- Parameters:
view (BinaryView) – binary view providing type information
type (Type) – return type to check
- Returns:
whether the return type is register compatible
- Return type:
- perform_get_incoming_flag_value(flag: FlagName, func: Function) RegisterValue[source]¶
Deprecated, override get_incoming_flag_value instead.
- Parameters:
flag (FlagName)
func (Function)
- Return type:
- perform_get_incoming_reg_value(reg: RegisterName, func: Function) RegisterValue[source]¶
Deprecated, override get_incoming_reg_value instead.
- Parameters:
reg (RegisterName)
func (Function)
- Return type:
- perform_get_incoming_var_for_parameter_var(in_var: CoreVariable, func: Function | None = None) CoreVariable[source]¶
Deprecated, override get_incoming_var_for_parameter_var instead.
- Parameters:
in_var (CoreVariable)
func (Function | None)
- Return type:
- perform_get_parameter_var_for_incoming_var(in_var: CoreVariable, func: Function | None = None) CoreVariable[source]¶
Deprecated, override get_parameter_var_for_incoming_var instead.
- Parameters:
in_var (CoreVariable)
func (Function | None)
- Return type:
- with_confidence(confidence: int) CallingConvention[source]¶
- Parameters:
confidence (int)
- Return type:
- property arch: Architecture¶
The architecture this calling convention applies to.
- Getter:
returns the architecture this calling convention applies to
- Setter:
sets the architecture this calling convention applies to
- Type:
- arg_regs_for_varargs = True¶
- callee_saved_regs = []¶
- caller_saved_regs = []¶
- eligible_for_heuristics = True¶
- float_arg_regs = []¶
- float_return_reg = None¶
- global_pointer_reg = None¶
- global_pointer_regs = []¶
- high_int_return_reg = None¶
- implicitly_defined_regs = []¶
- int_arg_regs = []¶
- int_return_reg = None¶
- name = None¶
- required_arg_regs = []¶
- required_clobbered_regs = []¶
- stack_adjusted_on_return = False¶
- stack_args_naturally_aligned = False¶
- stack_args_pushed_left_to_right = False¶
- stack_reserved_for_arg_regs = False¶
CoreCallingConvention¶
- class CoreCallingConvention[source]¶
Bases:
CallingConvention- get_call_layout(view: BinaryView | None, return_value: types.ReturnValueOrType | None, params: types.ParamsType, func: Function | None = None, permitted_regs: List[architecture.RegisterIndex] | None = None) CallLayout[source]¶
get_call_layoutcomputes the complete call layout (parameter locations, return value location, and stack adjustments) for a call with the given return value and parameters. It is recommended to only override this method if the calling convention behavior cannot be modeled withget_return_value_locationand/orget_parameter_locations.The default implementation calls
get_default_call_layout.When calling this method to query the layout of a function, the return value and parameters should have their named type references dereferenced before passing them to this method. Calling the methods
BinaryView.deref_return_value_named_type_referencesandBinaryView.deref_parameter_named_type_referenceswill perform this dereferencing.- Parameters:
view (BinaryView) – binary view providing type information
return_value (types.ReturnValueOrType | None) – return value of the call
params (types.ParamsType) – parameters of the call
func (Function) – function used to resolve the architecture of the resulting locations
permitted_regs (List[architecture.RegisterIndex] | None) – optional set of register indices that argument passing is restricted to; if not provided, the calling convention’s default registers are used
- Returns:
the computed call layout
- Return type:
- get_incoming_flag_value(flag: architecture.FlagType, func: Function) RegisterValue[source]¶
get_incoming_flag_valuegets the known value of a flag on entry to a function.- Parameters:
reg – flag to query
func (Function) – function being analyzed
flag (architecture.FlagType)
- Returns:
the incoming value of the flag
- Return type:
- get_incoming_reg_value(reg: architecture.RegisterType, func: Function) RegisterValue[source]¶
get_incoming_reg_valuegets the known value of a register on entry to a function.- Parameters:
reg (RegisterName) – register to query
func (Function) – function being analyzed
- Returns:
the incoming value of the register
- Return type:
- get_incoming_var_for_parameter_var(in_var: CoreVariable, func: Function | LowLevelILFunction | MediumLevelILFunction | HighLevelILFunction = None) Variable[source]¶
get_incoming_var_for_parameter_vargets the incoming variable that corresponds to the given parameter variable. This is the inverse ofget_parameter_var_for_incoming_var.- Parameters:
in_var (CoreVariable) – parameter variable
func (Function) – function being analyzed
- Returns:
the incoming variable corresponding to the parameter variable
- Return type:
- get_indirect_return_value_location() CoreVariable[source]¶
get_indirect_return_value_locationgets the location used to pass the hidden pointer argument for return values that are returned indirectly through memory.- Returns:
the location of the indirect return value pointer
- Return type:
- get_parameter_locations(view: BinaryView | None, return_value: ValueLocation | None, params: types.ParamsType, arch: Architecture | None = None, permitted_regs: List[architecture.RegisterIndex] | None = None) List[ValueLocation][source]¶
get_parameter_locationscomputes the locations of the parameters for a call with the given return value and parameters.The default implementation calls
get_default_parameter_locations.- Parameters:
view (BinaryView) – binary view providing type information
return_value (ValueLocation | None) – optional location of the return value, which may affect parameter placement (for example, when an indirect return pointer consumes an argument register)
params (types.ParamsType) – parameters of the call
arch (Architecture) – architecture used to resolve the resulting locations
permitted_regs (List[architecture.RegisterIndex] | None) – optional set of register indices that argument passing is restricted to; if not provided, the calling convention’s default registers are used
- Returns:
the locations of the parameters, in order
- Return type:
List[ValueLocation]
- get_parameter_ordering_for_variables(view: BinaryView | None, params: Dict[CoreVariable, Type]) List[CoreVariable][source]¶
get_parameter_ordering_for_variablescomputes the order in which the given parameter variables are passed. Used by the heuristic calling convention detection to create a function type from a list of parameter variables.The default implementation calls
get_default_parameter_ordering_for_variables.- Parameters:
view (BinaryView) – binary view providing type information
params (Dict[CoreVariable, Type]) – map of parameter variables to their types
- Returns:
the parameter variables in the order they are passed
- Return type:
List[CoreVariable]
- get_parameter_var_for_incoming_var(in_var: CoreVariable, func: Function | LowLevelILFunction | MediumLevelILFunction | HighLevelILFunction = None) Variable[source]¶
get_parameter_var_for_incoming_vargets the parameter variable that corresponds to the given incoming variable. This is the inverse ofget_incoming_var_for_parameter_var.- Parameters:
in_var (CoreVariable) – incoming variable
func (Function) – function being analyzed
- Returns:
the parameter variable corresponding to the incoming variable
- Return type:
- get_register_stack_adjustments(view: BinaryView | None, return_value: ValueLocation | None, params: List[ValueLocation]) Dict[RegisterIndex, int][source]¶
get_register_stack_adjustmentscomputes the per-register-stack adjustments (for architectures with register stacks, such as the x87 floating point stack) for a call with the given return value and parameter locations.The default implementation calls
get_default_register_stack_adjustments.- Parameters:
view (BinaryView) – binary view providing type information
return_value (ValueLocation | None) – optional location of the return value
params (List[ValueLocation]) – locations of the parameters
- Returns:
a map from register stack index to its adjustment
- Return type:
Dict[RegisterIndex, int]
- get_return_value_location(view: BinaryView | None, return_value: types.ReturnValueOrType) ValueLocation | None[source]¶
get_return_value_locationcomputes the location of the return value for the given return value type and location structure.The default implementation calls
get_default_return_value_location.- Parameters:
view (BinaryView) – binary view providing type information
return_value (types.ReturnValueOrType) – return value to compute the location for
- Returns:
the location of the return value
- Return type:
Optional[ValueLocation]
- get_returned_indirect_return_value_pointer() CoreVariable | None[source]¶
get_returned_indirect_return_value_pointergets the location in which the hidden indirect return value pointer is returned to the caller, for calling conventions that return it.- Returns:
the location the indirect return value pointer is returned in, or
Noneif it is not returned- Return type:
Optional[CoreVariable]
- get_stack_adjustment_for_locations(view: BinaryView | None, return_value: ValueLocation | None, params: List[Tuple[ValueLocation, Type]])[source]¶
get_stack_adjustment_for_locationscomputes the stack adjustment applied on return for a call with the given return value and parameter locations.The default implementation calls
get_default_stack_adjustment_for_locations.- Parameters:
view (BinaryView) – binary view providing type information
return_value (ValueLocation | None) – optional location of the return value
params (List[Tuple[ValueLocation, Type]]) – list of
(location, type)tuples for the parameters
- Returns:
the stack adjustment in bytes
- Return type:
- is_arg_type_reg_compatible(view: BinaryView | None, type: Type) bool[source]¶
is_arg_type_reg_compatibledetermines whether a value of the given type can be passed as an argument in registers.- Parameters:
view (BinaryView) – binary view providing type information
type (Type) – argument type to check
- Returns:
whether the argument type is register compatible
- Return type:
- is_non_reg_arg_indirect(view: BinaryView | None, type: Type | None) bool[source]¶
is_non_reg_arg_indirectdetermines whether an argument that cannot be passed in registers is passed indirectly by pointer as opposed to being passed directly on the stack.- Parameters:
view (BinaryView) – binary view providing type information
type (Type) – argument type to check
- Returns:
whether the non-register argument is passed indirectly by pointer
- Return type:
- is_return_type_reg_compatible(view: BinaryView | None, type: Type) bool[source]¶
is_return_type_reg_compatibledetermines whether a value of the given type can be returned in registers, as opposed to being returned indirectly through memory.- Parameters:
view (BinaryView) – binary view providing type information
type (Type) – return type to check
- Returns:
whether the return type is register compatible
- Return type: