IDAPython 9.0
Loading...
Searching...
No Matches
tinfo_t Class Reference

Proxy of C++ tinfo_t class.

Inheritance diagram for tinfo_t:

Public Member Functions

 __init__ (self, *args, ordinal=None, name=None, til=None)
 Create a type object with the provided argumens.
 
"void" clear (self)
 clear(self) Clear contents of this tinfo, and remove from the type system.
 
"void" swap (self, "tinfo_t" r)
 swap(self, r) Assign this = r and r = this.
 
"bool" get_named_type (self, *args)
 get_named_type(self, til, name, decl_type=BTF_TYPEDEF, resolve=True, try_ordinal=True) -> bool
 
"bool" get_numbered_type (self, *args)
 get_numbered_type(self, til, ordinal, decl_type=BTF_TYPEDEF, resolve=True) -> bool
 
"bool" detach (self)
 detach(self) -> bool Detach tinfo_t from the underlying type.
 
"bool" is_correct (self)
 is_correct(self) -> bool Is the type object correct?.
 
"type_t" get_realtype (self, "bool" full=False)
 get_realtype(self, full=False) -> type_t Get the resolved base type.
 
"type_t" get_decltype (self)
 get_decltype(self) -> type_t Get declared type (without resolving type references; they are returned as is).
 
"bool" empty (self)
 empty(self) -> bool Was tinfo_t initialized with some type info or not?
 
"bool" present (self)
 present(self) -> bool Is the type really present? (not a reference to a missing type, for example)
 
"size_t" get_size (self, "uint32 *" p_effalign=None, "int" gts_code=0)
 get_size(self, p_effalign=None, gts_code=0) -> size_t Get the type size in bytes.
 
"size_t" get_unpadded_size (self)
 get_unpadded_size(self) -> size_t Get the type size in bytes without the final padding, in bytes.
 
"type_sign_t" get_sign (self)
 get_sign(self) -> type_sign_t Get type sign.
 
"bool" is_signed (self)
 is_signed(self) -> bool Is this a signed type?
 
"bool" is_unsigned (self)
 is_unsigned(self) -> bool Is this an unsigned type?
 
"uchar" get_declalign (self)
 get_declalign(self) -> uchar Get declared alignment of the type.
 
"bool" is_typeref (self)
 is_typeref(self) -> bool Is this type a type reference?.
 
"bool" has_details (self)
 has_details(self) -> bool Does this type refer to a nontrivial type?
 
"bool" get_type_name (self)
 get_type_name(self) -> bool Does a type refer to a name?.
 
"bool" get_nice_type_name (self)
 get_nice_type_name(self) -> bool Get the beautified type name.
 
"tinfo_code_t" rename_type (self, "char const *" name, "int" ntf_flags=0)
 rename_type(self, name, ntf_flags=0) -> tinfo_code_t Rename a type
 
"bool" get_final_type_name (self)
 get_final_type_name(self) -> bool Use in the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn).
 
"bool" get_next_type_name (self)
 get_next_type_name(self) -> bool Use In the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn).
 
"tid_t" get_tid (self)
 get_tid(self) -> tid_t Get the type tid Each type in the local type library has a so-called tid associated with it.
 
"tid_t" force_tid (self)
 force_tid(self) -> tid_t Get the type tid.
 
"uint32" get_ordinal (self)
 get_ordinal(self) -> uint32 Get type ordinal (only if the type was created as a numbered type, 0 if none)
 
"uint32" get_final_ordinal (self)
 get_final_ordinal(self) -> uint32 Get final type ordinal (0 if none)
 
"til_t *" get_til (self)
 get_til(self) -> til_t Get the type library for tinfo_t.
 
"bool" is_from_subtil (self)
 is_from_subtil(self) -> bool Was the named type found in some base type library (not the top level type library)?.
 
"bool" is_forward_decl (self)
 is_forward_decl(self) -> bool Is this a forward declaration?.
 
"type_t" get_forward_type (self)
 get_forward_type(self) -> type_t Get type of a forward declaration.
 
"bool" is_forward_struct (self)
 is_forward_struct(self) -> bool
 
"bool" is_forward_union (self)
 is_forward_union(self) -> bool
 
"bool" is_forward_enum (self)
 is_forward_enum(self) -> bool
 
"bool" is_typedef (self)
 is_typedef(self) -> bool Is this a typedef?.
 
"int" get_type_cmt (self)
 get_type_cmt(self) -> int Get type comment
 
"bool" get_type_rptcmt (self)
 get_type_rptcmt(self) -> bool Get type comment only if it is repeatable.
 
"bool" is_decl_const (self)
 is_decl_const(self) -> bool is_type_const(get_decltype())
 
"bool" is_decl_volatile (self)
 is_decl_volatile(self) -> bool is_type_volatile(get_decltype())
 
"bool" is_decl_void (self)
 is_decl_void(self) -> bool is_type_void(get_decltype())
 
"bool" is_decl_partial (self)
 is_decl_partial(self) -> bool is_type_partial(get_decltype())
 
"bool" is_decl_unknown (self)
 is_decl_unknown(self) -> bool is_type_unknown(get_decltype())
 
"bool" is_decl_last (self)
 is_decl_last(self) -> bool is_typeid_last(get_decltype())
 
"bool" is_decl_ptr (self)
 is_decl_ptr(self) -> bool is_type_ptr(get_decltype())
 
"bool" is_decl_array (self)
 is_decl_array(self) -> bool is_type_array(get_decltype())
 
"bool" is_decl_func (self)
 is_decl_func(self) -> bool is_type_func(get_decltype())
 
"bool" is_decl_complex (self)
 is_decl_complex(self) -> bool is_type_complex(get_decltype())
 
"bool" is_decl_typedef (self)
 is_decl_typedef(self) -> bool is_type_typedef(get_decltype())
 
"bool" is_decl_sue (self)
 is_decl_sue(self) -> bool is_type_sue(get_decltype())
 
"bool" is_decl_struct (self)
 is_decl_struct(self) -> bool is_type_struct(get_decltype())
 
"bool" is_decl_union (self)
 is_decl_union(self) -> bool is_type_union(get_decltype())
 
"bool" is_decl_udt (self)
 is_decl_udt(self) -> bool is_type_struni(get_decltype())
 
"bool" is_decl_enum (self)
 is_decl_enum(self) -> bool is_type_enum(get_decltype())
 
"bool" is_decl_bitfield (self)
 is_decl_bitfield(self) -> bool is_type_bitfld(get_decltype())
 
"bool" is_decl_int128 (self)
 is_decl_int128(self) -> bool is_type_int128(get_decltype())
 
"bool" is_decl_int64 (self)
 is_decl_int64(self) -> bool is_type_int64(get_decltype())
 
"bool" is_decl_int32 (self)
 is_decl_int32(self) -> bool is_type_int32(get_decltype())
 
"bool" is_decl_int16 (self)
 is_decl_int16(self) -> bool is_type_int16(get_decltype())
 
"bool" is_decl_int (self)
 is_decl_int(self) -> bool is_type_int(get_decltype())
 
"bool" is_decl_char (self)
 is_decl_char(self) -> bool is_type_char(get_decltype())
 
"bool" is_decl_uint (self)
 is_decl_uint(self) -> bool is_type_uint(get_decltype())
 
"bool" is_decl_uchar (self)
 is_decl_uchar(self) -> bool is_type_uchar(get_decltype())
 
"bool" is_decl_uint16 (self)
 is_decl_uint16(self) -> bool is_type_uint16(get_decltype())
 
"bool" is_decl_uint32 (self)
 is_decl_uint32(self) -> bool is_type_uint32(get_decltype())
 
"bool" is_decl_uint64 (self)
 is_decl_uint64(self) -> bool is_type_uint64(get_decltype())
 
"bool" is_decl_uint128 (self)
 is_decl_uint128(self) -> bool is_type_uint128(get_decltype())
 
"bool" is_decl_ldouble (self)
 is_decl_ldouble(self) -> bool is_type_ldouble(get_decltype())
 
"bool" is_decl_double (self)
 is_decl_double(self) -> bool is_type_double(get_decltype())
 
"bool" is_decl_float (self)
 is_decl_float(self) -> bool is_type_float(get_decltype())
 
"bool" is_decl_tbyte (self)
 is_decl_tbyte(self) -> bool is_type_tbyte(get_decltype())
 
"bool" is_decl_floating (self)
 is_decl_floating(self) -> bool is_type_floating(get_decltype())
 
"bool" is_decl_bool (self)
 is_decl_bool(self) -> bool is_type_bool(get_decltype())
 
"bool" is_decl_paf (self)
 is_decl_paf(self) -> bool is_type_paf(get_decltype())
 
"bool" is_well_defined (self)
 is_well_defined(self) -> bool !(empty()) && !(is_decl_partial()) && !(is_punknown())
 
"bool" is_const (self)
 is_const(self) -> bool is_type_const(get_realtype())
 
"bool" is_volatile (self)
 is_volatile(self) -> bool is_type_volatile(get_realtype())
 
"bool" is_void (self)
 is_void(self) -> bool is_type_void(get_realtype())
 
"bool" is_partial (self)
 is_partial(self) -> bool is_type_partial(get_realtype())
 
"bool" is_unknown (self)
 is_unknown(self) -> bool is_type_unknown(get_realtype())
 
"bool" is_ptr (self)
 is_ptr(self) -> bool is_type_ptr(get_realtype())
 
"bool" is_array (self)
 is_array(self) -> bool is_type_array(get_realtype())
 
"bool" is_func (self)
 is_func(self) -> bool is_type_func(get_realtype())
 
"bool" is_complex (self)
 is_complex(self) -> bool is_type_complex(get_realtype())
 
"bool" is_struct (self)
 is_struct(self) -> bool is_type_struct(get_realtype())
 
"bool" is_union (self)
 is_union(self) -> bool is_type_union(get_realtype())
 
"bool" is_udt (self)
 is_udt(self) -> bool is_type_struni(get_realtype())
 
"bool" is_enum (self)
 is_enum(self) -> bool is_type_enum(get_realtype())
 
"bool" is_sue (self)
 is_sue(self) -> bool is_type_sue(get_realtype())
 
"bool" is_bitfield (self)
 is_bitfield(self) -> bool is_type_bitfld(get_realtype())
 
"bool" is_int128 (self)
 is_int128(self) -> bool is_type_int128(get_realtype())
 
"bool" is_int64 (self)
 is_int64(self) -> bool is_type_int64(get_realtype())
 
"bool" is_int32 (self)
 is_int32(self) -> bool is_type_int32(get_realtype())
 
"bool" is_int16 (self)
 is_int16(self) -> bool is_type_int16(get_realtype())
 
"bool" is_int (self)
 is_int(self) -> bool is_type_int(get_realtype())
 
