IDAPython 8.4
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)
 init(self) -> tinfo_t init(self, decl_type) -> tinfo_t
 
"void" clear (self, *args)
 clear(self) Clear contents of this tinfo, and remove from the type system.
 
"void" swap (self, *args)
 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 Create a tinfo_t object for an existing named type.
 
"bool" get_numbered_type (self, *args)
 get_numbered_type(self, til, ordinal, decl_type=BTF_TYPEDEF, resolve=True) -> bool Create a tinfo_t object for an existing ordinal type.
 
"bool" is_correct (self, *args)
 is_correct(self) -> bool Is the type object correct?.
 
"type_t" get_realtype (self, *args)
 get_realtype(self, full=False) -> type_t Get the resolved base type.
 
"type_t" get_decltype (self, *args)
 get_decltype(self) -> type_t Get declared type (without resolving type references; they are returned as is).
 
"bool" empty (self, *args)
 empty(self) -> bool Was tinfo_t initialized with some type info or not?
 
"bool" present (self, *args)
 present(self) -> bool Is the type really present? (not a reference to a missing type, for example)
 
"size_t" get_size (self, *args)
 get_size(self, p_effalign=None, gts_code=0) -> size_t Get the type size in bytes.
 
"size_t" get_unpadded_size (self, *args)
 get_unpadded_size(self) -> size_t Get the type size in bytes without the final padding, in bytes.
 
"type_sign_t" get_sign (self, *args)
 get_sign(self) -> type_sign_t Get type sign.
 
"bool" is_signed (self, *args)
 is_signed(self) -> bool Is this a signed type?
 
"bool" is_unsigned (self, *args)
 is_unsigned(self) -> bool Is this an unsigned type?
 
"uchar" get_declalign (self, *args)
 get_declalign(self) -> uchar Get declared alignment of the type.
 
"bool" is_typeref (self, *args)
 is_typeref(self) -> bool Is this type a type reference?.
 
"bool" has_details (self, *args)
 has_details(self) -> bool Does this type refer to a nontrivial type?
 
"bool" get_type_name (self, *args)
 get_type_name(self) -> bool Does a type refer to a name?.
 
"bool" get_nice_type_name (self, *args)
 get_nice_type_name(self) -> bool Get the beautified type name.
 
"tinfo_code_t" rename_type (self, *args)
 rename_type(self, name, ntf_flags=0) -> tinfo_code_t Rename a type
 
"bool" get_final_type_name (self, *args)
 get_final_type_name(self) -> bool Use in the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn).
 
"bool" get_next_type_name (self, *args)
 get_next_type_name(self) -> bool Use In the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn).
 
"tid_t" get_tid (self, *args)
 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, *args)
 force_tid(self) -> tid_t Get the type tid.
 
"uint32" get_ordinal (self, *args)
 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, *args)
 get_final_ordinal(self) -> uint32 Get final type ordinal (0 if none)
 
"til_t *" get_til (self, *args)
 get_til(self) -> til_t Get the type library for tinfo_t.
 
"bool" is_from_subtil (self, *args)
 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, *args)
 is_forward_decl(self) -> bool Is this a forward declaration?.
 
"type_t" get_forward_type (self, *args)
 get_forward_type(self) -> type_t Get type of a forward declaration.
 
"bool" is_forward_struct (self, *args)
 is_forward_struct(self) -> bool
 
"bool" is_forward_union (self, *args)
 is_forward_union(self) -> bool
 
"bool" is_forward_enum (self, *args)
 is_forward_enum(self) -> bool
 
"bool" is_typedef (self, *args)
 is_typedef(self) -> bool Is this a typedef?.
 
"int" get_type_cmt (self, *args)
 get_type_cmt(self) -> int Get type comment
 
"bool" get_type_rptcmt (self, *args)
 get_type_rptcmt(self) -> bool Get type comment only if it is repeatable.
 
"bool" is_decl_const (self, *args)
 is_decl_const(self) -> bool is_type_const(get_decltype())
 
"bool" is_decl_volatile (self, *args)
 is_decl_volatile(self) -> bool is_type_volatile(get_decltype())
 
"bool" is_decl_void (self, *args)
 is_decl_void(self) -> bool is_type_void(get_decltype())
 
"bool" is_decl_partial (self, *args)
 is_decl_partial(self) -> bool is_type_partial(get_decltype())
 
"bool" is_decl_unknown (self, *args)
 is_decl_unknown(self) -> bool is_type_unknown(get_decltype())
 
"bool" is_decl_last (self, *args)
 is_decl_last(self) -> bool is_typeid_last(get_decltype())
 
"bool" is_decl_ptr (self, *args)
 is_decl_ptr(self) -> bool is_type_ptr(get_decltype())
 
"bool" is_decl_array (self, *args)
 is_decl_array(self) -> bool is_type_array(get_decltype())
 
"bool" is_decl_func (self, *args)
 is_decl_func(self) -> bool is_type_func(get_decltype())
 
"bool" is_decl_complex (self, *args)
 is_decl_complex(self) -> bool is_type_complex(get_decltype())
 
"bool" is_decl_typedef (self, *args)
 is_decl_typedef(self) -> bool is_type_typedef(get_decltype())
 
"bool" is_decl_sue (self, *args)
 is_decl_sue(self) -> bool is_type_sue(get_decltype())
 
"bool" is_decl_struct (self, *args)
 is_decl_struct(self) -> bool is_type_struct(get_decltype())
 
"bool" is_decl_union (self, *args)
 is_decl_union(self) -> bool is_type_union(get_decltype())
 
"bool" is_decl_udt (self, *args)
 is_decl_udt(self) -> bool is_type_struni(get_decltype())
 
"bool" is_decl_enum (self, *args)
 is_decl_enum(self) -> bool is_type_enum(get_decltype())
 
"bool" is_decl_bitfield (self, *args)
 is_decl_bitfield(self) -> bool is_type_bitfld(get_decltype())
 
