angr.rust.sim_type

angr.rust.sim_type.is_composite_type(ty)
class angr.rust.sim_type.RustSimType

Bases: object

property size: int
repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

c_repr(name=None, full=0, memo=None, indent=0, name_parens=True, **kwargs)
Parameters:
  • indent (int | None)

  • name_parens (bool)

class angr.rust.sim_type.RustSimTypeInt

Bases: RustSimType, SimTypeInt

repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

property alignment

The alignment of the type in bytes.

property size: int

The size of the type in bits, or None if no size is computable.

class angr.rust.sim_type.RustSimTypeSize

Bases: RustSimTypeInt

property size

The size of the type in bits, or None if no size is computable.

copy()
class angr.rust.sim_type.RustSimTypeFunction

Bases: RustSimType, SimTypeFunction

SimTypeFunction is a type that specifies an actual function (i.e. not a pointer) with certain types of arguments and a certain return value.

args: list[RustSimType]
returnty: RustSimType | None
base: bool = False
__init__(args, returnty, label=None, arg_names=None, variadic=False, is_arg0_retbuf=False, is_class_member_function=False)
Parameters:
  • label – The type label

  • args (list[RustSimType]) – A tuple of types representing the arguments to the function

  • returnty (RustSimType | None) – The return type of the function, or none for void

  • variadic – Whether the function accepts varargs

property size

The size of the type in bits, or None if no size is computable.

normalize()
copy()
class angr.rust.sim_type.RustSimTypeReference

Bases: RustSimType, SimTypePointer

SimTypePointer is a type that specifies a pointer to some other type.

__init__(pts_to, label=None, offset=0)
Parameters:
  • label – The type label.

  • pts_to – The type to which this pointer points.

repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

property size

The size of the type in bits, or None if no size is computable.

copy()
class angr.rust.sim_type.RustSimTypeArray

Bases: RustSimType, SimTypeArray

SimTypeArray is a type that specifies a series of data laid out in sequence.

__init__(elem_type, length=None, label=None)
Parameters:
  • label – The type label.

  • elem_type – The type of each element in the array.

  • length – An expression of the length of the array, if known.

repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

copy()
property size

The size of the type in bits, or None if no size is computable.

class angr.rust.sim_type.RustSimStruct

Bases: RustSimType, SimStruct

property size

The size of the type in bits, or None if no size is computable.

repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

copy()
get_field_ty(name)
get_field_offset(name, default=None)
class angr.rust.sim_type.RustSimTypeNumOffset

Bases: RustSimType, SimTypeNumOffset

like SimTypeNum, but supports an offset of 1 to 7 to a byte aligned address to allow structs with bitfields

repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

class angr.rust.sim_type.RustSimTypeSlice

Bases: RustSimStruct, SimType

repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

copy()
property size

The size of the type in bits, or None if no size is computable.

class angr.rust.sim_type.RustSimTypeVec

Bases: RustSimStruct, SimType

repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

class angr.rust.sim_type.RustSimTypeBottom

Bases: RustSimType, SimTypeBottom

property size: int

The size of the type in bits, or None if no size is computable.

repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

class angr.rust.sim_type.EnumVariant

Bases: object

__init__(name, fields, discriminant, discriminant_size)
fields: list[tuple[SimType, str | None]]
static from_no_data(name, discriminant, discriminant_size)
static from_single_field_ty(name, field_ty, discriminant, discriminant_size)
has_fields()
property first_field_offset
property field_offsets
property bits
property size
property type
as_struct_ty()
with_arch(arch)
to_json(memo=None)
static from_json(d)
class angr.rust.sim_type.RustSimEnum

Bases: RustSimType, SimType

property size: int

The size of the type in bits, or None if no size is computable.

copy()
repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

get_variant(discriminant)
Return type:

EnumVariant | None

get_variant_by_name(name)
num_variants()
as_struct_ty()
class angr.rust.sim_type.RustSimTypeOption

Bases: RustSimEnum

copy()
repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

class angr.rust.sim_type.RustSimTypeResult

Bases: RustSimEnum

copy()
repr(name=None, full=0, memo=None, indent=0)
Parameters:

indent (int | None)

class angr.rust.sim_type.RustSimTypeUnit

Bases: RustSimStruct

copy()
property size

The size of the type in bits, or None if no size is computable.

class angr.rust.sim_type.RustSimTypeStrRef

Bases: RustSimTypeSlice

copy()