"bool" is_char (self)
 is_char(self) -> bool is_type_char(get_realtype())
 
"bool" is_uint (self)
 is_uint(self) -> bool is_type_uint(get_realtype())
 
"bool" is_uchar (self)
 is_uchar(self) -> bool is_type_uchar(get_realtype())
 
"bool" is_uint16 (self)
 is_uint16(self) -> bool is_type_uint16(get_realtype())
 
"bool" is_uint32 (self)
 is_uint32(self) -> bool is_type_uint32(get_realtype())
 
"bool" is_uint64 (self)
 is_uint64(self) -> bool is_type_uint64(get_realtype())
 
"bool" is_uint128 (self)
 is_uint128(self) -> bool is_type_uint128(get_realtype())
 
"bool" is_ldouble (self)
 is_ldouble(self) -> bool is_type_ldouble(get_realtype())
 
"bool" is_double (self)
 is_double(self) -> bool is_type_double(get_realtype())
 
"bool" is_float (self)
 is_float(self) -> bool is_type_float(get_realtype())
 
"bool" is_tbyte (self)
 is_tbyte(self) -> bool is_type_tbyte(get_realtype())
 
"bool" is_bool (self)
 is_bool(self) -> bool is_type_bool(get_realtype())
 
"bool" is_paf (self)
 is_paf(self) -> bool is_type_paf(get_realtype())
 
"bool" is_ptr_or_array (self)
 is_ptr_or_array(self) -> bool is_type_ptr_or_array(get_realtype())
 
"bool" is_integral (self)
 is_integral(self) -> bool is_type_integral(get_realtype())
 
"bool" is_ext_integral (self)
 is_ext_integral(self) -> bool is_type_ext_integral(get_realtype())
 
"bool" is_floating (self)
 is_floating(self) -> bool is_type_floating(get_realtype())
 
"bool" is_arithmetic (self)
 is_arithmetic(self) -> bool is_type_arithmetic(get_realtype())
 
"bool" is_ext_arithmetic (self)
 is_ext_arithmetic(self) -> bool is_type_ext_arithmetic(get_realtype())
 
"bool" is_scalar (self)
 is_scalar(self) -> bool Does the type represent a single number?
 
"bool" get_ptr_details (self, "ptr_type_data_t" pi)
 get_ptr_details(self, pi) -> bool Get the pointer info.
 
"bool" get_array_details (self, "array_type_data_t" ai)
 get_array_details(self, ai) -> bool Get the array specific info.
 
"bool" get_enum_details (self, "enum_type_data_t" ei)
 get_enum_details(self, ei) -> bool Get the enum specific info.
 
"bool" get_bitfield_details (self, "bitfield_type_data_t" bi)
 get_bitfield_details(self, bi) -> bool Get the bitfield specific info.
 
"bool" get_udt_details (self, "udt_type_data_t" udt, "gtd_udt_t" gtd=GTD_CALC_LAYOUT)
 get_udt_details(self, udt, gtd=GTD_CALC_LAYOUT) -> bool Get the udt specific info.
 
"bool" get_func_details (self, "func_type_data_t" fi, "gtd_func_t" gtd=GTD_CALC_ARGLOCS)
 get_func_details(self, fi, gtd=GTD_CALC_ARGLOCS) -> bool Get only the function specific info for this tinfo_t.
 
"bool" is_funcptr (self)
 is_funcptr(self) -> bool Is this pointer to a function?
 
"bool" is_shifted_ptr (self)
 is_shifted_ptr(self) -> bool Is a shifted pointer?
 
"bool" is_varstruct (self)
 is_varstruct(self) -> bool Is a variable-size structure?
 
"bool" is_varmember (self)
 is_varmember(self) -> bool Can the type be of a variable struct member? This function checks for: is_array() && array.nelems==0 Such a member can be only the very last member of a structure
 
"int" get_ptrarr_objsize (self)
 get_ptrarr_objsize(self) -> int BT_PTR & BT_ARRAY: get size of pointed object or array element.
 
"tinfo_t" get_ptrarr_object (self)
 get_ptrarr_object(self) -> tinfo_t BT_PTR & BT_ARRAY: get the pointed object or array element.
 
"tinfo_t" get_pointed_object (self)
 get_pointed_object(self) -> tinfo_t
 
"bool" is_pvoid (self)
 is_pvoid(self) -> bool Is "void *"?.
 
"bool" is_punknown (self)
 is_punknown(self) -> bool Is "_UNKNOWN *"?.
 
"tinfo_t" get_array_element (self)
 get_array_element(self) -> tinfo_t
 
"tinfo_t" get_final_element (self)
 get_final_element(self) -> tinfo_t repeat recursively: if an array, return the type of its element; else return the type itself.
 
"int" get_array_nelems (self)
 get_array_nelems(self) -> int
 
"tinfo_t" get_nth_arg (self, "int" n)
 get_nth_arg(self, n) -> tinfo_t BT_FUNC or BT_PTR BT_FUNC: Get type of n-th arg (-1 means return type, see get_rettype())
 
"tinfo_t" get_rettype (self)
 get_rettype(self) -> tinfo_t BT_FUNC or BT_PTR BT_FUNC: Get the function's return type
 
"int" get_nargs (self)
 get_nargs(self) -> int BT_FUNC or BT_PTR BT_FUNC: Calculate number of arguments (-1 - error)
 
"bool" is_user_cc (self)
 is_user_cc(self) -> bool is_user_cc(get_cc())
 
"bool" is_vararg_cc (self)
 is_vararg_cc(self) -> bool is_vararg_cc(get_cc())
 
"bool" is_purging_cc (self)
 is_purging_cc(self) -> bool is_purging_cc(get_cc())
 
"int" calc_purged_bytes (self)
 calc_purged_bytes(self) -> int
 
"bool" is_high_func (self)
 is_high_func(self) -> bool
 
"bool" get_methods (self, "udtmembervec_t" methods)
 get_methods(self, methods) -> bool
 
"bool" get_bit_buckets (self, "range64vec_t" buckets)
 get_bit_buckets(self, buckets) -> bool ::BT_STRUCT: get bit buckets Bit buckets are used to layout bitfields
 
"int" find_udm (self, *args)
 find_udm(self, udm, strmem_flags) -> int BTF_STRUCT,BTF_UNION: Find an udt member by name
 
"int" get_udm (self, *args)
 Retrieve a structure/union member with either the specified name or the specified index, in the specified tinfo_t object.
 
"int" get_udm_by_offset (self, "uint64" offset)
 Retrieve a structure/union member with the specified offset, in the specified tinfo_t object.
 
"int" get_udt_nmembers (self)
 get_udt_nmembers(self) -> int Get number of udt members.
 
"bool" is_empty_udt (self)
 is_empty_udt(self) -> bool Is an empty struct/union? (has no fields)
 
"bool" is_small_udt (self)
 is_small_udt(self) -> bool Is a small udt? (can fit a register or a pair of registers)
 
"bool" requires_qualifier (self, "char const *" name, "uint64" offset)
 requires_qualifier(self, name, offset) -> bool Requires full qualifier? (name is not unique)
 
"bool" append_covered (self, "rangeset_t" out, "uint64" offset=0)
 append_covered(self, out, offset=0) -> bool Calculate set of covered bytes for the type
 
"bool" calc_gaps (self, "rangeset_t" out)
 calc_gaps(self, out) -> bool Calculate set of padding bytes for the type
 
"bool" is_one_fpval (self)
 is_one_fpval(self) -> bool Floating value or an object consisting of one floating member entirely.
 
"bool" is_sse_type (self)
 is_sse_type(self) -> bool Is a SSE vector type?
 
"bool" is_anonymous_udt (self)
 is_anonymous_udt(self) -> bool Is an anonymous struct/union? We assume that types with names are anonymous if the name starts with $
 
"bool" is_vftable (self)
 is_vftable(self) -> bool Is a vftable type?
 
"bool" has_vftable (self)
 has_vftable(self) -> bool Has a vftable?
 
"bool" has_union (self)
 has_union(self) -> bool Has a member of type "union"?
 
"size_t" get_enum_nmembers (self)
 get_enum_nmembers(self) -> size_t Get number of enum members.
 
"bool" is_empty_enum (self)
 is_empty_enum(self) -> bool Is an empty enum? (has no constants)
 
"type_t" get_enum_base_type (self)
 get_enum_base_type(self) -> type_t Get enum base type (convert enum to integer type) Returns BT_UNK if failed to convert
 
"bool" is_bitmask_enum (self)
 is_bitmask_enum(self) -> bool Is bitmask enum?
 
"int" get_enum_radix (self)
 get_enum_radix(self) -> int Get enum constant radix
 
"tinfo_code_t" get_enum_repr (self, "value_repr_t" repr)
 get_enum_repr(self, repr) -> tinfo_code_t Set the representation of enum members.
 
"int" get_enum_width (self)
 get_enum_width(self) -> int Get enum width
 
"uint64" calc_enum_mask (self)
 calc_enum_mask(self) -> uint64
 
"ssize_t" get_edm_by_value (self, *args)
 Retrieve an enumerator with the specified value, in the specified tinfo_t object.
 
"tid_t" get_edm_tid (self, "size_t" idx)
 get_edm_tid(self, idx) -> tid_t Get enum member TID
 
"tinfo_t" get_onemember_type (self)
 get_onemember_type(self) -> tinfo_t For objects consisting of one member entirely: return type of the member.
 
"tinfo_t" get_innermost_udm (self, "uint64" bitoffset)
 get_innermost_udm(self, bitoffset) -> tinfo_t Get the innermost member at the given offset
 
"tinfo_t" get_innermost_member_type (self, "uint64" bitoffset)
 get_innermost_member_type(self, bitoffset) -> tinfo_t Get the innermost member type at the given offset
 
"uint32" calc_score (self)
 calc_score(self) -> uint32 Calculate the type score (the higher - the nicer is the type)
 
"char const *" dstr (self)
 dstr(self) -> char const * Function to facilitate debugging.
 
"bool" get_attrs (self, "type_attrs_t" tav, "bool" all_attrs=False)
 get_attrs(self, tav, all_attrs=False) -> bool Get type attributes (all_attrs: include attributes of referenced types, if any)
 
"bool" set_attrs (self, "type_attrs_t" tav)
 set_attrs(self, tav) -> bool Set type attributes.
 
"bool" set_attr (self, "type_attr_t" ta, "bool" may_overwrite=True)
 set_attr(self, ta, may_overwrite=True) -> bool Set a type attribute.
 
"void" del_attrs (self)
 del_attrs(self) Del all type attributes.
 
"bool" del_attr (self, "qstring const &" key, "bool" make_copy=True)
 del_attr(self, key, make_copy=True) -> bool Del a type attribute.
 