"bool" is_decl_int128 (self, *args)
 is_decl_int128(self) -> bool is_type_int128(get_decltype())
 
"bool" is_decl_int64 (self, *args)
 is_decl_int64(self) -> bool is_type_int64(get_decltype())
 
"bool" is_decl_int32 (self, *args)
 is_decl_int32(self) -> bool is_type_int32(get_decltype())
 
"bool" is_decl_int16 (self, *args)
 is_decl_int16(self) -> bool is_type_int16(get_decltype())
 
"bool" is_decl_int (self, *args)
 is_decl_int(self) -> bool is_type_int(get_decltype())
 
"bool" is_decl_char (self, *args)
 is_decl_char(self) -> bool is_type_char(get_decltype())
 
"bool" is_decl_uint (self, *args)
 is_decl_uint(self) -> bool is_type_uint(get_decltype())
 
"bool" is_decl_uchar (self, *args)
 is_decl_uchar(self) -> bool is_type_uchar(get_decltype())
 
"bool" is_decl_uint16 (self, *args)
 is_decl_uint16(self) -> bool is_type_uint16(get_decltype())
 
"bool" is_decl_uint32 (self, *args)
 is_decl_uint32(self) -> bool is_type_uint32(get_decltype())
 
"bool" is_decl_uint64 (self, *args)
 is_decl_uint64(self) -> bool is_type_uint64(get_decltype())
 
"bool" is_decl_uint128 (self, *args)
 is_decl_uint128(self) -> bool is_type_uint128(get_decltype())
 
"bool" is_decl_ldouble (self, *args)
 is_decl_ldouble(self) -> bool is_type_ldouble(get_decltype())
 
"bool" is_decl_double (self, *args)
 is_decl_double(self) -> bool is_type_double(get_decltype())
 
"bool" is_decl_float (self, *args)
 is_decl_float(self) -> bool is_type_float(get_decltype())
 
"bool" is_decl_tbyte (self, *args)
 is_decl_tbyte(self) -> bool is_type_tbyte(get_decltype())
 
"bool" is_decl_floating (self, *args)
 is_decl_floating(self) -> bool is_type_floating(get_decltype())
 
"bool" is_decl_bool (self, *args)
 is_decl_bool(self) -> bool is_type_bool(get_decltype())
 
"bool" is_decl_paf (self, *args)
 is_decl_paf(self) -> bool is_type_paf(get_decltype())
 
"bool" is_well_defined (self, *args)
 is_well_defined(self) -> bool !(empty()) && !(is_decl_partial())
 
"bool" is_const (self, *args)
 is_const(self) -> bool is_type_const(get_realtype())
 
"bool" is_volatile (self, *args)
 is_volatile(self) -> bool is_type_volatile(get_realtype())
 
"bool" is_void (self, *args)
 is_void(self) -> bool is_type_void(get_realtype())
 
"bool" is_partial (self, *args)
 is_partial(self) -> bool is_type_partial(get_realtype())
 
"bool" is_unknown (self, *args)
 is_unknown(self) -> bool is_type_unknown(get_realtype())
 
"bool" is_ptr (self, *args)
 is_ptr(self) -> bool is_type_ptr(get_realtype())
 
"bool" is_array (self, *args)
 is_array(self) -> bool is_type_array(get_realtype())
 
"bool" is_func (self, *args)
 is_func(self) -> bool is_type_func(get_realtype())
 
"bool" is_complex (self, *args)
 is_complex(self) -> bool is_type_complex(get_realtype())
 
"bool" is_struct (self, *args)
 is_struct(self) -> bool is_type_struct(get_realtype())
 
"bool" is_union (self, *args)
 is_union(self) -> bool is_type_union(get_realtype())
 
"bool" is_udt (self, *args)
 is_udt(self) -> bool is_type_struni(get_realtype())
 
"bool" is_enum (self, *args)
 is_enum(self) -> bool is_type_enum(get_realtype())
 
"bool" is_sue (self, *args)
 is_sue(self) -> bool is_type_sue(get_realtype())
 
"bool" is_bitfield (self, *args)
 is_bitfield(self) -> bool is_type_bitfld(get_realtype())
 
"bool" is_int128 (self, *args)
 is_int128(self) -> bool is_type_int128(get_realtype())
 
"bool" is_int64 (self, *args)
 is_int64(self) -> bool is_type_int64(get_realtype())
 
"bool" is_int32 (self, *args)
 is_int32(self) -> bool is_type_int32(get_realtype())
 
"bool" is_int16 (self, *args)
 is_int16(self) -> bool is_type_int16(get_realtype())
 
"bool" is_int (self, *args)
 is_int(self) -> bool is_type_int(get_realtype())
 
"bool" is_char (self, *args)
 is_char(self) -> bool is_type_char(get_realtype())
 
"bool" is_uint (self, *args)
 is_uint(self) -> bool is_type_uint(get_realtype())
 
"bool" is_uchar (self, *args)
 is_uchar(self) -> bool is_type_uchar(get_realtype())
 
"bool" is_uint16 (self, *args)
 is_uint16(self) -> bool is_type_uint16(get_realtype())
 
"bool" is_uint32 (self, *args)
 is_uint32(self) -> bool is_type_uint32(get_realtype())
 
"bool" is_uint64 (self, *args)
 is_uint64(self) -> bool is_type_uint64(get_realtype())
 
"bool" is_uint128 (self, *args)
 is_uint128(self) -> bool is_type_uint128(get_realtype())
 
"bool" is_ldouble (self, *args)
 is_ldouble(self) -> bool is_type_ldouble(get_realtype())
 
"bool" is_double (self, *args)
 is_double(self) -> bool is_type_double(get_realtype())
 
"bool" is_float (self, *args)
 is_float(self) -> bool is_type_float(get_realtype())
 
