Header menu logo B2R2

CallingConvention Type

Provides a set of functions to obtain calling convention information for different architectures. This includes the list of volatile registers, the register used for syscall return values, and the register used for syscall numbers.

Static members

Static member Description

CallingConvention.FunctionArgRegister(hdl, os, num)

Full Usage: CallingConvention.FunctionArgRegister(hdl, os, num)

Parameters:
Returns: int<MeasureProduct<T, MeasureOne>>

Obtain the register ID used for the nth function call parameter. Since actual calling convention may vary depending on the binaries, this function only returns a generally used register for the given architecture and the file format.

hdl : BinHandle
os : OS
num : int
Returns: int<MeasureProduct<T, MeasureOne>>

CallingConvention.IsNonVolatile(hdl, os, rid)

Full Usage: CallingConvention.IsNonVolatile(hdl, os, rid)

Parameters:
Returns: bool

Check if the given register is non-volatile register in the given binary. Non-volatile registers are preserved by callee, i.e., callee-saved registers.

hdl : BinHandle
os : OS
rid : int<MeasureProduct<T, MeasureOne>>
Returns: bool

CallingConvention.ReturnRegister(hdl)

Full Usage: CallingConvention.ReturnRegister(hdl)

Parameters:
Returns: int<MeasureProduct<T, MeasureOne>>

Obtain the register ID used for storing syscall return values.

hdl : BinHandle
Returns: int<MeasureProduct<T, MeasureOne>>

CallingConvention.SyscallArgRegister(hdl, os, num)

Full Usage: CallingConvention.SyscallArgRegister(hdl, os, num)

Parameters:
Returns: int<MeasureProduct<T, MeasureOne>>

Obtain the register ID used for the nth syscall parameter.

hdl : BinHandle
os : OS
num : int
Returns: int<MeasureProduct<T, MeasureOne>>

CallingConvention.SyscallNumRegister(hdl)

Full Usage: CallingConvention.SyscallNumRegister(hdl)

Parameters:
Returns: int<MeasureProduct<T, MeasureOne>>

Obtain the register ID used for storing a syscall number.

hdl : BinHandle
Returns: int<MeasureProduct<T, MeasureOne>>

CallingConvention.VolatileRegisters(hdl)

Full Usage: CallingConvention.VolatileRegisters(hdl)

Parameters:
Returns: int<MeasureProduct<T, MeasureOne>>[]

Obtain the list of volatile register IDs

hdl : BinHandle
Returns: int<MeasureProduct<T, MeasureOne>>[]

Type something to start searching.