platform module

binaryninja.platform.Platform(arch[, handle]) class Platform contains all information releated to the execution environment of the binary, mainly the
class binaryninja.platform.Platform(arch, handle=None)[source]

Bases: object

class Platform contains all information releated to the execution environment of the binary, mainly the calling conventions used.

calling_conventions

List of platform CallingConvention objects (read-only)

Getter:returns the list of supported CallingConvention objects
Type:list(CallingConvention)
cdecl_calling_convention

Cdecl calling convention.

Getter:returns a CallingConvention object for the cdecl calling convention.

:setter sets the cdecl calling convention :type: CallingConvention

default_calling_convention

Default calling convention.

Getter:returns a CallingConvention object for the default calling convention.
Setter:sets the default calling convention
Type:CallingConvention
fastcall_calling_convention

Fastcall calling convention.

Getter:returns a CallingConvention object for the fastcall calling convention.

:setter sets the fastcall calling convention :type: CallingConvention

get_associated_platform_by_address(addr)[source]
name = None
register(os)[source]

register registers the platform for given OS name.

Parameters:os (str) – OS name to register
Return type:None
register_calling_convention(cc)[source]

register_calling_convention register a new calling convention.

Parameters:cc (CallingConvention) – a CallingConvention object to register
Return type:None
stdcall_calling_convention

Stdcall calling convention.

Getter:returns a CallingConvention object for the stdcall calling convention.

:setter sets the stdcall calling convention :type: CallingConvention

system_call_convention

System call convention.

Getter:returns a CallingConvention object for the system call convention.

:setter sets the system call convention :type: CallingConvention