"bool" is_tbyte (self, *args)
 is_tbyte(self) -> bool is_type_tbyte(get_realtype())
 
"bool" is_bool (self, *args)
 is_bool(self) -> bool is_type_bool(get_realtype())
 
"bool" is_paf (self, *args)
 is_paf(self) -> bool is_type_paf(get_realtype())
 
"bool" is_ptr_or_array (self, *args)
 is_ptr_or_array(self) -> bool is_type_ptr_or_array(get_realtype())
 
"bool" is_integral (self, *args)
 is_integral(self) -> bool is_type_integral(get_realtype())
 
"bool" is_ext_integral (self, *args)
 is_ext_integral(self) -> bool is_type_ext_integral(get_realtype())
 
"bool" is_floating (self, *args)
 is_floating(self) -> bool is_type_floating(get_realtype())
 
"bool" is_arithmetic (self, *args)
 is_arithmetic(self) -> bool is_type_arithmetic(get_realtype())
 
"bool" is_ext_arithmetic (self, *args)
 is_ext_arithmetic(self) -> bool is_type_ext_arithmetic(get_realtype())
 
"bool" is_scalar (self, *args)
 is_scalar(self) -> bool Does the type represent a single number?
 
"bool" get_ptr_details (self, *args)
 get_ptr_details(self, pi) -> bool Get the pointer info.
 
"bool" get_array_details (self, *args)
 get_array_details(self, ai) -> bool Get the array specific info.
 
"bool" get_enum_details (self, *args)
 get_enum_details(self, ei) -> bool Get the enum specific info.
 
"bool" get_bitfield_details (self, *args)
 get_bitfield_details(self, bi) -> bool Get the bitfield specific info.
 
"bool" get_udt_details (self, *args)
 get_udt_details(self, udt, gtd=GTD_CALC_LAYOUT) -> bool Get the udt specific info.
 
"bool" get_func_details (self, *args)
 get_func_details(self, fi, gtd=GTD_CALC_ARGLOCS) -> bool Get only the function specific info for this tinfo_t.
 
"bool" is_funcptr (self, *args)
 is_funcptr(self) -> bool Is this pointer to a function?
 
"bool" is_shifted_ptr (self, *args)
 is_shifted_ptr(self) -> bool Is a shifted pointer?
 
"bool" is_varstruct (self, *args)
 is_varstruct(self) -> bool Is a variable-size structure?
 
"bool" is_varmember (self, *args)
 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, *args)
 get_ptrarr_objsize(self) -> int BT_PTR & BT_ARRAY: get size of pointed object or array element.
 
"tinfo_t" get_ptrarr_object (self, *args)
 get_ptrarr_object(self) -> tinfo_t BT_PTR & BT_ARRAY: get the pointed object or array element.
 
"tinfo_t" get_pointed_object (self, *args)
 get_pointed_object(self) -> tinfo_t
 
"bool" is_pvoid (self, *args)
 is_pvoid(self) -> bool Is "void *"?.
 
"tinfo_t" get_array_element (self, *args)
 get_array_element(self) -> tinfo_t
 
"tinfo_t" get_final_element (self, *args)
 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, *args)
 get_array_nelems(self) -> int
 
"tinfo_t" get_nth_arg (self, *args)
 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, *args)
 get_rettype(self) -> tinfo_t BT_FUNC or BT_PTR BT_FUNC: Get the function's return type
 
"int" get_nargs (self, *args)
 get_nargs(self) -> int BT_FUNC or BT_PTR BT_FUNC: Calculate number of arguments (-1 - error)
 
"bool" is_user_cc (self, *args)
 is_user_cc(self) -> bool is_user_cc(get_cc())
 
"bool" is_vararg_cc (self, *args)
 is_vararg_cc(self) -> bool is_vararg_cc(get_cc())
 
"bool" is_purging_cc (self, *args)
 is_purging_cc(self) -> bool is_purging_cc(get_cc())
 
"int" calc_purged_bytes (self, *args)
 calc_purged_bytes(self) -> int
 
"bool" is_high_func (self, *args)
 is_high_func(self) -> bool
 
"bool" get_methods (self, *args)
 get_methods(self, methods) -> bool
 
"bool" get_bit_buckets (self, *args)
 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 a udt member.
 
"int" get_udt_nmembers (self, *args)
 get_udt_nmembers(self) -> int Get number of udt members.
 
"bool" is_empty_udt (self, *args)
 is_empty_udt(self) -> bool Is an empty struct/union? (has no fields)
 
"bool" is_small_udt (self, *args)
 is_small_udt(self) -> bool Is a small udt? (can fit a register or a pair of registers)
 
"bool" requires_qualifier (self, *args)
 requires_qualifier(self, name, offset) -> bool Requires full qualifier? (name is not unique)
 
"bool" append_covered (self, *args)
 append_covered(self, out, offset=0) -> bool Calculate set of covered bytes for the type
 
"bool" calc_gaps (self, *args)
 calc_gaps(self, out) -> bool Calculate set of padding bytes for the type
 
"bool" is_one_fpval (self, *args)
 is_one_fpval(self) -> bool Floating value or an object consisting of one floating member entirely.
 
"bool" is_sse_type (self, *args)
 is_sse_type(self) -> bool Is a SSE vector type?
 
"bool" is_anonymous_udt (self, *args)
 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, *args)
 is_vftable(self) -> bool Is a vftable type?
 
"bool" has_vftable (self, *args)
 has_vftable(self) -> bool Has a vftable?
 
"bool" has_union (self, *args)
 has_union(self) -> bool Has a member of type "union"?
 
"type_t" get_enum_base_type (self, *args)
 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, *args)
 is_bitmask_enum(self) -> bool Is bitmask enum?
 
"int" get_enum_radix (self, *args)
 get_enum_radix(self) -> int Get enum constant radix
 
"tinfo_code_t" get_edm (self, *args)
 get_edm(self, edm, idx) -> tinfo_code_t Get enum member
 