"bool" create_simple_type (self, "type_t" decl_type)
 create_simple_type(self, decl_type) -> bool
 
"bool" create_ptr (self, *args)
 create_ptr(self, p, decl_type=BT_PTR) -> bool
 
"bool" create_array (self, *args)
 create_array(self, p, decl_type=BT_ARRAY) -> bool
 
"void" create_typedef (self, *args)
 create_typedef(self, p, decl_type=BTF_TYPEDEF, try_ordinal=True) -> bool
 
"bool" create_bitfield (self, *args)
 create_bitfield(self, p, decl_type=BT_BITFIELD) -> bool
 
"bool" parse (self, "char const *" decl, "til_t" til=None, "int" pt_flags=0)
 parse(self, decl, til=None, pt_flags=0) -> bool Convenience function to parse a string with a type declaration
 
"bool" create_udt (self, *args)
 create_udt(self, is_union=False) -> bool Create an empty structure/union.
 
"bool" create_enum (self, *args)
 create_enum(self, bte=BTE_ALWAYS|BTE_HEX) -> bool Create an empty enum.
 
"bool" create_func (self, *args)
 create_func(self, p, decl_type=BT_FUNC) -> bool
 
"ssize_t" get_udm_by_tid (self, "udm_t" udm, "tid_t" tid)
 get_udm_by_tid(self, udm, tid) -> ssize_t Retrive tinfo using type TID or struct/enum member MID
 
"ssize_t" get_edm_by_tid (self, "edm_t" edm, "tid_t" tid)
 get_edm_by_tid(self, edm, tid) -> ssize_t
 
"bool" get_type_by_tid (self, "tid_t" tid)
 get_type_by_tid(self, tid) -> bool
 
"ssize_t" get_by_edm_name (self, "char const *" mname, "til_t" til=None)
 get_by_edm_name(self, mname, til=None) -> ssize_t Retrieve enum tinfo using enum member name
 
