B2R2


CallingConvention Module

Functions and values

Function or value Description

functionArgRegister arg1 arg2

Full Usage: functionArgRegister arg1 arg2

Parameters:
Returns: RegisterID

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.

arg0 : BinHandle
arg1 : int
Returns: RegisterID

isNonVolatile arg1 arg2

Full Usage: isNonVolatile arg1 arg2

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.

arg0 : BinHandle
arg1 : RegisterID
Returns: bool

returnRegister arg1

Full Usage: returnRegister arg1

Parameters:
Returns: RegisterID

Obtain the register ID used for storing syscall return values.

arg0 : BinHandle
Returns: RegisterID

syscallArgRegister arg1 arg2

Full Usage: syscallArgRegister arg1 arg2

Parameters:
Returns: RegisterID

Obtain the register ID used for the nth syscall parameter.

arg0 : BinHandle
arg1 : int
Returns: RegisterID

syscallNumRegister arg1

Full Usage: syscallNumRegister arg1

Parameters:
Returns: RegisterID

Obtain the register ID used for storing a syscall number.

arg0 : BinHandle
Returns: RegisterID

volatileRegisters arg1

Full Usage: volatileRegisters arg1

Parameters:
Returns: RegisterID list

Obtain the list of volatile register IDs

arg0 : BinHandle
Returns: RegisterID list