"tinfo_code_t" find_edm (self, *args)
 find_edm(self, edm, value, bmask=bmask64_t(-1), serial=0) -> tinfo_code_t Find enum member
 
"tinfo_t" get_onemember_type (self, *args)
 get_onemember_type(self) -> tinfo_t For objects consisting of one member entirely: return type of the member.
 
"tinfo_t" get_innermost_udm (self, *args)
 get_innermost_udm(self, bitoffset) -> tinfo_t Get the innermost member at the given offset
 
"uint32" calc_score (self, *args)
 calc_score(self) -> uint32 Calculate the type score (the higher - the nicer is the type)
 
"char const *" dstr (self, *args)
 dstr(self) -> char const * Function to facilitate debugging.
 
"bool" get_attrs (self, *args)
 get_attrs(self, tav, all_attrs=False) -> bool Get type attributes (all_attrs: include attributes of referenced types, if any)
 
"bool" set_attrs (self, *args)
 set_attrs(self, tav) -> bool Set type attributes.
 
"bool" set_attr (self, *args)
 set_attr(self, ta, may_overwrite=True) -> bool Set a type attribute.
 
"void" del_attrs (self, *args)
 del_attrs(self) Del all type attributes.
 
"bool" del_attr (self, *args)
 del_attr(self, key, make_copy=True) -> bool Del a type attribute.
 
"bool" create_simple_type (self, *args)
 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, *args)
 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, p) -> bool
 
"bool" create_enum (self, *args)
 create_enum(self, p, decl_type=BTF_ENUM) -> bool
 
"bool" create_func (self, *args)
 create_func(self, p, decl_type=BT_FUNC) -> bool
 
"ssize_t" get_udm_by_tid (self, *args)
 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, *args)
 get_edm_by_tid(self, edm, tid) -> ssize_t
 
"bool" get_type_by_tid (self, *args)
 get_type_by_tid(self, tid) -> bool
 
"bool" get_type_by_edm_name (self, *args)
 get_type_by_edm_name(self, mname, til=None) -> bool Retrieve enum tinfo using enum member name
 
"tinfo_code_t" set_named_type (self, *args)
 set_named_type(self, til, name, ntf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" set_symbol_type (self, *args)
 set_symbol_type(self, til, name, ntf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" set_numbered_type (self, *args)
 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, *args)
 create_forward_decl(self, til, decl_type, name, ntf_flags=0) -> tinfo_code_t Create a forward declaration.
 
"bool" convert_array_to_ptr (self, *args)
 convert_array_to_ptr(self) -> bool Convert an array into a pointer.
 
"bool" remove_ptr_or_array (self, *args)
 remove_ptr_or_array(self) -> bool Replace the current type with the ptr obj or array element.
 
"uint64" read_bitfield_value (self, *args)
 read_bitfield_value(self, v, bitoff) -> uint64
 
"uint64" write_bitfield_value (self, *args)
 write_bitfield_value(self, dst, v, bitoff) -> uint64
 
"type_t" get_modifiers (self, *args)
 get_modifiers(self) -> type_t
 
"void" set_modifiers (self, *args)
 set_modifiers(self, mod)
 
"void" set_const (self, *args)
 set_const(self)
 
"void" set_volatile (self, *args)
 set_volatile(self)
 
"void" clr_decl_const_volatile (self, *args)
 clr_decl_const_volatile(self)
 
"bool" clr_const (self, *args)
 clr_const(self) -> bool
 
"bool" clr_volatile (self, *args)
 clr_volatile(self) -> bool
 
"bool" clr_const_volatile (self, *args)
 clr_const_volatile(self) -> bool
 
"tinfo_code_t" set_type_alignment (self, *args)
 set_type_alignment(self, declalign, etf_flags=0) -> tinfo_code_t Set type alignment.
 
"bool" set_declalign (self, *args)
 set_declalign(self, declalign) -> bool
 
"bool" change_sign (self, *args)
 change_sign(self, sign) -> bool Change the type sign.
 
"bool" calc_udt_aligns (self, *args)
 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, *args)
 set_methods(self, methods) -> bool
 
"tinfo_code_t" set_type_cmt (self, *args)
 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, *args)
 get_alias_target(self) -> uint32 Get type alias If the type has no alias, return 0.
 
"bool" is_aliased (self, *args)
 is_aliased(self) -> bool
 
"bool" set_type_alias (self, *args)
 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, *args)
 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, *args)
 set_udt_pack(self, pack, etf_flags=0) -> tinfo_code_t Set structure packing.
 
"tid_t" get_udm_tid (self, *args)
 get_udm_tid(self, idx) -> tid_t Get udt member TID
 
"tinfo_code_t" add_udm (self, *args)
 add_udm(self, udm, etf_flags=0, times=1, idx=-1) -> tinfo_code_t Add a structure/union member.
 
"tinfo_code_t" del_udm (self, *args)
 del_udm(self, index, etf_flags=0) -> tinfo_code_t Delete a structure/union member.
 
"tinfo_code_t" del_udms (self, *args)
 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, *args)
 rename_udm(self, index, name, etf_flags=0) -> tinfo_code_t Rename a structure/union member.
 
"tinfo_code_t" set_udm_type (self, *args)
 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, *args)
 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, *args)
 set_udm_repr(self, index, repr, etf_flags=0) -> tinfo_code_t Set the representation of a structure/union member.
 
"tinfo_code_t" expand_udt (self, *args)
 expand_udt(self, idx, delta, etf_flags=0) -> tinfo_code_t Expand/shtrink a structure by adding/removing a gap before the specified member.
 
"tinfo_code_t" set_enum_width (self, *args)
 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, *args)
 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, *args)
 set_enum_repr(self, repr, etf_flags=0) -> tinfo_code_t Set the representation of enum members.
 
"tinfo_code_t" add_edm (self, *args)
 add_edm(self, edm, bmask=bmask64_t(-1), etf_flags=0, idx=-1) -> tinfo_code_t Add a new enum member (a new symbolic constant)
 
"tinfo_code_t" del_edms (self, *args)
 del_edms(self, idx1, idx2, etf_flags=0) -> tinfo_code_t Delete enum members
 
"tinfo_code_t" del_edm (self, *args)
 del_edm(self, idx, etf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" rename_edm (self, *args)
 rename_edm(self, idx, name, etf_flags=0) -> tinfo_code_t Rename a enum member
 
"tinfo_code_t" set_edm_cmt (self, *args)
 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" edit_udt (self, *args)
 edit_udt(self, editor, etf_flags=0) -> tinfo_code_t Edit udt/enum/func/array/ptr/bitfield.
 
"tinfo_code_t" edit_enum (self, *args)
 edit_enum(self, editor, etf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" edit_func (self, *args)
 edit_func(self, editor, etf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" edit_array (self, *args)
 edit_array(self, editor, etf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" edit_ptr (self, *args)
 edit_ptr(self, editor, etf_flags=0) -> tinfo_code_t
 
"tinfo_code_t" edit_bitfield (self, *args)
 edit_bitfield(self, editor, etf_flags=0) -> tinfo_code_t
 
"bool" __eq__ (self, *args)
 eq(self, r) -> bool
 
"bool" __ne__ (self, *args)
 ne(self, r) -> bool
 
"bool" __lt__ (self, *args)
 lt(self, r) -> bool
 
"bool" __gt__ (self, *args)
 gt(self, r) -> bool
 
"bool" __le__ (self, *args)
 le(self, r) -> bool
 
"bool" __ge__ (self, *args)
 ge(self, r) -> bool
 
"int" compare (self, *args)
 compare(self, r) -> int
 
"bool" compare_with (self, *args)
 compare_with(self, r, tcflags=0) -> bool Compare two types, based on given flags (see tinfo_t comparison flags)
 
"bool" equals_to (self, *args)
 equals_to(self, r) -> bool
 
"bool" is_castable_to (self, *args)
 is_castable_to(self, target) -> bool
 
"bool" is_manually_castable_to (self, *args)
 is_manually_castable_to(self, target) -> bool
 
"PyObject *" serialize (self, *args)
 serialize(self, sudt_flags=SUDT_FAST|SUDT_TRUNC) -> (bytes, NoneType, NoneType), (bytes, bytes, NoneType) 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.
 
"tinfo_t" copy (self, *args)
 copy(self) -> tinfo_t
 
"qstring" __str__ (self, *args)
 str(self) -> qstring
 
"PyObject *" get_attr (self, *args)
 get_attr(self, key, all_attrs=True) -> str or None Get a type attribute.
 

Static Public Member Functions

"tinfo_t" get_stock (*args)
 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
 

Protected Member Functions

"bool" _print (self, *args)
 _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 )
Parameters
decl_typetype_t

init(self, r) -> tinfo_t

Parameters
rtinfo_t const &

Member Function Documentation

◆ __eq__()

"bool" __eq__ ( self,
* args )
Parameters
rtinfo_t const &

◆ __ge__()

"bool" __ge__ ( self,
* args )
Parameters
rtinfo_t const &

◆ __gt__()

"bool" __gt__ ( self,
* args )
Parameters
rtinfo_t const &

◆ __le__()

"bool" __le__ ( self,
* args )
Parameters
rtinfo_t const &

◆ __lt__()

"bool" __lt__ ( self,
* args )
Parameters
rtinfo_t const &

◆ __ne__()

"bool" __ne__ ( self,
* args )
Parameters
rtinfo_t const &

◆ __str__()

"qstring" __str__ ( self,
* args )

◆ _print()

"bool" _print ( self,
* args )
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 )
Parameters
edm(C++: const edm_t &) the constant name, value, and comment
bmask(C++: bmask64_t) bmask of the group to add the constant to
Note
: 1. For non-bitmask enum push back constant, BMASK is not used (set it ot -1), never failed 2. For bitmask enum:
  • if VAL and BMASK are not agreed, return TERR_BAD_MSKVAL
  • if group with BMASK exists, push back constant to group
  • otherwise use constant as bitmask for a new group
: ETF_NO_SAVE is ignored

◆ add_udm()

"tinfo_code_t" add_udm ( self,
* args )
Parameters
udm(C++: const udm_t &) member to add
etf_flags(C++: uint) edit_type() flags flags
times(C++: size_t) how many times to add. if times > 1, the member name will be appended a suffix like "_2" and so on
idx(C++: ssize_t) the 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.
Note
: ETF_NO_SAVE is ignored

◆ append_covered()

"bool" append_covered ( self,
* args )
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_gaps()

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

◆ calc_purged_bytes()

"int" calc_purged_bytes ( self,
* args )

◆ calc_score()

"uint32" calc_score ( self,
* args )

◆ calc_udt_aligns()

"bool" calc_udt_aligns ( self,
* args )
Parameters
sudt_flags(C++: int)

◆ change_sign()

"bool" change_sign ( self,
* args )

Works only for the types that may have sign.

Parameters
sign(C++: type_sign_t)

◆ clear()

"void" clear ( self,
* args )

◆ clr_const()

"bool" clr_const ( self,
* args )

◆ clr_const_volatile()

"bool" clr_const_volatile ( self,
* args )

◆ clr_decl_const_volatile()

"void" clr_decl_const_volatile ( self,
* args )

◆ clr_volatile()

"bool" clr_volatile ( self,
* args )

◆ compare()

"int" compare ( self,
* args )
Parameters
rtinfo_t const &

◆ compare_with()

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

◆ convert_array_to_ptr()

"bool" convert_array_to_ptr ( self,
* args )

type[] => type *

◆ copy()

"tinfo_t" copy ( self,
* args )

◆ 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
penum_type_data_t &
decl_typetype_t

◆ create_forward_decl()

"tinfo_code_t" create_forward_decl ( self,
* args )

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,
* args )
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
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,
* args )

typerefs cannot be modified by this function.

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

◆ del_attrs()

"void" del_attrs ( self,
* args )

typerefs cannot be modified by this function.

◆ del_edm()

"tinfo_code_t" del_edm ( self,
* args )
Parameters
idxsize_t
etf_flagsuint

◆ del_edms()

"tinfo_code_t" del_edms ( self,
* args )
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_udm()

"tinfo_code_t" del_udm ( self,
* args )
Parameters
index(C++: size_t)
etf_flags(C++: uint)

◆ del_udms()

"tinfo_code_t" del_udms ( self,
* args )
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 *

◆ dstr()

"char const *" dstr ( self,
* args )

◆ edit_array()

"tinfo_code_t" edit_array ( self,
* args )
Parameters
editorstd::function< tinfo_code_t (array_type_data_t *) > const &
etf_flagsuint

◆ edit_bitfield()

"tinfo_code_t" edit_bitfield ( self,
* args )
Parameters
editorstd::function< tinfo_code_t (bitfield_type_data_t *) > const &
etf_flagsuint

◆ 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

◆ edit_enum()

"tinfo_code_t" edit_enum ( self,
* args )
Parameters
editorstd::function< tinfo_code_t (enum_type_data_t *) > const &
etf_flagsuint

◆ edit_func()

"tinfo_code_t" edit_func ( self,
* args )
Parameters
editorstd::function< tinfo_code_t (func_type_data_t *) > const &
etf_flagsuint

◆ edit_ptr()

"tinfo_code_t" edit_ptr ( self,
* args )
Parameters
editorstd::function< tinfo_code_t (ptr_type_data_t *) > const &
etf_flagsuint

◆ edit_udt()

"tinfo_code_t" edit_udt ( self,
* args )

These functions may be used if the desired functionality is not provided by the STA_... based functions.

Parameters
editor(C++: const std::function< tinfo_code_t(udt_type_data_t *)> &) callback to modify the type details; should return true on success
etf_flags(C++: uint) combination of etf_flag_t constants

◆ empty()

"bool" empty ( self,
* args )

◆ equals_to()

"bool" equals_to ( self,
* args )
Parameters
rtinfo_t const &

◆ expand_udt()

"tinfo_code_t" expand_udt ( self,
* args )
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 Please note that it is impossible to add a gap at the very end of a structure. However, adding before a regular member is possible. This function can be used to remove gaps in the middle of a structure by specifying a negative delta value.

◆ find_edm()

"tinfo_code_t" find_edm ( self,
* args )
Parameters
edm(C++: edm_t *) enum type member
valueuint64
bmaskbmask64_t find_edm(self, edm, name) -> tinfo_code_t
edmedm_t *
namechar const *

◆ find_udm()

"int" find_udm ( self,
* args )
  • at the specified offset (STRMEM_OFFSET)
  • with the specified index (STRMEM_INDEX)
  • with the specified type (STRMEM_TYPE)
  • with the specified name (STRMEM_NAME)
Parameters
udm(C++: struct udm_t *) udm_t *
strmem_flags(C++: int)
Returns
: the index of the found member or -1

◆ force_tid()

"tid_t" force_tid ( self,
* args )

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,
* args )

◆ get_array_details()

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

◆ get_array_element()

"tinfo_t" get_array_element ( self,
* args )

◆ get_array_nelems()

"int" get_array_nelems ( self,
* args )

◆ get_attr()

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

◆ get_attrs()

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

◆ get_bit_buckets()

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

◆ get_bitfield_details()

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

◆ get_declalign()

"uchar" get_declalign ( self,
* args )

◆ get_decltype()

"type_t" get_decltype ( self,
* args )

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()

"tinfo_code_t" get_edm ( self,
* args )
Parameters
edm(C++: edm_t *) enum type member
idx(C++: size_t) enum member index

◆ get_edm_by_tid()

"ssize_t" get_edm_by_tid ( self,
* args )
Parameters
edmedm_t *
tidtid_t

◆ get_enum_base_type()

"type_t" get_enum_base_type ( self,
* args )

◆ get_enum_details()

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

◆ get_enum_radix()

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

◆ get_final_element()

"tinfo_t" get_final_element ( self,
* args )

◆ get_final_ordinal()

"uint32" get_final_ordinal ( self,
* args )

◆ get_final_type_name()

"bool" get_final_type_name ( self,
* args )
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,
* args )

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

◆ get_func_details()

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

◆ get_innermost_udm()

"tinfo_t" get_innermost_udm ( self,
* args )
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,
* args )
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,
* args )

◆ get_named_type()

"bool" get_named_type ( self,
* args )
Parameters
til(C++: const til_t *) type library to use
name(C++: const char *) name of the type to link to
decl_type(C++: type_t) if the reference was explicitly specified with the type tag (BTF_STRUCT/BTF_UNION/BTF_ENUM) you may specify it. the kernel will accept only the specified tag after resolving the type. If the resolved type does not correspond to the explicitly specified tag, the type will be considered as undefined
resolve(C++: bool) true: immediately resolve the type and return success code.
try_ordinal(C++: bool) true: try to replace name reference by an ordinal reference

◆ get_nargs()

"int" get_nargs ( self,
* args )

◆ get_next_type_name()

"bool" get_next_type_name ( self,
* args )
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,
* args )

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

◆ get_nth_arg()

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

◆ get_numbered_type()

"bool" get_numbered_type ( self,
* args )
Parameters
til(C++: const til_t *) type library to use
ordinal(C++: uint32) number of the type to link to
decl_type(C++: type_t) if the reference was explicitly specified with the type tag (BTF_STRUCT/BTF_UNION/BTF_ENUM) you may specify it. the kernel will accept only the specified tag after resolving the type. If the resolved type does not correspond to the explicitly specified tag, the type will be considered as undefined
resolve(C++: bool) true: immediately resolve the type and return success code