"tinfo_code_t" set_named_type (self, "til_t" til, "char const *" name, "int" ntf_flags=0)
 set_named_type(self, til, name, ntf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" set_symbol_type (self, "til_t" til, "char const *" name, "int" ntf_flags=0)
 set_symbol_type(self, til, name, ntf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" set_numbered_type (self, "til_t" til, "uint32" ord, "int" ntf_flags=0, "char const *" name=None)
 set_numbered_type(self, til, ord, ntf_flags=0, name=None) -> tinfo_code_t
 
"tinfo_code_t" save_type (self, *args)
 save_type(self, ntf_flags=0x0001|0x0004) -> tinfo_code_t
 
"tinfo_code_t" copy_type (self, *args)
 copy_type(self, til, name, ntf_flags=0x0001|0x1000) -> tinfo_code_t
 
"tinfo_code_t" create_forward_decl (self, "til_t" til, "type_t" decl_type, "char const *" name, "int" ntf_flags=0)
 create_forward_decl(self, til, decl_type, name, ntf_flags=0) -> tinfo_code_t Create a forward declaration.
 
"bool" convert_array_to_ptr (self)
 convert_array_to_ptr(self) -> bool Convert an array into a pointer.
 
"bool" remove_ptr_or_array (self)
 remove_ptr_or_array(self) -> bool Replace the current type with the ptr obj or array element.
 
"uint64" read_bitfield_value (self, "uint64" v, "int" bitoff)
 read_bitfield_value(self, v, bitoff) -> uint64
 
"uint64" write_bitfield_value (self, "uint64" dst, "uint64" v, "int" bitoff)
 write_bitfield_value(self, dst, v, bitoff) -> uint64
 
"type_t" get_modifiers (self)
 get_modifiers(self) -> type_t
 
"void" set_modifiers (self, "type_t" mod)
 set_modifiers(self, mod)
 
"void" set_const (self)
 set_const(self)
 
"void" set_volatile (self)
 set_volatile(self)
 
"void" clr_decl_const_volatile (self)
 clr_decl_const_volatile(self)
 
"bool" clr_const (self)
 clr_const(self) -> bool
 
"bool" clr_volatile (self)
 clr_volatile(self) -> bool
 
"bool" clr_const_volatile (self)
 clr_const_volatile(self) -> bool
 
"tinfo_code_t" set_type_alignment (self, "uchar" declalign, "uint" etf_flags=0)
 set_type_alignment(self, declalign, etf_flags=0) -> tinfo_code_t Set type alignment.
 
"bool" set_declalign (self, "uchar" declalign)
 set_declalign(self, declalign) -> bool
 
"bool" change_sign (self, "type_sign_t" sign)
 change_sign(self, sign) -> bool Change the type sign.
 
"bool" calc_udt_aligns (self, "int" sudt_flags=0x0004)
 calc_udt_aligns(self, sudt_flags=0x0004) -> bool Calculate the udt alignments using the field offsets/sizes and the total udt size This function does not work on typerefs
 
"bool" set_methods (self, "udtmembervec_t" methods)
 set_methods(self, methods) -> bool
 
"tinfo_code_t" set_type_cmt (self, "char const *" cmt, "bool" is_regcmt=False, "uint" etf_flags=0)
 set_type_cmt(self, cmt, is_regcmt=False, etf_flags=0) -> tinfo_code_t Set type comment This function works only for non-trivial types
 
"uint32" get_alias_target (self)
 get_alias_target(self) -> uint32 Get type alias If the type has no alias, return 0.
 
"bool" is_aliased (self)
 is_aliased(self) -> bool
 
"bool" set_type_alias (self, "uint32" dest_ord)
 set_type_alias(self, dest_ord) -> bool Set type alias Redirects all references to source type to the destination type.
 
"tinfo_code_t" set_udt_alignment (self, "int" sda, "uint" etf_flags=0)
 set_udt_alignment(self, sda, etf_flags=0) -> tinfo_code_t Set declared structure alignment (sda) This alignment supersedes the alignment returned by get_declalign() and is really used when calculating the struct layout.
 
"tinfo_code_t" set_udt_pack (self, "int" pack, "uint" etf_flags=0)
 set_udt_pack(self, pack, etf_flags=0) -> tinfo_code_t Set structure packing.
 
"tid_t" get_udm_tid (self, "size_t" idx)
 get_udm_tid(self, idx) -> tid_t Get udt member TID
 
"tinfo_code_t" add_udm (self, *args)
 Add a member to the current structure/union.
 
"tinfo_code_t" del_udm (self, "size_t" index, "uint" etf_flags=0)
 del_udm(self, index, etf_flags=0) -> tinfo_code_t Delete a structure/union member.
 
"tinfo_code_t" del_udms (self, "size_t" idx1, "size_t" idx2, "uint" etf_flags=0)
 del_udms(self, idx1, idx2, etf_flags=0) -> tinfo_code_t Delete structure/union members in the range [idx1, idx2)
 
"tinfo_code_t" rename_udm (self, "size_t" index, "char const *" name, "uint" etf_flags=0)
 rename_udm(self, index, name, etf_flags=0) -> tinfo_code_t Rename a structure/union member.
 
"tinfo_code_t" set_udm_type (self, "size_t" index, "tinfo_t" tif, "uint" etf_flags=0, "value_repr_t" repr=None)
 set_udm_type(self, index, tif, etf_flags=0, repr=None) -> tinfo_code_t Set type of a structure/union member.
 
"tinfo_code_t" set_udm_cmt (self, "size_t" index, "char const *" cmt, "bool" is_regcmt=False, "uint" etf_flags=0)
 set_udm_cmt(self, index, cmt, is_regcmt=False, etf_flags=0) -> tinfo_code_t Set a comment for a structure/union member.
 
"tinfo_code_t" set_udm_repr (self, "size_t" index, "value_repr_t" repr, "uint" etf_flags=0)
 set_udm_repr(self, index, repr, etf_flags=0) -> tinfo_code_t Set the representation of a structure/union member.
 
"bool" is_udm_by_til (self, "size_t" idx)
 is_udm_by_til(self, idx) -> bool Was the member created due to the type system
 
"tinfo_code_t" set_udm_by_til (self, "size_t" idx, "bool" on=True, "uint" etf_flags=0)
 set_udm_by_til(self, idx, on=True, etf_flags=0) -> tinfo_code_t The member is created due to the type system
 
"tinfo_code_t" set_fixed_struct (self, "bool" on=True)
 set_fixed_struct(self, on=True) -> tinfo_code_t Declare struct member offsets as fixed.
 
"tinfo_code_t" set_struct_size (self, "size_t" new_size)
 set_struct_size(self, new_size) -> tinfo_code_t Explicitly specify the struct size.
 
"bool" is_fixed_struct (self)
 is_fixed_struct(self) -> bool Is a structure with fixed offsets?
 
"tinfo_code_t" expand_udt (self, "size_t" idx, "adiff_t" delta, "uint" etf_flags=0)
 expand_udt(self, idx, delta, etf_flags=0) -> tinfo_code_t Expand/shrink a structure by adding/removing a gap before the specified member.
 
"bool" get_func_frame (self, "func_t const *" pfn)
 get_func_frame(self, pfn) -> bool Create a tinfo_t object for the function frame
 
"bool" is_frame (self)
 is_frame(self) -> bool Is a function frame?
 
"ea_t" get_frame_func (self)
 get_frame_func(self) -> ea_t Get function address for the frame.
 
"tinfo_code_t" set_enum_width (self, "int" nbytes, "uint" etf_flags=0)
 set_enum_width(self, nbytes, etf_flags=0) -> tinfo_code_t Set the width of enum base type
 
"tinfo_code_t" set_enum_sign (self, "type_sign_t" sign, "uint" etf_flags=0)
 set_enum_sign(self, sign, etf_flags=0) -> tinfo_code_t Set enum sign
 
"tinfo_code_t" set_enum_is_bitmask (self, *args)
 set_enum_is_bitmask(self, stance=ENUMBM_ON, etf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" set_enum_repr (self, "value_repr_t" repr, "uint" etf_flags=0)
 set_enum_repr(self, repr, etf_flags=0) -> tinfo_code_t Set the representation of enum members.
 
"tinfo_code_t" set_enum_radix (self, "int" radix, "bool" sign, "uint" etf_flags=0)
 set_enum_radix(self, radix, sign, etf_flags=0) -> tinfo_code_t Set enum radix to display constants
 
"tinfo_code_t" add_edm (self, *args)
 Add an enumerator to the current enumeration.
 
"tinfo_code_t" del_edms (self, "size_t" idx1, "size_t" idx2, "uint" etf_flags=0)
 del_edms(self, idx1, idx2, etf_flags=0) -> tinfo_code_t Delete enum members
 
"tinfo_code_t" del_edm (self, *args)
 Delete an enumerator with the specified name or the specified index, in the specified tinfo_t object.
 
"tinfo_code_t" del_edm_by_value (self, *args)
 Delete an enumerator with the specified value, in the specified tinfo_t object.
 
"tinfo_code_t" rename_edm (self, "size_t" idx, "char const *" name, "uint" etf_flags=0)
 rename_edm(self, idx, name, etf_flags=0) -> tinfo_code_t Rename a enum member
 
"tinfo_code_t" set_edm_cmt (self, "size_t" idx, "char const *" cmt, "uint" etf_flags=0)
 set_edm_cmt(self, idx, cmt, etf_flags=0) -> tinfo_code_t Set a comment for an enum member.
 
"tinfo_code_t" edit_edm (self, *args)
 edit_edm(self, idx, value, bmask=bmask64_t(-1), etf_flags=0) -> tinfo_code_t Change constant value and/or bitmask
 
"tinfo_code_t" rename_funcarg (self, "size_t" index, "char const *" name, "uint" etf_flags=0)
 rename_funcarg(self, index, name, etf_flags=0) -> tinfo_code_t Rename a function argument.
 
"tinfo_code_t" set_funcarg_type (self, "size_t" index, "tinfo_t" tif, "uint" etf_flags=0)
 set_funcarg_type(self, index, tif, etf_flags=0) -> tinfo_code_t Set type of a function argument.
 
"tinfo_code_t" set_func_rettype (self, "tinfo_t" tif, "uint" etf_flags=0)
 set_func_rettype(self, tif, etf_flags=0) -> tinfo_code_t Set function return type .
 
"tinfo_code_t" del_funcargs (self, "size_t" idx1, "size_t" idx2, "uint" etf_flags=0)
 del_funcargs(self, idx1, idx2, etf_flags=0) -> tinfo_code_t Delete function arguments
 
"tinfo_code_t" del_funcarg (self, "size_t" idx, "uint" etf_flags=0)
 del_funcarg(self, idx, etf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" add_funcarg (self, "funcarg_t" farg, "uint" etf_flags=0, "ssize_t" idx=-1)
 add_funcarg(self, farg, etf_flags=0, idx=-1) -> tinfo_code_t Add a function argument.
 
"tinfo_code_t" set_func_cc (self, "cm_t" cc, "uint" etf_flags=0)
 set_func_cc(self, cc, etf_flags=0) -> tinfo_code_t Set function calling convention.
 
"tinfo_code_t" set_funcarg_loc (self, "size_t" index, "argloc_t" argloc, "uint" etf_flags=0)
 set_funcarg_loc(self, index, argloc, etf_flags=0) -> tinfo_code_t Set location of a function argument.
 
"tinfo_code_t" set_func_retloc (self, "argloc_t" argloc, "uint" etf_flags=0)
 set_func_retloc(self, argloc, etf_flags=0) -> tinfo_code_t Set location of function return value.
 
"bool" __eq__ (self, "tinfo_t" r)
 eq(self, r) -> bool
 
"bool" __ne__ (self, "tinfo_t" r)
 ne(self, r) -> bool
 
"bool" __lt__ (self, "tinfo_t" r)
 lt(self, r) -> bool
 
"bool" __gt__ (self, "tinfo_t" r)
 gt(self, r) -> bool
 
"bool" __le__ (self, "tinfo_t" r)
 le(self, r) -> bool
 
"bool" __ge__ (self, "tinfo_t" r)
 ge(self, r) -> bool
 
"int" compare (self, "tinfo_t" r)
 compare(self, r) -> int
 
"bool" compare_with (self, "tinfo_t" r, "int" tcflags=0)
 compare_with(self, r, tcflags=0) -> bool Compare two types, based on given flags (see tinfo_t comparison flags)
 
"bool" equals_to (self, "tinfo_t" r)
 equals_to(self, r) -> bool
 
"bool" is_castable_to (self, "tinfo_t" target)
 is_castable_to(self, target) -> bool
 
"bool" is_manually_castable_to (self, "tinfo_t" target)
 is_manually_castable_to(self, target) -> bool
 
"PyObject *" serialize (self, *args)
 serialize(self, sudt_flags=SUDT_FAST|SUDT_TRUNC) -> PyObject Serialize tinfo_t object into a type string.
 
"bool" deserialize (self, *args)
 deserialize(self, til, ptype, pfields=None, pfldcmts=None, cmt=None) -> bool Deserialize a type string into a tinfo_t object.
 
"ssize_t" get_stkvar (self, "insn_t const &" insn, "op_t const" x, "sval_t" v)
 get_stkvar(self, insn, x, v) -> ssize_t Retrieve frame tinfo for a stack variable
 
"tinfo_t" copy (self)
 copy(self) -> tinfo_t
 
"qstring" __str__ (self)
 str(self) -> qstring
 
"PyObject *" get_attr (self, "qstring const &" key, "bool" all_attrs=True)
 get_attr(self, key, all_attrs=True) -> PyObject Get a type attribute.
 
"int" get_edm (self, *args)
 Retrieve an enumerator with either the specified name or the specified index, in the specified tinfo_t object.
 
"ssize_t" find_edm (self, *args)
 find_edm(self, edm, value, bmask=DEFMASK64, serial=0) -> ssize_t
 
 __repr__ (self)
 
 iter_struct (self)
 Iterate on the members composing this structure.
 
 iter_union (self)
 Iterate on the members composing this union.
 
 iter_udt (self)
 Iterate on the members composing this structure, or union.
 
 iter_enum (self)
 Iterate on the members composing this enumeration.
 
 iter_func (self)
 Iterate on the arguments contained in this function prototype.
 

Static Public Member Functions

"tinfo_t" get_stock ("stock_type_id_t" id)
 get_stock(id) -> tinfo_t Get stock type information.
 

Static Public Attributes

 ENUMBM_OFF = _ida_typeinf.tinfo_t_ENUMBM_OFF
 
 ENUMBM_ON = _ida_typeinf.tinfo_t_ENUMBM_ON
 
 ENUMBM_AUTO = _ida_typeinf.tinfo_t_ENUMBM_AUTO
 
"ssize_t" get_edm_by_name = get_by_edm_name
 

Protected Member Functions

"bool" _print (self, "char const *" name=None, "int" prtype_flags=0, "int" indent=0, "int" cmtindent=0, "char const *" prefix=None, "char const *" cmt=None)
 _print(self, name=None, prtype_flags=0, indent=0, cmtindent=0, prefix=None, cmt=None) -> bool
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
ordinal = None,
name = None,
til = None )

This constructor has the following signatures:

  • tinfo_t(decl_type: type_t)
  • tinfo_t(decl: str, til: til_t = None, pt_flags: int = 0)

The latter form will create the type object by parsing the type declaration

Alternatively, you can use a form accepting the following keyword arguments:

E.g.,

The constructor may raise an exception if data was invalid/parsing failed.

Parameters
decl_typeA simple type
declA valid C declaration
tilA type library, or None to use the (get_idati()) default
ordinalAn ordinal in the type library
nameA valid type name
pt_flagsParsing flags

Member Function Documentation

◆ __eq__()

"bool" __eq__ ( self,
"tinfo_t" r )
Parameters
rtinfo_t const &

◆ __ge__()

"bool" __ge__ ( self,
"tinfo_t" r )
Parameters
rtinfo_t const &

◆ __gt__()

"bool" __gt__ ( self,
"tinfo_t" r )
Parameters
rtinfo_t const &

◆ __le__()

"bool" __le__ ( self,
"tinfo_t" r )
Parameters
rtinfo_t const &

◆ __lt__()

"bool" __lt__ ( self,
"tinfo_t" r )
Parameters
rtinfo_t const &

◆ __ne__()

"bool" __ne__ ( self,
"tinfo_t" r )
Parameters
rtinfo_t const &

◆ __repr__()

__repr__ ( self)

◆ __str__()

"qstring" __str__ ( self)

◆ _print()

"bool" _print ( self,
"char const *" name = None,
"int" prtype_flags = 0,
"int" indent = 0,
"int" cmtindent = 0,
"char const *" prefix = None,
"char const *" cmt = None )
protected

Parameters

name: char const * prtype_flags: int indent: int cmtindent: int prefix: char const * cmt: char const *

◆ add_edm()

"tinfo_code_t" add_edm ( self,
* args )

When creating a new enumeration from scratch, you might want to first call create_enum()

This method has the following signatures:

  • add_edm(edm: edm_t, bmask: int = -1, etf_flags: int = 0, idx: int = -1)
  • add_edm(name: str, value: int, bmask: int = -1, etf_flags: int = 0, idx: int = -1)

If an input argument is incorrect, the constructor may raise an exception

Parameters
edmThe member, fully initialized (first form)
nameEnumerator name - must not be empty
valueEnumerator value
bmaskA bitmask to which the enumerator belongs
etf_flagsan OR'ed combination of ETF_ flags
idxthe index in the edm array where the new udm should be placed. If the specified index cannot be honored because it would spoil the edm sorting order, it is silently ignored.

◆ add_funcarg()

"tinfo_code_t" add_funcarg ( self,
"funcarg_t" farg,
"uint" etf_flags = 0,
"ssize_t" idx = -1 )
Parameters
farg(C++: const funcarg_t &) argument to add
etf_flags(C++: uint) type changing flags flags
idx(C++: ssize_t) the index in the funcarg array where the new funcarg should be placed. if the specified index cannot be honored because it would spoil the funcarg sorting order, it is silently ignored.
Note
: ETF_NO_SAVE is ignored

◆ add_udm()

"tinfo_code_t" add_udm ( self,
* args )

When creating a new structure/union from scratch, you might want to first call create_udt()

This method has the following signatures:

  • add_udm(udm: udm_t, etf_flags: int = 0, times: int = 1, idx: int = -1)
  • add_udm(name: str, type: type_t | tinfo_t | str, offset: int = 0, etf_flags: int = 0, times: int = 1, idx: int = -1)

In the second form, the 'type' descriptor, can be one of:

  • type_t: if the type is simple (integral/floating/bool). E.g., BTF_INT
  • tinfo_t: can handle more complex types (structures, pointers, arrays, ...)
  • str: a C type declaration

If an input argument is incorrect, the constructor may raise an exception

Parameters
udmThe member, fully initialized (first form)
nameMember name - must not be empty
typeMember type
offsetthe member offset in bits. It is the caller's responsibility to specify correct offsets.
etf_flagsan OR'ed combination of ETF_ flags
timeshow many times to add the new member
idxthe index in the udm array where the new udm should be placed. If the specified index cannot be honored because it would spoil the udm sorting order, it is silently ignored.

◆ append_covered()

"bool" append_covered ( self,
"rangeset_t" out,
"uint64" offset = 0 )
Parameters
out(C++: rangeset_t *) pointer to the output buffer. covered bytes will be appended to it.
offset(C++: uint64) delta in bytes to add to all calculations. used internally during recurion.

◆ calc_enum_mask()

"uint64" calc_enum_mask ( self)

◆ calc_gaps()

"bool" calc_gaps ( self,
"rangeset_t" out )
Parameters
out(C++: rangeset_t *) pointer to the output buffer; old buffer contents will be lost.

◆ calc_purged_bytes()

"int" calc_purged_bytes ( self)

◆ calc_score()

"uint32" calc_score ( self)

◆ calc_udt_aligns()

"bool" calc_udt_aligns ( self,
"int" sudt_flags = 0x0004 )
Parameters
sudt_flags(C++: int)

◆ change_sign()

"bool" change_sign ( self,
"type_sign_t" sign )

Works only for the types that may have sign.

Parameters
sign(C++: type_sign_t)

◆ clear()

"void" clear ( self)

◆ clr_const()

"bool" clr_const ( self)

◆ clr_const_volatile()

"bool" clr_const_volatile ( self)

◆ clr_decl_const_volatile()

"void" clr_decl_const_volatile ( self)

◆ clr_volatile()

"bool" clr_volatile ( self)

◆ compare()

"int" compare ( self,
"tinfo_t" r )
Parameters
rtinfo_t const &

◆ compare_with()

"bool" compare_with ( self,
"tinfo_t" r,
"int" tcflags = 0 )
Parameters
r(C++: const tinfo_t &) tinfo_t const &
tcflags(C++: int)

◆ convert_array_to_ptr()

"bool" convert_array_to_ptr ( self)

type[] => type *

◆ copy()

"tinfo_t" copy ( self)

◆ copy_type()

"tinfo_code_t" copy_type ( self,
* args )
Parameters
tiltil_t *
namechar const *
ntf_flagsint

◆ create_array()

"bool" create_array ( self,
* args )
Parameters
parray_type_data_t const &
decl_typetype_t

create_array(self, tif, nelems=0, base=0, decl_type=BT_ARRAY) -> bool

Parameters
tiftinfo_t const &
nelemsuint32
baseuint32
decl_typetype_t

◆ create_bitfield()

"bool" create_bitfield ( self,
* args )
Parameters
pbitfield_type_data_t const &
decl_typetype_t

create_bitfield(self, nbytes, width, is_unsigned=False, decl_type=BT_BITFIELD) -> bool

Parameters
nbytesuchar
widthuchar
is_unsignedbool
decl_typetype_t

◆ create_enum()

"bool" create_enum ( self,
* args )
Parameters
bte(C++: bte_t)

create_enum(self, p, decl_type=BTF_ENUM) -> bool

Parameters
penum_type_data_t &
decl_typetype_t

◆ create_forward_decl()

"tinfo_code_t" create_forward_decl ( self,
"til_t" til,
"type_t" decl_type,
"char const *" name,
"int" ntf_flags = 0 )

decl_type: BTF_STRUCT, BTF_UNION, or BTF_ENUM

Parameters
til(C++: til_t *)
decl_type(C++: type_t)
name(C++: const char *) char const *
ntf_flags(C++: int)

◆ create_func()

"bool" create_func ( self,
* args )
Parameters
pfunc_type_data_t &
decl_typetype_t

◆ create_ptr()

"bool" create_ptr ( self,
* args )
Parameters
pptr_type_data_t const &
decl_typetype_t

create_ptr(self, tif, bps=0, decl_type=BT_PTR) -> bool

Parameters
tiftinfo_t const &
bpsuchar
decl_typetype_t

◆ create_simple_type()

"bool" create_simple_type ( self,
"type_t" decl_type )
Parameters
decl_typetype_t

◆ create_typedef()

"void" create_typedef ( self,
* args )
Parameters
ptypedef_type_data_t const &
decl_typetype_t
try_ordinalbool

create_typedef(self, til, name, decl_type=BTF_TYPEDEF, try_ordinal=True)

Parameters
tiltil_t const *
namechar const *
decl_typetype_t
try_ordinalbool

create_typedef(self, til, ord, decl_type=BTF_TYPEDEF)

Parameters
tiltil_t const *
orduint
decl_typetype_t

◆ create_udt()

"bool" create_udt ( self,
* args )
Parameters
is_union(C++: bool)

create_udt(self, p) -> bool

Parameters
pudt_type_data_t &

create_udt(self, p, decl_type) -> bool

Parameters
pudt_type_data_t &
decl_typetype_t

◆ del_attr()

"bool" del_attr ( self,
"qstring const &" key,
"bool" make_copy = True )

typerefs cannot be modified by this function.

Parameters
key(C++: const qstring &) qstring const &
make_copy(C++: bool)

◆ del_attrs()

"void" del_attrs ( self)

typerefs cannot be modified by this function.

◆ del_edm()

"tinfo_code_t" del_edm ( self,
* args )
Parameters
dataeither an enumerator name, or index
Returns
: TERR_OK in case of success, or another TERR_* value in case of error

◆ del_edm_by_value()

"tinfo_code_t" del_edm_by_value ( self,
* args )
Parameters
valuethe enumerator value
Returns
: TERR_OK in case of success, or another TERR_* value in case of error

◆ del_edms()

"tinfo_code_t" del_edms ( self,
"size_t" idx1,
"size_t" idx2,
"uint" etf_flags = 0 )
Parameters
idx1(C++: size_t) index in edmvec_t
idx2(C++: size_t) index in edmvec_t or size_t(-1)
etf_flags(C++: uint) etf_flag_t Delete enum members in [idx1, idx2)
Note
: For bitmask enum, the first member of a non-trivial group (having 2 or more members) is considered as a group mask. It is impossible to delete the group mask of a non-trivial group, other members of the group must be deleted first. Empty groups are automatically deleted.

◆ del_funcarg()

"tinfo_code_t" del_funcarg ( self,
"size_t" idx,
"uint" etf_flags = 0 )
Parameters
idxsize_t
etf_flagsuint

◆ del_funcargs()

"tinfo_code_t" del_funcargs ( self,
"size_t" idx1,
"size_t" idx2,
"uint" etf_flags = 0 )
Parameters
idx1(C++: size_t) index in funcargvec_t
idx2(C++: size_t) index in funcargvec_t or size_t(-1)
etf_flags(C++: uint) etf_flag_t Delete function arguments in [idx1, idx2)

◆ del_udm()

"tinfo_code_t" del_udm ( self,
"size_t" index,
"uint" etf_flags = 0 )
Parameters
index(C++: size_t)
etf_flags(C++: uint)

◆ del_udms()

"tinfo_code_t" del_udms ( self,
"size_t" idx1,
"size_t" idx2,
"uint" etf_flags = 0 )
Parameters
idx1(C++: size_t)
idx2(C++: size_t)
etf_flags(C++: uint)

◆ deserialize()

"bool" deserialize ( self,
* args )
Parameters
til(C++: const til_t *) til_t const *
ptype(C++: const qtype *) type_t const **
pfields(C++: const qtype *) p_list const **
pfldcmts(C++: const qtype *) p_list const **
cmt(C++: const char *) char const *

deserialize(self, til, type, fields, cmts=None) -> bool

Parameters
tiltil_t const *
typetype_t const *
fieldsp_list const *
cmtsp_list const *

◆ detach()

"bool" detach ( self)

After calling this finction, tinfo_t will lose its link to the underlying named or numbered type (if any) and will become a reference to a unique type. After that, any modifications to tinfo_t will affect only its type.

◆ dstr()

"char const *" dstr ( self)

◆ edit_edm()

"tinfo_code_t" edit_edm ( self,
* args )
Parameters
idx(C++: size_t) index in edmvec_t
value(C++: uint64) old or new value
bmask(C++: bmask64_t) old or new bitmask
Note
: if new bitmask is specified the index of constant may be changed

◆ empty()

"bool" empty ( self)

◆ equals_to()

"bool" equals_to ( self,
"tinfo_t" r )
Parameters
rtinfo_t const &

◆ expand_udt()

"tinfo_code_t" expand_udt ( self,
"size_t" idx,
"adiff_t" delta,
"uint" etf_flags = 0 )

For regular structures, either the gap can be accommodated by aligning the next member with an alignment directive, or an explicit "gap" member will be inserted. Also note that it is impossible to add a gap at the end of a regular structure.

When it comes to fixed-layout structures, there is no need to either add new "gap" members or align existing members, since all members have a fixed offset. It is possible to add a gap at the end of a fixed-layout structure, by passing -1 as index.

Parameters
idx(C++: size_t) index of the member
delta(C++: adiff_t) number of bytes to add or remove
etf_flags(C++: uint) etf_flag_t
Note
: This function can be used to remove gaps in the middle of a structure by specifying a negative delta value.

◆ find_edm()

"ssize_t" find_edm ( self,
* args )
Parameters
edmedm_t *
valueuint64
bmaskbmask64_t
serialuchar

find_edm(self, edm, name) -> ssize_t

Parameters
edmedm_t *
namechar const *

◆ find_udm()

"int" find_udm ( self,
* args )
Parameters
udmudm_t *
strmem_flags(C++: int)
Returns
: the index of the found member or -1 find_udm(self, offset, strmem_flags=0) -> int
Parameters
offsetuint64
strmem_flagsint

find_udm(self, name, strmem_flags=0) -> int

Parameters
namechar const *
strmem_flagsint

◆ force_tid()

"tid_t" force_tid ( self)

Create if it does not exist yet. If the type comes from a base til, the type will be copied to the local til and a new tid will be created for it. (if the type comes from a base til, it does not have a tid yet). If the type comes from the local til, this function is equivalent to get_tid()

Returns
: tid or BADADDR

◆ get_alias_target()

"uint32" get_alias_target ( self)

◆ get_array_details()

"bool" get_array_details ( self,
"array_type_data_t" ai )
Parameters
ai(C++: array_type_data_t *)

◆ get_array_element()

"tinfo_t" get_array_element ( self)

◆ get_array_nelems()

"int" get_array_nelems ( self)

◆ get_attr()

"PyObject *" get_attr ( self,
"qstring const &" key,
"bool" all_attrs = True )
Parameters
key(C++: const qstring &) qstring const &
all_attrs(C++: bool)

◆ get_attrs()

"bool" get_attrs ( self,
"type_attrs_t" tav,
"bool" all_attrs = False )
Parameters
tav(C++: type_attrs_t *)
all_attrs(C++: bool)

◆ get_bit_buckets()

"bool" get_bit_buckets ( self,
"range64vec_t" buckets )
Parameters
buckets(C++: range64vec_t *)
Returns
: false if wrong type was passed

◆ get_bitfield_details()

"bool" get_bitfield_details ( self,
"bitfield_type_data_t" bi )
Parameters
bi(C++: bitfield_type_data_t *)

◆ get_by_edm_name()

"ssize_t" get_by_edm_name ( self,
"char const *" mname,
"til_t" til = None )
Parameters
mname(C++: const char *) enum type member name
til(C++: const til_t *) type library
Returns
: member index, otherwise returns -1. If the function fails, THIS object becomes empty.

◆ get_declalign()

"uchar" get_declalign ( self)

◆ get_decltype()

"type_t" get_decltype ( self)

Obviously this is a very fast function and should be used instead of get_realtype() if possible. Please note that for typerefs this function will return BTF_TYPEDEF. To determine if a typeref is a typedef, use is_typedef()

◆ get_edm()

"int" get_edm ( self,
* args )
Parameters
dataeither an enumerator name, or index
Returns
: a tuple (int, edm_t), or (-1, None) if member not found

◆ get_edm_by_tid()

"ssize_t" get_edm_by_tid ( self,
"edm_t" edm,
"tid_t" tid )
Parameters
edmedm_t *
tidtid_t

◆ get_edm_by_value()

"ssize_t" get_edm_by_value ( self,
* args )
Parameters
valuethe enumerator value
Returns
: a tuple (int, edm_t), or (-1, None) if member not found

◆ get_edm_tid()

"tid_t" get_edm_tid ( self,
"size_t" idx )
Parameters
idx(C++: size_t) enum member index
Returns
: tid or BADADDR The tid is used to collect xrefs to the member, it can be passed to xref-related functions instead of the address.

◆ get_enum_base_type()

"type_t" get_enum_base_type ( self)

◆ get_enum_details()

"bool" get_enum_details ( self,
"enum_type_data_t" ei )
Parameters
ei(C++: enum_type_data_t *)

◆ get_enum_nmembers()

"size_t" get_enum_nmembers ( self)
Returns
: BADSIZE if error

◆ get_enum_radix()

"int" get_enum_radix ( self)
Returns
: radix or 1 for BTE_CHAR enum_type_data_t.get_enum_radix()

◆ get_enum_repr()

"tinfo_code_t" get_enum_repr ( self,
"value_repr_t" repr )
Parameters
repr(C++: value_repr_t *) value_repr_t

◆ get_enum_width()

"int" get_enum_width ( self)
Returns
: width of enum base type in bytes, 0 - unspecified, or -1 enum_type_data_t.calc_nbytes()

◆ get_final_element()

"tinfo_t" get_final_element ( self)

◆ get_final_ordinal()

"uint32" get_final_ordinal ( self)

◆ get_final_type_name()

"bool" get_final_type_name ( self)
Returns
: the name of the last type in the chain (TYPEn). if there is no chain, returns TYPE1

◆ get_forward_type()

"type_t" get_forward_type ( self)

For a forward declaration this function returns its base type. In other cases it returns BT_UNK

◆ get_frame_func()

"ea_t" get_frame_func ( self)

◆ get_func_details()

"bool" get_func_details ( self,
"func_type_data_t" fi,
"gtd_func_t" gtd = GTD_CALC_ARGLOCS )
Parameters
fi(C++: func_type_data_t *)
gtd(C++: gtd_func_t) enum gtd_func_t

◆ get_func_frame()

"bool" get_func_frame ( self,
"func_t const *" pfn )
Parameters
pfn(C++: const func_t *) function

◆ get_innermost_member_type()

"tinfo_t" get_innermost_member_type ( self,
"uint64" bitoffset )
Parameters
bitoffset(C++: uint64) bit offset into the structure
Return values
theinnermost member type

◆ get_innermost_udm()

"tinfo_t" get_innermost_udm ( self,
"uint64" bitoffset )
Parameters
bitoffset(C++: uint64) bit offset into the structure
Return values
udtwith the innermost member
emptytype if it is not a struct type or OFFSET could not be found

◆ get_methods()

"bool" get_methods ( self,
"udtmembervec_t" methods )
Parameters
BT_COMPLEXget a list of member functions declared in this udt.
Returns
: false if no member functions exist

◆ get_modifiers()

"type_t" get_modifiers ( self)

◆ get_named_type()

"bool" get_named_type ( self,
* args )
Parameters
tiltil_t const *
namechar const *
decl_typetype_t
resolvebool
try_ordinalbool

get_named_type(self, name, decl_type=BTF_TYPEDEF, resolve=True, try_ordinal=True) -> bool

Parameters
namechar const *
decl_typetype_t
resolvebool
try_ordinalbool

◆ get_nargs()

"int" get_nargs ( self)

◆ get_next_type_name()

"bool" get_next_type_name ( self)
Returns
: the name of the next type in the chain (TYPE2). if there is no chain, returns failure

◆ get_nice_type_name()

"bool" get_nice_type_name ( self)

Get the referenced name and apply regular expressions from goodname.cfg to beautify the name

◆ get_nth_arg()

"tinfo_t" get_nth_arg ( self,
"int" n )
Parameters
n(C++: int)

◆ get_numbered_type()

"bool" get_numbered_type ( self,
* args )
Parameters
tiltil_t const *
ordinaluint32
decl_typetype_t
resolvebool

get_numbered_type(self, ordinal, decl_type=BTF_TYPEDEF, resolve=True) -> bool

Parameters
ordinaluint32
decl_typetype_t
resolvebool

◆ get_onemember_type()

"tinfo_t" get_onemember_type ( self)

◆ get_ordinal()

"uint32" get_ordinal ( self)

◆ get_pointed_object()

"tinfo_t" get_pointed_object ( self)

◆ get_ptr_details()

"bool" get_ptr_details ( self,
"ptr_type_data_t" pi )
Parameters
pi(C++: ptr_type_data_t *)

◆ get_ptrarr_object()

"tinfo_t" get_ptrarr_object ( self)

If the current type is not a pointer or array, return empty type info.

◆ get_ptrarr_objsize()

"int" get_ptrarr_objsize ( self)

On error returns -1

◆ get_realtype()

"type_t" get_realtype ( self,
"bool" full = False )

Deserialization options:

  • if full=true, the referenced type will be deserialized fully, this may not always be desirable (slows down things)
  • if full=false, we just return the base type, the referenced type will be resolved again later if necessary (this may lead to multiple resolvings of the same type) imho full=false is a better approach because it does not perform unnecessary actions just in case. however, in some cases the caller knows that it is very likely that full type info will be required. in those cases full=true makes sense
Parameters
full(C++: bool)

◆ get_rettype()

"tinfo_t" get_rettype ( self)

◆ get_sign()

"type_sign_t" get_sign ( self)

◆ get_size()

"size_t" get_size ( self,
"uint32 *" p_effalign = None,
"int" gts_code = 0 )
Parameters
p_effalign(C++: uint32 *) buffer for the alignment value
gts_code(C++: int) combination of GTS_... constants
Returns
: BADSIZE in case of problems

◆ get_stkvar()

"ssize_t" get_stkvar ( self,
"insn_t const &" insn,
"op_t const" x,
"sval_t" v )
Parameters
insn(C++: const insn_t &) the instruction
x(C++: const op_t *) reference to instruction operand, may be nullptr
v(C++: sval_t) immediate value in the operand (usually x.addr)
Returns
: returns the member index, otherwise returns -1. if the function fails, THIS object becomes empty.

◆ get_stock()

"tinfo_t" get_stock ( "stock_type_id_t" id)
static

This function can be used to get tinfo_t for some common types. The same tinfo_t will be returned for the same id, thus saving memory and increasing the speed Please note that retrieving the STI_SIZE_T or STI_SSIZE_T stock type, will also have the side-effect of adding that type to the 'idati' TIL, under the well-known name 'size_t' or 'ssize_t' (respectively). The same is valid for STI_COMPLEX64 and STI_COMPLEX64 stock types with names 'complex64_t' and 'complex128_t' (respectively).

Parameters
id(C++: stock_type_id_t) enum stock_type_id_t

◆ get_tid()

"tid_t" get_tid ( self)

The tid is used to collect xrefs to the type. The tid is created when the type is created in the local type library and does not change afterwards. It can be passed to xref-related functions instead of the address.

Returns
: tid or BADADDR
Note
: types that do not come from a type library (that exist only in the memory) can not have a tid.

◆ get_til()

"til_t *" get_til ( self)

◆ get_type_by_tid()

"bool" get_type_by_tid ( self,
"tid_t" tid )
Parameters
tidtid_t

◆ get_type_cmt()

"int" get_type_cmt ( self)
Returns
: 0-failed, 1-returned regular comment, 2-returned repeatable comment

◆ get_type_name()

"bool" get_type_name ( self)

If yes, fill the provided buffer with the type name and return true. Names are returned for numbered types too: either a user- defined nice name or, if a user-provided name does not exist, an ordinal name (like #xx, see create_numbered_type_name()).

◆ get_type_rptcmt()

"bool" get_type_rptcmt ( self)

◆ get_udm()

"int" get_udm ( self,
* args )
Parameters
dataeither a member name, or a member index
Returns
: a tuple (int, udm_t), or (-1, None) if member not found

◆ get_udm_by_offset()

"int" get_udm_by_offset ( self,
"uint64" offset )
Parameters
offsetthe member offset
Returns
: a tuple (int, udm_t), or (-1, None) if member not found

◆ get_udm_by_tid()

"ssize_t" get_udm_by_tid ( self,
"udm_t" udm,
"tid_t" tid )
Parameters
udm(C++: udm_t *) [out]: place to save the found member to, may be nullptr
tid(C++: tid_t) tid can denote a type tid or a member tid.
Returns
: if a member tid was specified, returns the member index, otherwise returns -1. if the function fails, THIS object becomes empty.

◆ get_udm_tid()

"tid_t" get_udm_tid ( self,
"size_t" idx )
Parameters
idx(C++: size_t) the index of udt the member
Returns
: tid or BADADDR The tid is used to collect xrefs to the member, it can be passed to xref-related functions instead of the address.

◆ get_udt_details()

"bool" get_udt_details ( self,
"udt_type_data_t" udt,
"gtd_udt_t" gtd = GTD_CALC_LAYOUT )
Parameters
udt(C++: udt_type_data_t *)
gtd(C++: gtd_udt_t) enum gtd_udt_t

◆ get_udt_nmembers()

"int" get_udt_nmembers ( self)

-1-error.

◆ get_unpadded_size()

"size_t" get_unpadded_size ( self)

For some UDTs get_unpadded_size() != get_size()

◆ has_details()

"bool" has_details ( self)

◆ has_union()

"bool" has_union ( self)

◆ has_vftable()

"bool" has_vftable ( self)

◆ is_aliased()

"bool" is_aliased ( self)

◆ is_anonymous_udt()

"bool" is_anonymous_udt ( self)

◆ is_arithmetic()

"bool" is_arithmetic ( self)

◆ is_array()

"bool" is_array ( self)

◆ is_bitfield()

"bool" is_bitfield ( self)

◆ is_bitmask_enum()

"bool" is_bitmask_enum ( self)
Returns
: true for bitmask enum and false in other cases enum_type_data_t.is_bf()

◆ is_bool()

"bool" is_bool ( self)

◆ is_castable_to()

"bool" is_castable_to ( self,
"tinfo_t" target )
Parameters
targettinfo_t const &

◆ is_char()

"bool" is_char ( self)

◆ is_complex()

"bool" is_complex ( self)

◆ is_const()

"bool" is_const ( self)

◆ is_correct()

"bool" is_correct ( self)

It is possible to create incorrect types. For example, we can define a function that returns an enum and then delete the enum type. If this function returns false, the type should not be used in disassembly. Please note that this function does not verify all involved types: for example, pointers to undefined types are permitted.

◆ is_decl_array()

"bool" is_decl_array ( self)

◆ is_decl_bitfield()

"bool" is_decl_bitfield ( self)

◆ is_decl_bool()

"bool" is_decl_bool ( self)

◆ is_decl_char()

"bool" is_decl_char ( self)

◆ is_decl_complex()

"bool" is_decl_complex ( self)

◆ is_decl_const()

"bool" is_decl_const ( self)

◆ is_decl_double()

"bool" is_decl_double ( self)

◆ is_decl_enum()

"bool" is_decl_enum ( self)

◆ is_decl_float()

"bool" is_decl_float ( self)

◆ is_decl_floating()

"bool" is_decl_floating ( self)

◆ is_decl_func()

"bool" is_decl_func ( self)

◆ is_decl_int()

"bool" is_decl_int ( self)

◆ is_decl_int128()

"bool" is_decl_int128 ( self)

◆ is_decl_int16()

"bool" is_decl_int16 ( self)

◆ is_decl_int32()

"bool" is_decl_int32 ( self)

◆ is_decl_int64()

"bool" is_decl_int64 ( self)

◆ is_decl_last()

"bool" is_decl_last ( self)

◆ is_decl_ldouble()

"bool" is_decl_ldouble ( self)

◆ is_decl_paf()

"bool" is_decl_paf ( self)

◆ is_decl_partial()

"bool" is_decl_partial ( self)

◆ is_decl_ptr()

"bool" is_decl_ptr ( self)

◆ is_decl_struct()

"bool" is_decl_struct ( self)

◆ is_decl_sue()

"bool" is_decl_sue ( self)

◆ is_decl_tbyte()

"bool" is_decl_tbyte ( self)

◆ is_decl_typedef()

"bool" is_decl_typedef ( self)

◆ is_decl_uchar()

"bool" is_decl_uchar ( self)

◆ is_decl_udt()

"bool" is_decl_udt ( self)

◆ is_decl_uint()

"bool" is_decl_uint ( self)

◆ is_decl_uint128()

"bool" is_decl_uint128 ( self)

◆ is_decl_uint16()

"bool" is_decl_uint16 ( self)

◆ is_decl_uint32()

"bool" is_decl_uint32 ( self)

◆ is_decl_uint64()

"bool" is_decl_uint64 ( self)

◆ is_decl_union()

"bool" is_decl_union ( self)

◆ is_decl_unknown()

"bool" is_decl_unknown ( self)

◆ is_decl_void()

"bool" is_decl_void ( self)

◆ is_decl_volatile()

"bool" is_decl_volatile ( self)

◆ is_double()

"bool" is_double ( self)

◆ is_empty_enum()

"bool" is_empty_enum ( self)

◆ is_empty_udt()

"bool" is_empty_udt ( self)

◆ is_enum()

"bool" is_enum ( self)

◆ is_ext_arithmetic()

"bool" is_ext_arithmetic ( self)

◆ is_ext_integral()

"bool" is_ext_integral ( self)

◆ is_fixed_struct()

"bool" is_fixed_struct ( self)

◆ is_float()

"bool" is_float ( self)

◆ is_floating()

"bool" is_floating ( self)

◆ is_forward_decl()

"bool" is_forward_decl ( self)

Forward declarations are placeholders: the type definition does not exist

◆ is_forward_enum()

"bool" is_forward_enum ( self)

◆ is_forward_struct()

"bool" is_forward_struct ( self)

◆ is_forward_union()

"bool" is_forward_union ( self)

◆ is_frame()

"bool" is_frame ( self)

◆ is_from_subtil()

"bool" is_from_subtil ( self)

If yes, it usually means that the type comes from some loaded type library, not the local type library for the database

◆ is_func()

"bool" is_func ( self)

◆ is_funcptr()

"bool" is_funcptr ( self)

◆ is_high_func()

"bool" is_high_func ( self)

◆ is_int()

"bool" is_int ( self)

◆ is_int128()

"bool" is_int128 ( self)

◆ is_int16()

"bool" is_int16 ( self)

◆ is_int32()

"bool" is_int32 ( self)

◆ is_int64()

"bool" is_int64 ( self)

◆ is_integral()

"bool" is_integral ( self)

◆ is_ldouble()

"bool" is_ldouble ( self)

◆ is_manually_castable_to()

"bool" is_manually_castable_to ( self,
"tinfo_t" target )
Parameters
targettinfo_t const &

◆ is_one_fpval()

"bool" is_one_fpval ( self)

◆ is_paf()

"bool" is_paf ( self)

◆ is_partial()

"bool" is_partial ( self)

◆ is_ptr()

"bool" is_ptr ( self)

◆ is_ptr_or_array()

"bool" is_ptr_or_array ( self)

◆ is_punknown()

"bool" is_punknown ( self)

This function does not check the pointer attributes and type modifiers.

◆ is_purging_cc()

"bool" is_purging_cc ( self)

◆ is_pvoid()

"bool" is_pvoid ( self)

This function does not check the pointer attributes and type modifiers.

◆ is_scalar()

"bool" is_scalar ( self)

◆ is_shifted_ptr()

"bool" is_shifted_ptr ( self)

◆ is_signed()

"bool" is_signed ( self)

◆ is_small_udt()

"bool" is_small_udt ( self)

◆ is_sse_type()

"bool" is_sse_type ( self)

◆ is_struct()

"bool" is_struct ( self)

◆ is_sue()

"bool" is_sue ( self)

◆ is_tbyte()

"bool" is_tbyte ( self)

◆ is_typedef()

"bool" is_typedef ( self)

This function will return true for a reference to a local type that is declared as a typedef.

◆ is_typeref()

"bool" is_typeref ( self)

◆ is_uchar()

"bool" is_uchar ( self)

◆ is_udm_by_til()

"bool" is_udm_by_til ( self,
"size_t" idx )
Parameters
idx(C++: size_t) index of the member

◆ is_udt()

"bool" is_udt ( self)

◆ is_uint()

"bool" is_uint ( self)

◆ is_uint128()

"bool" is_uint128 ( self)

◆ is_uint16()

"bool" is_uint16 ( self)

◆ is_uint32()

"bool" is_uint32 ( self)

◆ is_uint64()

"bool" is_uint64 ( self)

◆ is_union()

"bool" is_union ( self)

◆ is_unknown()

"bool" is_unknown ( self)

◆ is_unsigned()

"bool" is_unsigned ( self)

◆ is_user_cc()

"bool" is_user_cc ( self)

◆ is_vararg_cc()

"bool" is_vararg_cc ( self)

◆ is_varmember()

"bool" is_varmember ( self)

◆ is_varstruct()

"bool" is_varstruct ( self)

◆ is_vftable()

"bool" is_vftable ( self)

◆ is_void()

"bool" is_void ( self)

◆ is_volatile()

"bool" is_volatile ( self)

◆ is_well_defined()

"bool" is_well_defined ( self)

◆ iter_enum()

iter_enum ( self)

Example:

til = ida_typeinf.get_idati() tif = til.get_named_type("my_enum") for edm in tif.iter_enum(): print(f"{edm.name} = {edm.value}")

Will raise an exception if this type is not an enumeration

Returns
: a edm_t-producing generator

◆ iter_func()

iter_func ( self)

Example:

address = ... func = ida_funcs.get_func(address) func_type = func.prototype for arg in func_type.iter_func(): print(f"{arg.name}, of type {arg.type}")

Will raise an exception if this type is not a function

Returns
: a funcarg_t-producing generator

◆ iter_struct()

iter_struct ( self)

Example:

til = ida_typeinf.get_idati() tif = til.get_named_type("my_struc") for udm in tif.iter_struct(): print(f"{udm.name} at bit offset {udm.offset}")

Will raise an exception if this type is not a structure.

Returns
: a udm_t-producing generator

◆ iter_udt()

iter_udt ( self)

Example:

til = ida_typeinf.get_idati() tif = til.get_named_type("my_type") for udm in tif.iter_udt(): print(f"{udm.name} at bit offset {udm.offset} with type {udm.type}")

Will raise an exception if this type is not a structure, or union

Returns
: a udm_t-producing generator

◆ iter_union()

iter_union ( self)

Example:

til = ida_typeinf.get_idati() tif = til.get_named_type("my_union") for udm in tif.iter_union(): print(f"{udm.name}, with type {udm.type}")

Will raise an exception if this type is not a union.

Returns
: a udm_t-producing generator

◆ parse()

"bool" parse ( self,
"char const *" decl,
"til_t" til = None,
"int" pt_flags = 0 )
Parameters
decl(C++: const char *) a type declaration
til(C++: til_t *) type library to use
pt_flags(C++: int) combination of Type parsing flags bits

◆ present()

"bool" present ( self)

◆ read_bitfield_value()

"uint64" read_bitfield_value ( self,
"uint64" v,
"int" bitoff )
Parameters
vuint64
bitoffint

◆ remove_ptr_or_array()

"bool" remove_ptr_or_array ( self)

This function performs one of the following conversions:

  • type[] => type
  • type* => type If the conversion is performed successfully, return true

◆ rename_edm()

"tinfo_code_t" rename_edm ( self,
"size_t" idx,
"char const *" name,
"uint" etf_flags = 0 )
Parameters
idx(C++: size_t) index in edmvec_t
name(C++: const char *) new name
etf_flags(C++: uint) etf_flag_t ETF_FORCENAME may be used in case of TERR_ALIEN_NAME
Note
: ETF_NO_SAVE is ignored

◆ rename_funcarg()

"tinfo_code_t" rename_funcarg ( self,
"size_t" index,
"char const *" name,
"uint" etf_flags = 0 )

The new name must be unique.

Parameters
index(C++: size_t) argument index in the function array
name(C++: const char *) new name
etf_flags(C++: uint) etf_flag_t
Note
: ETF_NO_SAVE is ignored

◆ rename_type()

"tinfo_code_t" rename_type ( self,
"char const *" name,
"int" ntf_flags = 0 )
Parameters
name(C++: const char *) new type name
ntf_flags(C++: int) Flags for named types
Note
: The change is saved immediately

◆ rename_udm()

"tinfo_code_t" rename_udm ( self,
"size_t" index,
"char const *" name,
"uint" etf_flags = 0 )

The new name must be unique.

Note
: ETF_NO_SAVE is ignored
Parameters
index(C++: size_t)
name(C++: const char *) char const *
etf_flags(C++: uint)

◆ requires_qualifier()

"bool" requires_qualifier ( self,
"char const *" name,
"uint64" offset )
Parameters
name(C++: const char *) field name
offset(C++: uint64) field offset in bits
Returns
: if the name is not unique, returns true

◆ save_type()

"tinfo_code_t" save_type ( self,
* args )
Parameters
ntf_flagsint

◆ serialize()

"PyObject *" serialize ( self,
* args )
Parameters
sudt_flags(C++: int)

◆ set_attr()

"bool" set_attr ( self,
"type_attr_t" ta,
"bool" may_overwrite = True )

If necessary, a new typid will be created.

Parameters
ta(C++: const type_attr_t &) type_attr_t const &
may_overwrite(C++: bool)

◆ set_attrs()

"bool" set_attrs ( self,
"type_attrs_t" tav )

If necessary, a new typid will be created. this function modifies tav! (returns old attributes, if any)

Parameters
tav(C++: type_attrs_t *)
Returns
: false: bad attributes

◆ set_const()

"void" set_const ( self)

◆ set_declalign()

"bool" set_declalign ( self,
"uchar" declalign )
Parameters
declalignuchar

◆ set_edm_cmt()

"tinfo_code_t" set_edm_cmt ( self,
"size_t" idx,
"char const *" cmt,
"uint" etf_flags = 0 )

Such comments are always considered as repeatable.

Parameters
idx(C++: size_t) index in edmvec_t
cmt(C++: const char *) comment
etf_flags(C++: uint) etf_flag_t

◆ set_enum_is_bitmask()

"tinfo_code_t" set_enum_is_bitmask ( self,
* args )
Parameters
stanceenum tinfo_t::bitmask_cvt_stance_t
etf_flagsuint

◆ set_enum_radix()

"tinfo_code_t" set_enum_radix ( self,
"int" radix,
"bool" sign,
"uint" etf_flags = 0 )
Parameters
radix(C++: int) radix 2, 4, 8, 16, with the special case 1 to display as character
sign(C++: bool) display as signed or unsigned
etf_flags(C++: uint) etf_flag_t

◆ set_enum_repr()

"tinfo_code_t" set_enum_repr ( self,
"value_repr_t" repr,
"uint" etf_flags = 0 )
Parameters
repr(C++: const value_repr_t &) value_repr_t
etf_flags(C++: uint) etf_flag_t

◆ set_enum_sign()

"tinfo_code_t" set_enum_sign ( self,
"type_sign_t" sign,
"uint" etf_flags = 0 )
Parameters
sign(C++: type_sign_t)
etf_flags(C++: uint) etf_flag_t

◆ set_enum_width()

"tinfo_code_t" set_enum_width ( self,
"int" nbytes,
"uint" etf_flags = 0 )
Parameters
nbytes(C++: int) width of enum base type, allowed values: 0 (unspecified),1,2,4,8,16,32,64
etf_flags(C++: uint) etf_flag_t

◆ set_fixed_struct()

"tinfo_code_t" set_fixed_struct ( self,
"bool" on = True )

For such structures, IDA will not recalculate the member offsets. If a member does not fit into its place anymore, it will be deleted. This function works only with structures (not unions).

Parameters
on(C++: bool)

◆ set_func_cc()

"tinfo_code_t" set_func_cc ( self,
"cm_t" cc,
"uint" etf_flags = 0 )
Parameters
cc(C++: cm_t)
etf_flags(C++: uint)

◆ set_func_retloc()

"tinfo_code_t" set_func_retloc ( self,
"argloc_t" argloc,
"uint" etf_flags = 0 )
Parameters
argloc(C++: const argloc_t &) new location for the return value
etf_flags(C++: uint) etf_flag_t
Returns
: tinfo_code_t

◆ set_func_rettype()

"tinfo_code_t" set_func_rettype ( self,
"tinfo_t" tif,
"uint" etf_flags = 0 )
Parameters
tif(C++: const tinfo_t &) new type for the return type
etf_flags(C++: uint) etf_flag_t
Returns
: tinfo_code_t

◆ set_funcarg_loc()

"tinfo_code_t" set_funcarg_loc ( self,
"size_t" index,
"argloc_t" argloc,
"uint" etf_flags = 0 )
Parameters
index(C++: size_t) argument index in the function array
argloc(C++: const argloc_t &) new location for the argument
etf_flags(C++: uint) etf_flag_t
Returns
: tinfo_code_t

◆ set_funcarg_type()

"tinfo_code_t" set_funcarg_type ( self,
"size_t" index,
"tinfo_t" tif,
"uint" etf_flags = 0 )
Parameters
index(C++: size_t) argument index in the function array
tif(C++: const tinfo_t &) new type for the argument
etf_flags(C++: uint) etf_flag_t
Returns
: tinfo_code_t

◆ set_methods()

"bool" set_methods ( self,
"udtmembervec_t" methods )
Parameters
BT_COMPLEXset the list of member functions. This function consumes 'methods' (makes it empty).
Returns
: false if this type is not a udt, or if the given list is empty

◆ set_modifiers()

"void" set_modifiers ( self,
"type_t" mod )
Parameters
modtype_t

◆ set_named_type()

"tinfo_code_t" set_named_type ( self,
"til_t" til,
"char const *" name,
"int" ntf_flags = 0 )
Parameters
tiltil_t *
namechar const *
ntf_flagsint

◆ set_numbered_type()

"tinfo_code_t" set_numbered_type ( self,
"til_t" til,
"uint32" ord,
"int" ntf_flags = 0,
"char const *" name = None )
Parameters
tiltil_t *
orduint32
ntf_flagsint
namechar const *

◆ set_struct_size()

"tinfo_code_t" set_struct_size ( self,
"size_t" new_size )

This function works only with fixed structures. The new struct size can be equal or higher the unpadded struct size (IOW, all existing members should fit into the specified size).

Parameters
new_size(C++: size_t) new structure size in bytes

◆ set_symbol_type()

"tinfo_code_t" set_symbol_type ( self,
"til_t" til,
"char const *" name,
"int" ntf_flags = 0 )
Parameters
tiltil_t *
namechar const *
ntf_flagsint

◆ set_type_alias()

"bool" set_type_alias ( self,
"uint32" dest_ord )

This is equivalent to instantaneous replacement all references to srctype by dsttype.

Parameters
dest_ord(C++: uint32)

◆ set_type_alignment()

"tinfo_code_t" set_type_alignment ( self,
"uchar" declalign,
"uint" etf_flags = 0 )
Parameters
declalign(C++: uchar)
etf_flags(C++: uint)

◆ set_type_cmt()

"tinfo_code_t" set_type_cmt ( self,
"char const *" cmt,
"bool" is_regcmt = False,
"uint" etf_flags = 0 )
Parameters
cmt(C++: const char *) char const *
is_regcmt(C++: bool)
etf_flags(C++: uint)

◆ set_udm_by_til()

"tinfo_code_t" set_udm_by_til ( self,
"size_t" idx,
"bool" on = True,
"uint" etf_flags = 0 )
Parameters
idx(C++: size_t) index of the member
on(C++: bool)
etf_flags(C++: uint) etf_flag_t

◆ set_udm_cmt()

"tinfo_code_t" set_udm_cmt ( self,
"size_t" index,
"char const *" cmt,
"bool" is_regcmt = False,
"uint" etf_flags = 0 )

A member may have just one comment, and it is either repeatable or regular.

Parameters
index(C++: size_t)
cmt(C++: const char *) char const *
is_regcmt(C++: bool)
etf_flags(C++: uint)

◆ set_udm_repr()

"tinfo_code_t" set_udm_repr ( self,
"size_t" index,
"value_repr_t" repr,
"uint" etf_flags = 0 )
Parameters
index(C++: size_t)
repr(C++: const value_repr_t &) value_repr_t const &
etf_flags(C++: uint)

◆ set_udm_type()

"tinfo_code_t" set_udm_type ( self,
"size_t" index,
"tinfo_t" tif,
"uint" etf_flags = 0,
"value_repr_t" repr = None )
Parameters
index(C++: size_t) member index in the udm array
tif(C++: const tinfo_t &) new type for the member
etf_flags(C++: uint) etf_flag_t
repr(C++: const value_repr_t *) new representation for the member (optional)
Returns
: tinfo_code_t

◆ set_udt_alignment()

"tinfo_code_t" set_udt_alignment ( self,
"int" sda,
"uint" etf_flags = 0 )

However, the effective structure alignment may differ from sda because of packing. The type editing functions (they accept etf_flags) may overwrite this attribute.

Parameters
sda(C++: int)
etf_flags(C++: uint)

◆ set_udt_pack()

"tinfo_code_t" set_udt_pack ( self,
"int" pack,
"uint" etf_flags = 0 )

The value controls how little a structure member alignment can be. Example: if pack=1, then it is possible to align a double to a byte. attribute((aligned(1))) double x; However, if pack=3, a double will be aligned to 8 (2**3) even if requested to be aligned to a byte. pack==0 will have the same effect. The type editing functions (they accept etf_flags) may overwrite this attribute.

Parameters
pack(C++: int)
etf_flags(C++: uint)

◆ set_volatile()

"void" set_volatile ( self)

◆ swap()

"void" swap ( self,
"tinfo_t" r )
Parameters
r(C++: tinfo_t &)

◆ write_bitfield_value()

"uint64" write_bitfield_value ( self,
"uint64" dst,
"uint64" v,
"int" bitoff )
Parameters
dstuint64
vuint64
bitoffint

Member Data Documentation

◆ ENUMBM_AUTO

ENUMBM_AUTO = _ida_typeinf.tinfo_t_ENUMBM_AUTO
static

◆ ENUMBM_OFF

ENUMBM_OFF = _ida_typeinf.tinfo_t_ENUMBM_OFF
static

◆ ENUMBM_ON

ENUMBM_ON = _ida_typeinf.tinfo_t_ENUMBM_ON
static

◆ get_edm_by_name

"ssize_t" get_edm_by_name = get_by_edm_name
static

Property Documentation

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

The documentation for this class was generated from the following file: