binaryninja.types.Type

class Type(handle, platform=None, confidence=255)[source]

class Type allows you to interact with the Binary Ninja type system. Note that the repr and str handlers respond differently on type objects.

Other related functions that may be helpful include:

parse_type_string parse_types_from_source parse_types_from_source_file

__init__(handle, platform=None, confidence=255)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(handle[, platform, confidence])

Initialize self.

array(t, count)

bool()

char()

enumeration_type(arch, e[, width, sign])

float(width[, altname])

float class method for creating floating point Types.

function(ret, params[, calling_convention, …])

function class method for creating an function Type.

generate_auto_demangled_type_id(name)

generate_auto_type_id(source, name)

get_auto_demangled_type_id_source()

get_string_after_name()

get_string_before_name()

get_tokens([base_confidence])

get_tokens_after_name([base_confidence])

get_tokens_before_name([base_confidence])

int(width[, sign, altname])

int class method for creating an int Type.

mutable_copy()

named_type(named_type[, width, align])

named_type_from_registered_type(view, name)

named_type_from_type(name, t)

named_type_from_type_and_id(type_id, name, t)

pointer(arch, t[, const, volatile, ref_type])

structure_type(structure_type)

void()

wide_char(width[, altname])

wide_char class method for creating wide char Types.

with_confidence(confidence)

with_replaced_enumeration(from_enum, to_enum)

with_replaced_named_type_reference(from_ref, …)

with_replaced_structure(from_struct, to_struct)

Attributes

alignment

Type alignment (read-only)

calling_convention

Calling convention (read-only)

can_return

Whether type can return

confidence

const

Whether type is const (read/write)

count

Type count (read-only)

element_type

Target (read-only)

enumeration

Type enumeration (read-only)

floating_point

Whether type is floating point (read-only)

handle

has_variable_arguments

Whether type has variable arguments (read-only)

named_type_reference

Reference to a named type (read-only)

offset

Offset into structure (read-only)

parameters

Type parameters list (read-only)

platform

registered_name

Name of type registered to binary view, if any (read-only)

return_value

Return value (read-only)

signed

Whether type is signed (read-only)

stack_adjustment

Stack adjustment for function (read-only)

structure

Structure of the type (read-only)

target

Target (read-only)

tokens

Type string as a list of tokens (read-only)

type_class

Type class (read-only)

volatile

Whether type is volatile (read/write)

width

Type width (read-only)