◆ get_onemember_type()

"tinfo_t" get_onemember_type ( self,
* args )

◆ get_ordinal()

"uint32" get_ordinal ( self,
* args )

◆ get_pointed_object()

"tinfo_t" get_pointed_object ( self,
* args )

◆ get_ptr_details()

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

◆ get_ptrarr_object()

"tinfo_t" get_ptrarr_object ( self,
* args )

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

◆ get_ptrarr_objsize()

"int" get_ptrarr_objsize ( self,
* args )

On error returns -1

◆ get_realtype()

"type_t" get_realtype ( self,
* args )

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,
* args )

◆ get_sign()

"type_sign_t" get_sign ( self,
* args )

◆ get_size()

"size_t" get_size ( self,
* args )
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_stock()

"tinfo_t" get_stock ( * args)
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,
* args )

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,
* args )

◆ get_type_by_edm_name()

"bool" get_type_by_edm_name ( self,
* args )
Parameters
mname(C++: const char *) enum type member name
til(C++: til_t *) type library
Returns
: success If the function fails, THIS object becomes empty.

◆ get_type_by_tid()

"bool" get_type_by_tid ( self,
* args )
Parameters
tidtid_t

◆ get_type_cmt()

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

◆ get_type_name()

"bool" get_type_name ( self,
* args )

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,
* args )

◆ get_udm_by_tid()

"ssize_t" get_udm_by_tid ( self,
* args )
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,
* args )
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,
* args )
Parameters
udt(C++: udt_type_data_t *)
gtd(C++: gtd_udt_t) enum gtd_udt_t

◆ get_udt_nmembers()

"int" get_udt_nmembers ( self,
* args )

-1-error.

◆ get_unpadded_size()

"size_t" get_unpadded_size ( self,
* args )

For some UDTs get_unpadded_size() != get_size()

◆ has_details()

"bool" has_details ( self,
* args )

◆ has_union()

"bool" has_union ( self,
* args )

◆ has_vftable()

"bool" has_vftable ( self,
* args )

◆ is_aliased()

"bool" is_aliased ( self,
* args )

◆ is_anonymous_udt()

"bool" is_anonymous_udt ( self,
* args )

◆ is_arithmetic()

"bool" is_arithmetic ( self,
* args )

◆ is_array()

"bool" is_array ( self,
* args )

◆ is_bitfield()

"bool" is_bitfield ( self,
* args )

◆ is_bitmask_enum()

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

◆ is_bool()

"bool" is_bool ( self,
* args )

◆ is_castable_to()

"bool" is_castable_to ( self,
* args )
Parameters
targettinfo_t const &

◆ is_char()

"bool" is_char ( self,
* args )

◆ is_complex()

"bool" is_complex ( self,
* args )

◆ is_const()

"bool" is_const ( self,
* args )

◆ is_correct()

"bool" is_correct ( self,
* args )

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,
* args )

◆ is_decl_bitfield()

"bool" is_decl_bitfield ( self,
* args )

◆ is_decl_bool()

"bool" is_decl_bool ( self,
* args )

◆ is_decl_char()

"bool" is_decl_char ( self,
* args )

◆ is_decl_complex()

"bool" is_decl_complex ( self,
* args )

◆ is_decl_const()

"bool" is_decl_const ( self,
* args )

◆ is_decl_double()

"bool" is_decl_double ( self,
* args )

◆ is_decl_enum()

"bool" is_decl_enum ( self,
* args )

◆ is_decl_float()

"bool" is_decl_float ( self,
* args )

◆ is_decl_floating()

"bool" is_decl_floating ( self,
* args )

◆ is_decl_func()

"bool" is_decl_func ( self,
* args )

◆ is_decl_int()

"bool" is_decl_int ( self,
* args )

◆ is_decl_int128()

"bool" is_decl_int128 ( self,
* args )

◆ is_decl_int16()

"bool" is_decl_int16 ( self,
* args )

◆ is_decl_int32()

"bool" is_decl_int32 ( self,
* args )

◆ is_decl_int64()

"bool" is_decl_int64 ( self,
* args )

◆ is_decl_last()

"bool" is_decl_last ( self,
* args )

◆ is_decl_ldouble()

"bool" is_decl_ldouble ( self,
* args )

◆ is_decl_paf()

"bool" is_decl_paf ( self,
* args )

◆ is_decl_partial()

"bool" is_decl_partial ( self,
* args )

◆ is_decl_ptr()

"bool" is_decl_ptr ( self,
* args )

◆ is_decl_struct()

"bool" is_decl_struct ( self,
* args )

◆ is_decl_sue()

"bool" is_decl_sue ( self,
* args )

◆ is_decl_tbyte()

"bool" is_decl_tbyte ( self,
* args )

◆ is_decl_typedef()

"bool" is_decl_typedef ( self,
* args )

◆ is_decl_uchar()

"bool" is_decl_uchar ( self,
* args )

◆ is_decl_udt()

"bool" is_decl_udt ( self,
* args )

◆ is_decl_uint()

"bool" is_decl_uint ( self,
* args )

◆ is_decl_uint128()

"bool" is_decl_uint128 ( self,
* args )

◆ is_decl_uint16()

"bool" is_decl_uint16 ( self,
* args )

◆ is_decl_uint32()

"bool" is_decl_uint32 ( self,
* args )

◆ is_decl_uint64()

"bool" is_decl_uint64 ( self,
* args )

◆ is_decl_union()

"bool" is_decl_union ( self,
* args )

◆ is_decl_unknown()

"bool" is_decl_unknown ( self,
* args )

◆ is_decl_void()

"bool" is_decl_void ( self,
* args )

◆ is_decl_volatile()

"bool" is_decl_volatile ( self,
* args )

◆ is_double()

"bool" is_double ( self,
* args )

◆ is_empty_udt()

"bool" is_empty_udt ( self,
* args )

◆ is_enum()

"bool" is_enum ( self,
* args )

◆ is_ext_arithmetic()

"bool" is_ext_arithmetic ( self,
* args )

◆ is_ext_integral()

"bool" is_ext_integral ( self,
* args )

◆ is_float()

"bool" is_float ( self,
* args )

◆ is_floating()

"bool" is_floating ( self,
* args )

◆ is_forward_decl()

"bool" is_forward_decl ( self,
* args )

Forward declarations are placeholders: the type definition does not exist

◆ is_forward_enum()

"bool" is_forward_enum ( self,
* args )

◆ is_forward_struct()

"bool" is_forward_struct ( self,
* args )

◆ is_forward_union()

"bool" is_forward_union ( self,
* args )

◆ is_from_subtil()

"bool" is_from_subtil ( self,
* args )

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,
* args )

◆ is_funcptr()

"bool" is_funcptr ( self,
* args )

◆ is_high_func()

"bool" is_high_func ( self,
* args )

◆ is_int()

"bool" is_int ( self,
* args )

◆ is_int128()

"bool" is_int128 ( self,
* args )

◆ is_int16()

"bool" is_int16 ( self,
* args )

◆ is_int32()

"bool" is_int32 ( self,
* args )

◆ is_int64()

"bool" is_int64 ( self,
* args )

◆ is_integral()

"bool" is_integral ( self,
* args )

◆ is_ldouble()

"bool" is_ldouble ( self,
* args )

◆ is_manually_castable_to()

"bool" is_manually_castable_to ( self,
* args )
Parameters
targettinfo_t const &

◆ is_one_fpval()

"bool" is_one_fpval ( self,
* args )

◆ is_paf()

"bool" is_paf ( self,
* args )

◆ is_partial()

"bool" is_partial ( self,
* args )

◆ is_ptr()

"bool" is_ptr ( self,
* args )

◆ is_ptr_or_array()

"bool" is_ptr_or_array ( self,
* args )

◆ is_purging_cc()

"bool" is_purging_cc ( self,
* args )

◆ is_pvoid()

"bool" is_pvoid ( self,
* args )

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

◆ is_scalar()

"bool" is_scalar ( self,
* args )

◆ is_shifted_ptr()

"bool" is_shifted_ptr ( self,
* args )

◆ is_signed()

"bool" is_signed ( self,
* args )

◆ is_small_udt()

"bool" is_small_udt ( self,
* args )

◆ is_sse_type()

"bool" is_sse_type ( self,
* args )

◆ is_struct()

"bool" is_struct ( self,
* args )

◆ is_sue()

"bool" is_sue ( self,
* args )

◆ is_tbyte()

"bool" is_tbyte ( self,
* args )

◆ is_typedef()

"bool" is_typedef ( self,
* args )

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

◆ is_typeref()

"bool" is_typeref ( self,
* args )

◆ is_uchar()

"bool" is_uchar ( self,
* args )

◆ is_udt()

"bool" is_udt ( self,
* args )

◆ is_uint()

"bool" is_uint ( self,
* args )

◆ is_uint128()

"bool" is_uint128 ( self,
* args )

◆ is_uint16()

"bool" is_uint16 ( self,
* args )

◆ is_uint32()

"bool" is_uint32 ( self,
* args )

◆ is_uint64()

"bool" is_uint64 ( self,
* args )

◆ is_union()

"bool" is_union ( self,
* args )

◆ is_unknown()

"bool" is_unknown ( self,
* args )

◆ is_unsigned()

"bool" is_unsigned ( self,
* args )

◆ is_user_cc()

"bool" is_user_cc ( self,
* args )

◆ is_vararg_cc()

"bool" is_vararg_cc ( self,
* args )

◆ is_varmember()

"bool" is_varmember ( self,
* args )

◆ is_varstruct()

"bool" is_varstruct ( self,
* args )

◆ is_vftable()

"bool" is_vftable ( self,
* args )

◆ is_void()

"bool" is_void ( self,
* args )

◆ is_volatile()

"bool" is_volatile ( self,
* args )

◆ is_well_defined()

"bool" is_well_defined ( self,
* args )

◆ parse()

"bool" parse ( self,
* args )
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,
* args )

◆ read_bitfield_value()

"uint64" read_bitfield_value ( self,
* args )
Parameters
vuint64
bitoffint

◆ remove_ptr_or_array()

"bool" remove_ptr_or_array ( self,
* args )

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,
* args )
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_type()

"tinfo_code_t" rename_type ( self,
* args )
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,
* args )

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,
* args )
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,
* args )

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,
* args )

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,
* args )

◆ set_declalign()

"bool" set_declalign ( self,
* args )
Parameters
declalignuchar

◆ set_edm_cmt()

"tinfo_code_t" set_edm_cmt ( self,
* args )

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_repr()

"tinfo_code_t" set_enum_repr ( self,
* args )
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,
* args )
Parameters
sign(C++: type_sign_t)
etf_flags(C++: uint) etf_flag_t

◆ set_enum_width()

"tinfo_code_t" set_enum_width ( self,
* args )
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_methods()

"bool" set_methods ( self,
* args )
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,
* args )
Parameters
modtype_t

◆ set_named_type()

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

◆ set_numbered_type()

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

◆ set_symbol_type()

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

◆ set_type_alias()

"bool" set_type_alias ( self,
* args )

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,
* args )
Parameters
declalign(C++: uchar)
etf_flags(C++: uint)

◆ set_type_cmt()

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

◆ set_udm_cmt()

"tinfo_code_t" set_udm_cmt ( self,
* args )

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,
* args )
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,
* args )
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,
* args )

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,
* args )

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,
* args )

◆ swap()

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

◆ write_bitfield_value()

"uint64" write_bitfield_value ( self,
* args )
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

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: