IDA C++ SDK 9.2
|
Primary mechanism for managing type information. More...
#include <typeinf.hpp>
Public Types | |
enum | bitmask_cvt_stance_t { ENUMBM_OFF = 0 , ENUMBM_ON = 1 , ENUMBM_AUTO = 2 } |
Set or clear the 'bitmask' attribute of an enum. More... |
Public Member Functions | |
tinfo_t () | |
Constructor. | |
tinfo_t (type_t decl_type) | |
Constructor - can only be used to initialize simple types! | |
tinfo_t (const char *decl, til_t *til=nullptr, int pt_flags=0) | |
Constructor - will attempt to parse the provided C declaration. | |
tinfo_t (const tinfo_t &r) | |
Constructor. | |
tinfo_t & | operator= (const tinfo_t &r) |
Copy contents of given tinfo into this one. | |
~tinfo_t () | |
Destructor. | |
void | clear () |
Clear contents of this tinfo, and remove from the type system. | |
void | swap (tinfo_t &r) |
Assign this = r and r = this. | |
DEFINE_MEMORY_ALLOCATION_FUNCS () inline bool get_named_type(const til_t *til | |
Create a tinfo_t object for an existing named type. | |
bool | get_named_type (const char *name, type_t decl_type=BTF_TYPEDEF, bool resolve=true, bool try_ordinal=true) |
bool | get_numbered_type (const til_t *til, uint32 ordinal, type_t decl_type=BTF_TYPEDEF, bool resolve=true) |
Create a tinfo_t object for an existing ordinal type. | |
bool | get_numbered_type (uint32 ordinal, type_t decl_type=BTF_TYPEDEF, bool resolve=true) |
bool | detach () |
Detach tinfo_t from the underlying type. | |
bool | serialize (qtype *type, qtype *fields=nullptr, qtype *fldcmts=nullptr, int sudt_flags=SUDT_FAST|SUDT_TRUNC) const |
Serialize tinfo_t object into a type string. | |
bool | deserialize (const til_t *til, const type_t **ptype, const p_list **pfields=nullptr, const p_list **pfldcmts=nullptr, const char *cmt=nullptr) |
Deserialize a type string into a tinfo_t object. | |
bool | deserialize (const til_t *til, const qtype *ptype, const qtype *pfields=nullptr, const qtype *pfldcmts=nullptr, const char *cmt=nullptr) |
Deserialize a type string into a tinfo_t object. | |
bool | is_correct () const |
Is the type object correct? | |
type_t | get_realtype (bool full=false) const |
Get the resolved base type. | |
THREAD_SAFE type_t | get_decltype () const |
Get declared type (without resolving type references; they are returned as is). | |
THREAD_SAFE bool | empty () const |
Was tinfo_t initialized with some type info or not? | |
bool | present () const |
Is the type really present? (not a reference to a missing type, for example) | |
size_t | get_size (uint32 *p_effalign=nullptr, int gts_code=0) const |
Get the type size in bytes. | |
size_t | get_unpadded_size () const |
Get the type size in bytes without the final padding, in bytes. | |
uint32 | get_alignment () const |
Get type alignment This function returns the effective type alignment. | |
type_sign_t | get_sign () const |
Get type sign. | |
bool | is_signed () const |
Is this a signed type? | |
bool | is_unsigned () const |
Is this an unsigned type? | |
uchar | get_declalign () const |
Get declared alignment of the type. | |
THREAD_SAFE bool | is_typeref () const |
Is this type a type reference?. | |
THREAD_SAFE bool | has_details () const |
Does this type refer to a nontrivial type? | |
bool | get_type_name (qstring *out) const |
Does a type refer to a name? | |
bool | get_nice_type_name (qstring *out) const |
Get the beautified type name. | |
tinfo_code_t | rename_type (const char *name, int ntf_flags=0) |
Rename a type. | |
bool | get_final_type_name (qstring *out) const |
Use in the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn). | |
bool | get_next_type_name (qstring *out) const |
Use In the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn). | |
tid_t | get_tid () const |
Get the type tid Each type in the local type library has a so-called tid associated with it. | |
tid_t | force_tid () |
Get the type tid. | |
uint32 | get_ordinal () const |
Get type ordinal (only if the type was created as a numbered type, 0 if none) | |
uint32 | get_final_ordinal () const |
Get final type ordinal (0 if none) | |
til_t * | get_til () const |
Get the type library for tinfo_t. | |
bool | is_from_subtil () const |
Was the named type found in some base type library (not the top level type library)? | |
bool | is_forward_decl () const |
Is this a forward declaration? | |
type_t | get_forward_type () const |
Get type of a forward declaration. | |
bool | is_forward_struct () const |
bool | is_forward_union () const |
bool | is_forward_enum () const |
bool | is_typedef () const |
Is this a typedef? | |
int | get_type_cmt (qstring *out) const |
Get type comment. | |
bool | get_type_rptcmt (qstring *out) const |
Get type comment only if it is repeatable. | |
THREAD_SAFE bool | is_decl_const () const |
is_type_const(get_decltype()) | |
THREAD_SAFE bool | is_decl_volatile () const |
is_type_volatile(get_decltype()) | |
THREAD_SAFE bool | is_decl_void () const |
is_type_void(get_decltype()) | |
THREAD_SAFE bool | is_decl_partial () const |
is_type_partial(get_decltype()) | |
THREAD_SAFE bool | is_decl_unknown () const |
is_type_unknown(get_decltype()) | |
THREAD_SAFE bool | is_decl_last () const |
is_typeid_last(get_decltype()) | |
THREAD_SAFE bool | is_decl_ptr () const |
is_type_ptr(get_decltype()) | |
THREAD_SAFE bool | is_decl_array () const |
is_type_array(get_decltype()) | |
THREAD_SAFE bool | is_decl_func () const |
is_type_func(get_decltype()) | |
THREAD_SAFE bool | is_decl_complex () const |
is_type_complex(get_decltype()) | |
THREAD_SAFE bool | is_decl_typedef () const |
is_type_typedef(get_decltype()) | |
THREAD_SAFE bool | is_decl_sue () const |
is_type_sue(get_decltype()) | |
THREAD_SAFE bool | is_decl_struct () const |
is_type_struct(get_decltype()) | |
THREAD_SAFE bool | is_decl_union () const |
is_type_union(get_decltype()) | |
THREAD_SAFE bool | is_decl_udt () const |
is_type_struni(get_decltype()) | |
THREAD_SAFE bool | is_decl_enum () const |
is_type_enum(get_decltype()) | |
THREAD_SAFE bool | is_decl_bitfield () const |
is_type_bitfld(get_decltype()) | |
THREAD_SAFE bool | is_decl_int128 () const |
is_type_int128(get_decltype()) | |
THREAD_SAFE bool | is_decl_int64 () const |
is_type_int64(get_decltype()) | |
THREAD_SAFE bool | is_decl_int32 () const |
is_type_int32(get_decltype()) | |
THREAD_SAFE bool | is_decl_int16 () const |
is_type_int16(get_decltype()) | |
THREAD_SAFE bool | is_decl_int () const |
is_type_int(get_decltype()) | |
THREAD_SAFE bool | is_decl_char () const |
is_type_char(get_decltype()) | |
THREAD_SAFE bool | is_decl_uint () const |
is_type_uint(get_decltype()) | |
THREAD_SAFE bool | is_decl_uchar () const |
is_type_uchar(get_decltype()) | |
THREAD_SAFE bool | is_decl_uint16 () const |
is_type_uint16(get_decltype()) | |
THREAD_SAFE bool | is_decl_uint32 () const |
is_type_uint32(get_decltype()) | |
THREAD_SAFE bool | is_decl_uint64 () const |
is_type_uint64(get_decltype()) | |
THREAD_SAFE bool | is_decl_uint128 () const |
is_type_uint128(get_decltype()) | |
THREAD_SAFE bool | is_decl_ldouble () const |
is_type_ldouble(get_decltype()) | |
THREAD_SAFE bool | is_decl_double () const |
is_type_double(get_decltype()) | |
THREAD_SAFE bool | is_decl_float () const |
is_type_float(get_decltype()) | |
THREAD_SAFE bool | is_decl_tbyte () const |
is_type_tbyte(get_decltype()) | |
THREAD_SAFE bool | is_decl_floating () const |
is_type_floating(get_decltype()) | |
THREAD_SAFE bool | is_decl_bool () const |
is_type_bool(get_decltype()) | |
THREAD_SAFE bool | is_decl_paf () const |
is_type_paf(get_decltype()) | |
THREAD_SAFE bool | is_well_defined () const |
!(empty()) && !(is_decl_partial()) && !(is_punknown()) | |
bool | is_const () const |
is_type_const(get_realtype()) | |
bool | is_volatile () const |
is_type_volatile(get_realtype()) | |
bool | is_void () const |
is_type_void(get_realtype()) | |
bool | is_partial () const |
is_type_partial(get_realtype()) | |
bool | is_unknown () const |
is_type_unknown(get_realtype()) | |
bool | is_ptr () const |
is_type_ptr(get_realtype()) | |
bool | is_array () const |
is_type_array(get_realtype()) | |
bool | is_func () const |
is_type_func(get_realtype()) | |
bool | is_complex () const |
is_type_complex(get_realtype()) | |
bool | is_struct () const |
is_type_struct(get_realtype()) | |
bool | is_union () const |
is_type_union(get_realtype()) | |
bool | is_udt () const |
is_type_struni(get_realtype()) | |
bool | is_enum () const |
is_type_enum(get_realtype()) | |
bool | is_sue () const |
is_type_sue(get_realtype()) | |
bool | is_bitfield () const |
is_type_bitfld(get_realtype()) | |
bool | is_int128 () const |
is_type_int128(get_realtype()) | |
bool | is_int64 () const |
is_type_int64(get_realtype()) | |
bool | is_int32 () const |
is_type_int32(get_realtype()) | |
bool | is_int16 () const |
is_type_int16(get_realtype()) | |
bool | is_int () const |
is_type_int(get_realtype()) | |
bool | is_char () const |
is_type_char(get_realtype()) | |
bool | is_uint () const |
is_type_uint(get_realtype()) | |
bool | is_uchar () const |
is_type_uchar(get_realtype()) | |
bool | is_uint16 () const |
is_type_uint16(get_realtype()) | |
bool | is_uint32 () const |
is_type_uint32(get_realtype()) | |
bool | is_uint64 () const |
is_type_uint64(get_realtype()) | |
bool | is_uint128 () const |
is_type_uint128(get_realtype()) | |
bool | is_ldouble () const |
is_type_ldouble(get_realtype()) | |
bool | is_double () const |
is_type_double(get_realtype()) | |
bool | is_float () const |
is_type_float(get_realtype()) | |
bool | is_tbyte () const |
is_type_tbyte(get_realtype()) | |
bool | is_bool () const |
is_type_bool(get_realtype()) | |
bool | is_paf () const |
is_type_paf(get_realtype()) | |
bool | is_ptr_or_array () const |
is_type_ptr_or_array(get_realtype()) | |
bool | is_integral () const |
is_type_integral(get_realtype()) | |
bool | is_ext_integral () const |
is_type_ext_integral(get_realtype()) | |
bool | is_floating () const |
is_type_floating(get_realtype()) | |
bool | is_arithmetic () const |
is_type_arithmetic(get_realtype()) | |
bool | is_ext_arithmetic () const |
is_type_ext_arithmetic(get_realtype()) | |
bool | is_scalar () const |
Does the type represent a single number? | |
bool | get_ptr_details (ptr_type_data_t *pi) const |
Get the pointer info. | |
bool | get_array_details (array_type_data_t *ai) const |
Get the array specific info. | |
bool | get_enum_details (enum_type_data_t *ei) const |
Get the enum specific info. | |
bool | get_bitfield_details (bitfield_type_data_t *bi) const |
Get the bitfield specific info. | |
bool | get_udt_details (udt_type_data_t *udt, gtd_udt_t gtd=GTD_CALC_LAYOUT) const |
Get the udt specific info. | |
bool | get_func_details (func_type_data_t *fi, gtd_func_t gtd=GTD_CALC_ARGLOCS) const |
Get only the function specific info for this tinfo_t. | |
bool | is_funcptr () const |
Is this pointer to a function? | |
bool | is_shifted_ptr () const |
Is a shifted pointer? | |
bool | is_varstruct () const |
Is a variable-size structure? | |
bool | is_varmember () const |
Can the type be of a variable struct member? | |
int | get_ptrarr_objsize () const |
BT_PTR & BT_ARRAY: get size of pointed object or array element. On error returns -1 | |
tinfo_t | get_ptrarr_object () const |
BT_PTR & BT_ARRAY: get the pointed object or array element. | |
tinfo_t | get_pointed_object () const |
BT_PTR: get type of pointed object. | |
bool | is_pvoid () const |
Is "void *"?. This function does not check the pointer attributes and type modifiers. | |
bool | is_punknown () const |
Is "_UNKNOWN *"?. This function does not check the pointer attributes and type modifiers. | |
tinfo_t | get_array_element () const |
BT_ARRAY: get type of array element. See also get_ptrarr_object() | |
tinfo_t | get_final_element () const |
repeat recursively: if an array, return the type of its element; else return the type itself. | |
int | get_array_nelems () const |
BT_ARRAY: get number of elements (-1 means error) | |
tinfo_t | get_nth_arg (int n) const |
BT_FUNC or BT_PTR BT_FUNC: Get type of n-th arg (-1 means return type, see get_rettype()) | |
tinfo_t | get_rettype () const |
BT_FUNC or BT_PTR BT_FUNC: Get the function's return type | |
int | get_nargs () const |
BT_FUNC or BT_PTR BT_FUNC: Calculate number of arguments (-1 - error) | |
callcnv_t | get_cc () const |
BT_FUNC or BT_PTR BT_FUNC: Get calling convention | |
bool | is_user_cc () const |
is_user_cc(get_cc()) | |
bool | is_vararg_cc () const |
is_vararg_cc(get_cc()) | |
bool | is_purging_cc () const |
is_purging_cc(get_cc()) | |
int | calc_purged_bytes () const |
BT_FUNC: Calculate number of purged bytes | |
bool | is_high_func () const |
BT_FUNC: Is high level type? | |
bool | get_methods (udtmembervec_t *methods) const |
BT_COMPLEX: get a list of member functions declared in this udt. | |
bool | get_bit_buckets (range64vec_t *buckets) const |
::BT_STRUCT: get bit buckets Bit buckets are used to layout bitfields | |
int | find_udm (udm_t *udm, int strmem_flags) const |
BTF_STRUCT,BTF_UNION: Find a udt member. | |
int | find_udm (uint64 offset, int strmem_flags=0) const |
BTF_STRUCT,BTF_UNION: Find an udt member at the specified offset | |
int | find_udm (const char *name, int strmem_flags=0) const |
BTF_STRUCT,BTF_UNION: Find an udt member by name | |
int | get_udm (udm_t *out, const char *name) const |
Retrieve a structure/union member with the specified name. | |
int | get_udm (udm_t *out, size_t index) const |
Retrieve a structure/union member with the specified index. | |
int | get_udm_by_offset (udm_t *out, uint64 offset) const |
Retrieve a structure/union member with the specified offset. | |
int | get_udt_nmembers () const |
Get number of udt members. -1-error. | |
bool | is_empty_udt () const |
Is an empty struct/union? (has no fields) | |
bool | is_small_udt () const |
Is a small udt? (can fit a register or a pair of registers) | |
uint32 | get_udt_taudt_bits () const |
Get udt_type_data_t::taudt_bits. | |
bool | is_unaligned_struct () const |
Is an unaligned struct. | |
bool | is_msstruct () const |
Is gcc msstruct attribute applied. | |
bool | is_cpp_struct () const |
Is a c++ object, not simple pod type. | |
bool | is_vftable () const |
Is a vftable type? | |
bool | is_fixed_struct () const |
Is a structure with fixed offsets? | |
bool | is_tuple () const |
Is a tuple? | |
bool | requires_qualifier (qstring *out, const char *name, uint64 offset) const |
Requires full qualifier? | |
bool | append_covered (rangeset_t *out, uint64 offset=0) const |
Calculate set of covered bytes for the type. | |
bool | calc_gaps (rangeset_t *out) const |
Calculate set of padding bytes for the type. | |
bool | is_one_fpval () const |
Floating value or an object consisting of one floating member entirely. | |
bool | is_sse_type () const |
Is a SSE vector type? | |
bool | is_anonymous_udt () const |
Is an anonymous struct/union? | |
bool | has_vftable () const |
Has a vftable? | |
bool | has_union () const |
Has a member of type "union"? | |
size_t | get_enum_nmembers () const |
Get number of enum members. | |
bool | is_empty_enum () const |
Is an empty enum? (has no constants) | |
type_t | get_enum_base_type () const |
Get enum base type (convert enum to integer type) Returns BT_UNK if failed to convert. | |
bool | is_bitmask_enum () const |
Is bitmask enum? | |
int | get_enum_radix () const |
Get enum constant radix. | |
tinfo_code_t | get_enum_repr (value_repr_t *repr) const |
Set the representation of enum members. | |
int | get_enum_width () const |
Get enum width. | |
uint64 | calc_enum_mask () const |
ssize_t | get_edm (edm_t *out, const char *name) const |
Get enum member by its name. | |
tinfo_code_t | get_edm (edm_t *edm, size_t idx) const |
Get enum member by its index. | |
ssize_t | get_edm_by_value (edm_t *out, uint64 value, bmask64_t bmask=DEFMASK64, uchar serial=0) const |
Get enum member by its value. | |
tid_t | get_edm_tid (size_t idx) const |
Get enum member TID. | |
tinfo_t | get_onemember_type () const |
For objects consisting of one member entirely: return type of the member. | |
tinfo_t | get_innermost_udm (uint64 bitoffset, size_t *out_index=nullptr, uint64 *out_bitoffset=nullptr) const |
Get the innermost member at the given offset. | |
tinfo_t | get_innermost_member_type (uint64 bitoffset, uint64 *out_bitoffset=nullptr) const |
Get the innermost member type at the given offset. | |
uint32 | calc_score () const |
Calculate the type score (the higher - the nicer is the type) | |
bool | print (qstring *out, const char *name=nullptr, int prtype_flags=PRTYPE_1LINE, int indent=0, int cmtindent=0, const char *prefix=nullptr, const char *cmt=nullptr) const |
Get a C-like string representation of the type. | |
const char * | dstr () const |
Function to facilitate debugging. | |
bool | get_attrs (type_attrs_t *tav, bool all_attrs=false) const |
Get type attributes (all_attrs: include attributes of referenced types, if any) | |
bool | get_attr (const qstring &key, bytevec_t *bv, bool all_attrs=true) const |
Get a type attribute. | |
bool | set_attrs (type_attrs_t *tav) |
Set type attributes. | |
bool | set_attr (const type_attr_t &ta, bool may_overwrite=true) |
Set a type attribute. If necessary, a new typid will be created. | |
void | del_attrs () |
Del all type attributes. typerefs cannot be modified by this function. | |
bool | del_attr (const qstring &key, bool make_copy=true) |
Del a type attribute. typerefs cannot be modified by this function. | |
bool | create_simple_type (type_t decl_type) |
bool | create_ptr (const ptr_type_data_t &p, type_t decl_type=BT_PTR) |
bool | create_array (const array_type_data_t &p, type_t decl_type=BT_ARRAY) |
bool | create_bitfield (const bitfield_type_data_t &p, type_t decl_type=BT_BITFIELD) |
bool | create_typedef (const typedef_type_data_t &p, type_t decl_type=BTF_TYPEDEF, bool try_ordinal=true) |
bool | parse (const char *decl, til_t *til=nullptr, int pt_flags=0) |
Convenience function to parse a string with a type declaration. | |
bool | create_udt (bool is_union=false) |
Create an empty structure/union. | |
bool | create_enum (bte_t bte=BTE_ALWAYS|BTE_HEX) |
Create an empty enum. | |
ssize_t | get_by_edm_name (const char *mname, const til_t *til=nullptr) |
Retrieve enum tinfo using enum member name. | |
tinfo_code_t | create_forward_decl (til_t *til, type_t decl_type, const char *name, int ntf_flags=0) |
Create a forward declaration. | |
bool | convert_array_to_ptr () |
Convert an array into a pointer. | |
bool | remove_ptr_or_array () |
Replace the current type with the ptr obj or array element. | |
tinfo_code_t | set_type_alignment (uchar declalign, uint etf_flags=0) |
Set type alignment. | |
DEPRECATED bool | set_declalign (uchar declalign) |
bool | change_sign (type_sign_t sign) |
Change the type sign. Works only for the types that may have sign. | |
bool | calc_udt_aligns (int sudt_flags=SUDT_GAPS) |
Calculate the udt alignments using the field offsets/sizes and the total udt size This function does not work on typerefs. | |
bool | set_methods (udtmembervec_t &methods) |
BT_COMPLEX: set the list of member functions. | |
tinfo_code_t | set_type_cmt (const char *cmt, bool is_regcmt=false, uint etf_flags=0) |
Set type comment This function works only for non-trivial types. | |
uint32 | get_alias_target () const |
Get type alias If the type has no alias, return 0. | |
bool | is_aliased () const |
bool | set_type_alias (uint32 dest_ord) |
Set type alias Redirects all references to source type to the destination type. | |
tinfo_code_t | set_udt_alignment (int sda, uint etf_flags=0) |
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 (int pack, uint etf_flags=0) |
Set structure packing. | |
tid_t | get_udm_tid (size_t idx) const |
Get udt member TID. | |
tinfo_code_t | add_udm (const udm_t &udm, uint etf_flags=0, size_t times=1, ssize_t idx=-1) |
Add a structure/union member. | |
tinfo_code_t | add_udm (const char *name, const tinfo_t &type, uint64 offset=0, uint etf_flags=0, size_t times=1, ssize_t idx=-1) |
Add a structure/union member. | |
tinfo_code_t | add_udm (const char *name, type_t type, uint64 offset=0, uint etf_flags=0, size_t times=1, ssize_t idx=-1) |
Add a structure/union member. | |
tinfo_code_t | add_udm (const char *name, const char *type, uint64 offset=0, uint etf_flags=0, size_t times=1, ssize_t idx=-1) |
Add a structure/union member. | |
tinfo_code_t | del_udm (size_t index, uint etf_flags=0) |
Delete a structure/union member. | |
tinfo_code_t | del_udms (size_t idx1, size_t idx2, uint etf_flags=0) |
Delete structure/union members in the range [idx1, idx2) | |
tinfo_code_t | rename_udm (size_t index, const char *name, uint etf_flags=0) |
Rename a structure/union member. | |
tinfo_code_t | set_udm_type (size_t index, const tinfo_t &tif, uint etf_flags=0, const value_repr_t *repr=nullptr) |
Set type of a structure/union member. | |
tinfo_code_t | set_udm_cmt (size_t index, const char *cmt, bool is_regcmt=false, uint etf_flags=0) |
Set a comment for a structure/union member. | |
tinfo_code_t | set_udm_repr (size_t index, const value_repr_t &repr, uint etf_flags=0) |
Set the representation of a structure/union member. | |
bool | is_udm_by_til (size_t idx) const |
Was the member created due to the type system. | |
tinfo_code_t | set_udm_by_til (size_t idx, bool on=true, uint etf_flags=0) |
The member is created due to the type system. | |
tinfo_code_t | set_fixed_struct (bool on=true) |
Declare struct member offsets as fixed. | |
tinfo_code_t | set_struct_size (size_t new_size) |
Explicitly specify the struct size. | |
tinfo_code_t | expand_udt (size_t idx, adiff_t delta, uint etf_flags=0) |
Expand/shrink a structure by adding/removing a gap before the specified member. | |
tinfo_code_t | set_tuple (bool on=true) |
Declare struct as a tuple. | |
bool | get_func_frame (const func_t *pfn) |
Create a tinfo_t object for the function frame. | |
bool | is_frame () const |
Is a function frame? | |
ea_t | get_frame_func () const |
Get function address for the frame. | |
ssize_t | get_stkvar (sval_t *actval, const insn_t &insn, const op_t *x, sval_t v) |
Retrieve frame tinfo for a stack variable. | |
tinfo_code_t | set_enum_width (int nbytes, uint etf_flags=0) |
Set the width of enum base type. | |
tinfo_code_t | set_enum_sign (type_sign_t sign, uint etf_flags=0) |
Set enum sign. | |
tinfo_code_t | set_enum_is_bitmask (bitmask_cvt_stance_t stance=ENUMBM_ON, uint etf_flags=0) |
tinfo_code_t | set_enum_repr (const value_repr_t &repr, uint etf_flags=0) |
Set the representation of enum members. | |
tinfo_code_t | set_enum_radix (int radix, bool sign, uint etf_flags=0) |
Set enum radix to display constants. | |
tinfo_code_t | add_edm (const edm_t &edm, bmask64_t bmask=DEFMASK64, uint etf_flags=0, ssize_t idx=-1) |
Add a new enum member (a new symbolic constant) | |
tinfo_code_t | add_edm (const char *name, uint64 value, bmask64_t bmask=DEFMASK64, uint etf_flags=0, ssize_t idx=-1) |
Add a new enum member (a new symbolic constant) | |
tinfo_code_t | del_edms (size_t idx1, size_t idx2, uint etf_flags=0) |
Delete enum members. | |
tinfo_code_t | del_edm (size_t idx, uint etf_flags=0) |
tinfo_code_t | del_edm (const char *name, uint etf_flags=0) |
Delete enum member by its name. | |
tinfo_code_t | del_edm_by_value (uint64 value, uint etf_flags=0, bmask64_t bmask=DEFMASK64, uchar serial=0) |
Delete enum member by its value. | |
tinfo_code_t | rename_edm (size_t idx, const char *name, uint etf_flags=0) |
Rename a enum member. | |
tinfo_code_t | set_edm_cmt (size_t idx, const char *cmt, uint etf_flags=0) |
Set a comment for an enum member. | |
tinfo_code_t | edit_edm (size_t idx, uint64 value, bmask64_t bmask=DEFMASK64, uint etf_flags=0) |
Change constant value and/or bitmask. | |
tinfo_code_t | rename_funcarg (size_t index, const char *name, uint etf_flags=0) |
Rename a function argument. | |
tinfo_code_t | set_funcarg_type (size_t index, const tinfo_t &tif, uint etf_flags=0) |
Set type of a function argument. | |
tinfo_code_t | set_func_rettype (const tinfo_t &tif, uint etf_flags=0) |
Set function return type . | |
tinfo_code_t | del_funcargs (size_t idx1, size_t idx2, uint etf_flags=0) |
Delete function arguments. | |
tinfo_code_t | del_funcarg (size_t idx, uint etf_flags=0) |
tinfo_code_t | add_funcarg (const funcarg_t &farg, uint etf_flags=0, ssize_t idx=-1) |
Add a function argument. | |
tinfo_code_t | set_func_cc (callcnv_t cc, uint etf_flags=0) |
Set function calling convention. | |
tinfo_code_t | set_funcarg_loc (size_t index, const argloc_t &argloc, uint etf_flags=0) |
Set location of a function argument. | |
tinfo_code_t | set_func_retloc (const argloc_t &argloc, uint etf_flags=0) |
Set location of function return value. | |
DECLARE_COMPARISONS (tinfo_t) | |
bool | compare_with (const tinfo_t &r, int tcflags=0) const |
Compare two types, based on given flags (see tinfo_t comparison flags) | |
bool | equals_to (const tinfo_t &r) const |
bool | is_castable_to (const tinfo_t &target) const |
bool | is_manually_castable_to (const tinfo_t &target) const |
Convenience functions | |
bool | create_ptr (const tinfo_t &tif, uchar bps=0, type_t decl_type=BT_PTR) |
bool | create_array (const tinfo_t &tif, uint32 nelems=0, uint32 base=0, type_t decl_type=BT_ARRAY) |
void | create_typedef (const til_t *til, const char *name, type_t decl_type=BTF_TYPEDEF, bool try_ordinal=true) |
void | create_typedef (const til_t *til, uint ord, type_t decl_type=BTF_TYPEDEF) |
bool | create_bitfield (uchar nbytes, uchar width, bool is_unsigned=false, type_t decl_type=BT_BITFIELD) |
Warning | |
These functions consume 'p' (make it empty) | |
bool | create_udt (udt_type_data_t &p) |
bool | create_udt (udt_type_data_t &p, type_t decl_type) |
bool | create_enum (enum_type_data_t &p, type_t decl_type=BTF_ENUM) |
bool | create_func (func_type_data_t &p, type_t decl_type=BT_FUNC) |
ssize_t | get_udm_by_tid (udm_t *udm, tid_t tid) |
Retrive tinfo using type TID or struct/enum member MID. | |
ssize_t | get_edm_by_tid (edm_t *edm, tid_t tid) |
bool | get_type_by_tid (tid_t tid) |
Store type | |
Store the type info in the type library as a named or numbered type. The tinfo_t object will be replaced by a reference to the created type. Allowed bits for ntf_flags: #NTF_NOBASE, #NTF_REPLACE
| |
tinfo_code_t | set_named_type (til_t *til, const char *name, int ntf_flags=0) |
tinfo_code_t | set_symbol_type (til_t *til, const char *name, int ntf_flags=0) |
tinfo_code_t | set_numbered_type (til_t *til, uint32 ord, int ntf_flags=0, const char *name=nullptr) |
tinfo_code_t | save_type (int ntf_flags=NTF_TYPE|NTF_REPLACE) |
tinfo_code_t | copy_type (til_t *til, const char *name, int ntf_flags=NTF_TYPE|NTF_COPY) |
Bitfields | |
Helper functions to store/extract bitfield values | |
uint64 | read_bitfield_value (uint64 v, int bitoff) const |
uint64 | write_bitfield_value (uint64 dst, uint64 v, int bitoff) const |
Modifiers | |
Work with type modifiers: const and volatile | |
type_t | get_modifiers () const |
void | set_modifiers (type_t mod) |
void | set_const () |
void | set_volatile () |
void | clr_decl_const_volatile () |
bool | clr_const () |
bool | clr_volatile () |
bool | clr_const_volatile () |
Static Public Member Functions | |
static tinfo_t | get_stock (stock_type_id_t id) |
Get stock type information. |
Public Attributes | |
const char * | name |
const char type_t | decl_type =BTF_TYPEDEF |
const char type_t bool | resolve =true |
const char type_t bool bool | try_ordinal =true) |
Friends | |
tinfo_t | remove_pointer (const tinfo_t &tif) |
BT_PTR: If the current type is a pointer, return the pointed object. |
Primary mechanism for managing type information.
Set or clear the 'bitmask' attribute of an enum.
This attribute controls if the enum is considered as a collection of bits or a plain enum. Enums having the 'bitmask' attribute can be used to represent bitwise combination of the defined enum members.
stance | bitmask_cvt_stance_t |
etf_flags | etf_flag_t |
Each group starts with a mask member. Group size is the number of enum constants in it, including group mask. GROUP_SIZES contains the group sizes. Sum of GROUPS_SIZES is equal to number of enum constants. If value is the only value in a group, no need for additional mask value.
Enumerator | |
---|---|
ENUMBM_OFF | convert to ordinal enum |
ENUMBM_ON | convert to bitmask enum |
ENUMBM_AUTO | convert to bitmask if the outcome is nice and useful |
|
inline |
Constructor.
|
inlineexplicit |
Constructor - can only be used to initialize simple types!
|
inlineexplicit |
Constructor - will attempt to parse the provided C declaration.
|
inline |
Constructor.
|
inline |
Destructor.
Copy contents of given tinfo into this one.
|
inline |
Clear contents of this tinfo, and remove from the type system.
tinfo_t::DEFINE_MEMORY_ALLOCATION_FUNCS | ( | ) | const |
Create a tinfo_t object for an existing named type.
til | type library to use |
name | name of the type to link to |
decl_type | 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 | true: immediately resolve the type and return success code. false: return true but do not immediately resolve the type |
try_ordinal | true: try to replace name reference by an ordinal reference |
|
inline |
|
inline |
Create a tinfo_t object for an existing ordinal type.
til | type library to use |
ordinal | number of the type to link to |
decl_type | 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 | true: immediately resolve the type and return success code false: return true but do not immediately resolve the type |
|
inline |
|
inline |
|
inline |
Serialize tinfo_t object into a type string.
|
inline |
Deserialize a type string into a tinfo_t object.
|
inline |
Deserialize a type string into a tinfo_t object.
|
inline |
Is the type object correct?
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.
Get the resolved base type.
Deserialization options:
|
inline |
Get declared type (without resolving type references; they are returned as is).
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()
|
inline |
Was tinfo_t initialized with some type info or not?
|
inline |
Is the type really present? (not a reference to a missing type, for example)
|
inline |
Get the type size in bytes.
p_effalign | buffer for the alignment value |
gts_code | combination of GTS_... constants |
|
inline |
Get the type size in bytes without the final padding, in bytes.
For some UDTs get_unpadded_size() != get_size()
|
inline |
Get type alignment This function returns the effective type alignment.
Zero means error.
|
inline |
Get type sign.
|
inline |
Is this a signed type?
|
inline |
Is this an unsigned type?
|
inline |
Get declared alignment of the type.
|
inline |
Is this type a type reference?.
|
inline |
Does this type refer to a nontrivial type?
Does a type refer to a name?
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 the beautified type name.
Get the referenced name and apply regular expressions from goodname.cfg to beautify the name
|
inline |
Rename a type.
name | new type name |
ntf_flags | Flags for named types |
Use in the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn).
Use In the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn).
|
inline |
Get the type tid Each type in the local type library has a so-called tid associated with it.
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.
|
inline |
Get the type tid.
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()
|
inline |
Get type ordinal (only if the type was created as a numbered type, 0 if none)
|
inline |
Get final type ordinal (0 if none)
|
inline |
Was the named type found in some base type library (not the top level type library)?
If yes, it usually means that the type comes from some loaded type library, not the local type library for the database
|
inline |
Is this a forward declaration?
Forward declarations are placeholders: the type definition does not exist
|
inline |
Get type of a forward declaration.
For a forward declaration this function returns its base type. In other cases it returns BT_UNK
|
inline |
|
inline |
|
inline |
|
inline |
Is this a typedef?
This function will return true for a reference to a local type that is declared as a typedef.
|
inline |
Get type comment.
Get type comment only if it is repeatable.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
!(empty()) && !(is_decl_partial()) && !(is_punknown())
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Does the type represent a single number?
|
inline |
Get the pointer info.
|
inline |
Get the array specific info.
|
inline |
Get the enum specific info.
|
inline |
Get the bitfield specific info.
|
inline |
Get the udt specific info.
|
inline |
Get only the function specific info for this tinfo_t.
|
inline |
Is this pointer to a function?
|
inline |
Is a shifted pointer?
|
inline |
Is a variable-size structure?
|
inline |
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
|
inline |
|
inline |
|
inline |
BT_PTR: get type of pointed object.
If the current type is not a pointer, return empty type info. See also get_ptrarr_object() and remove_pointer()
|
inline |
Is "void *"?. This function does not check the pointer attributes and type modifiers.
|
inline |
Is "_UNKNOWN *"?. This function does not check the pointer attributes and type modifiers.
|
inline |
BT_ARRAY: get type of array element. See also get_ptrarr_object()
|
inline |
repeat recursively: if an array, return the type of its element; else return the type itself.
|
inline |
BT_ARRAY: get number of elements (-1 means error)
|
inline |
BT_FUNC or BT_PTR BT_FUNC: Get type of n-th arg (-1 means return type, see get_rettype())
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
BT_FUNC: Calculate number of purged bytes
|
inline |
BT_COMPLEX: get a list of member functions declared in this udt.
|
inline |
::BT_STRUCT: get bit buckets Bit buckets are used to layout bitfields
|
inline |
BTF_STRUCT,BTF_UNION: Find a udt member.
|
inline |
BTF_STRUCT,BTF_UNION: Find an udt member at the specified offset
|
inline |
BTF_STRUCT,BTF_UNION: Find an udt member by name
|
inline |
Retrieve a structure/union member with the specified name.
[out] | out | udm_t storage. Must not be nullptr |
name | member name. Must not be nullptr |
|
inline |
Retrieve a structure/union member with the specified index.
[out] | out | udm_t storage. Must not be nullptr |
index | the member index |
Retrieve a structure/union member with the specified offset.
[out] | out | udm_t storage. Must not be nullptr |
offset | member bit offset |
|
inline |
Get number of udt members. -1-error.
|
inline |
Is an empty struct/union? (has no fields)
|
inline |
Is a small udt? (can fit a register or a pair of registers)
|
inline |
|
inline |
Is an unaligned struct.
|
inline |
Is gcc msstruct attribute applied.
|
inline |
Is a c++ object, not simple pod type.
|
inline |
Is a vftable type?
|
inline |
Is a structure with fixed offsets?
|
inline |
Is a tuple?
Requires full qualifier?
(name is not unique)
[out] | out | qualifier. may be nullptr |
name | field name | |
offset | field offset in bits |
Calculate set of covered bytes for the type.
out | pointer to the output buffer. covered bytes will be appended to it. |
offset | delta in bytes to add to all calculations. used internally during recurion. |
|
inline |
Calculate set of padding bytes for the type.
out | pointer to the output buffer; old buffer contents will be lost. |
|
inline |
Floating value or an object consisting of one floating member entirely.
|
inline |
Is a SSE vector type?
|
inline |
Is an anonymous struct/union?
We assume that types with names are anonymous if the name starts with $
|
inline |
Has a vftable?
|
inline |
Has a member of type "union"?
|
inline |
Get number of enum members.
|
inline |
Is an empty enum? (has no constants)
|
inline |
Get enum base type (convert enum to integer type) Returns BT_UNK if failed to convert.
|
inline |
Is bitmask enum?
|
inline |
Get enum constant radix.
|
inline |
Set the representation of enum members.
repr | value_repr_t |
|
inline |
Get enum width.
|
inline |
Get enum member by its name.
[out] | out | enum type member, may be nullptr |
name | enum member name. Must not be nullptr |
|
inline |
Get enum member by its index.
[out] | edm | enum type member |
idx | enum member index |
|
inline |
Get enum member by its value.
[out] | out | enum type member, may be nullptr |
value | ||
serial | ||
bmask,in | case of DEFMASK64 the bitmask enum property is ignored |
|
inline |
Get enum member TID.
idx | enum member index |
|
inline |
For objects consisting of one member entirely: return type of the member.
|
inline |
Get the innermost member at the given offset.
bitoffset | bit offset into the structure | |
[out] | out_index | innermost member index |
[out] | out_bitoffset | remaining offset into the returned member |
udt | with the innermost member |
empty | type if it is not a struct type or OFFSET could not be found |
|
inline |
Get the innermost member type at the given offset.
bitoffset | bit offset into the structure | |
[out] | out_bitoffset | remaining offset |
the | innermost member type |
|
inline |
Calculate the type score (the higher - the nicer is the type)
|
inline |
Get a C-like string representation of the type.
out | output string |
name | name of type |
prtype_flags | Type printing flags |
indent | structure level indent |
cmtindent | comment indent |
prefix | string prepended to each line |
cmt | comment text (if specified, overrides the type comment) |
|
inline |
Function to facilitate debugging.
|
inline |
Get type attributes (all_attrs: include attributes of referenced types, if any)
Get a type attribute.
|
inline |
Set type attributes.
If necessary, a new typid will be created. this function modifies tav! (returns old attributes, if any)
|
inline |
Set a type attribute. If necessary, a new typid will be created.
|
inline |
Del all type attributes. typerefs cannot be modified by this function.
Del a type attribute. typerefs cannot be modified by this function.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Convenience function to parse a string with a type declaration.
decl | a type declaration |
til | type library to use |
pt_flags | combination of Type parsing flags bits |
|
inline |
Create an empty enum.
|
inline |
|
inline |
|
inline |
|
inline |
Retrive tinfo using type TID or struct/enum member MID.
tid | tid can denote a type tid or a member tid. |
udm[out] | place to save the found member to, may be nullptr |
edm[out] | place to save the found member to, may be nullptr |
Retrieve enum tinfo using enum member name.
til | type library |
mname | enum type member name |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Create a forward declaration.
decl_type: BTF_STRUCT, BTF_UNION, or BTF_ENUM
|
inlinestatic |
Get stock type information.
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).
|
inline |
Convert an array into a pointer.
type[] => type *
|
inline |
Replace the current type with the ptr obj or array element.
This function performs one of the following conversions:
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set type alignment.
|
inline |
Change the type sign. Works only for the types that may have sign.
|
inline |
Calculate the udt alignments using the field offsets/sizes and the total udt size This function does not work on typerefs.
|
inline |
BT_COMPLEX: set the list of member functions.
This function consumes 'methods' (makes it empty).
|
inline |
Set type comment This function works only for non-trivial types.
|
inline |
Get type alias If the type has no alias, return 0.
|
inline |
Set type alias Redirects all references to source type to the destination type.
This is equivalent to instantaneous replacement all references to srctype by dsttype.
|
inline |
Set declared structure alignment (sda) This alignment supersedes the alignment returned by get_declalign() and is really used when calculating the struct layout.
However, the effective structure alignment may differ from sda because of packing. The type editing functions (they accept etf_flags) may overwrite this attribute.
|
inline |
Set structure packing.
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.
|
inline |
Get udt member TID.
idx | the index of udt the member |
|
inline |
Add a structure/union member.
udm | member to add |
etf_flags | type changing flags flags |
times | how many times to add. if times > 1, the member name will be appended a suffix like "_2" and so on |
idx | 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. |
|
inline |
Add a structure/union member.
The member's size will be computed automatically.
name | Member name. Must not be nullptr or empty. |
type | Member type. Must not be empty. Can be any valid udt member type, like a pointer, array, etc. |
offset | Member offset in bits. It is the caller's responsibility to specify correct offsets. |
etf_flags | type changing flags flags |
times | how many times to add. if times > 1, the member name will be appended a suffix like "_2" and so on |
idx | 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. |
|
inline |
Add a structure/union member.
The member's type will be created from 'type', and its size will be computed automatically.
name | Member name. Must not be nullptr or empty. |
type | Member type. Can be only a simple type (integral/floating/bool). |
offset | Member offset in bits. It is the caller's responsibility to specify correct offsets. |
etf_flags | type changing flags flags |
times | how many times to add. if times > 1, the member name will be appended a suffix like "_2" and so on |
idx | 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. |
|
inline |
Add a structure/union member.
The member's type will be created by parsing 'type', and its size will be computed automatically.
name | Member name. Must not be nullptr or empty. |
type | Member type. A valid C type declaration. |
offset | Member offset in bits. It is the caller's responsibility to specify correct offsets. |
etf_flags | type changing flags flags |
times | how many times to add. if times > 1, the member name will be appended a suffix like "_2" and so on |
idx | 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. |
|
inline |
Delete a structure/union member.
|
inline |
Delete structure/union members in the range [idx1, idx2)
|
inline |
Rename a structure/union member.
The new name must be unique.
|
inline |
Set type of a structure/union member.
index | member index in the udm array |
tif | new type for the member |
etf_flags | etf_flag_t |
repr | new representation for the member (optional) |
|
inline |
Set a comment for a structure/union member.
A member may have just one comment, and it is either repeatable or regular.
|
inline |
Set the representation of a structure/union member.
|
inline |
Was the member created due to the type system.
idx | index of the member |
|
inline |
The member is created due to the type system.
idx | index of the member |
on | |
etf_flags | etf_flag_t |
|
inline |
Declare struct member offsets as fixed.
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).
on |
|
inline |
Explicitly specify the struct 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).
new_size | new structure size in bytes |
|
inline |
Expand/shrink a structure by adding/removing a gap before the specified member.
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.
idx | index of the member |
delta | number of bytes to add or remove |
etf_flags | etf_flag_t |
|
inline |
Declare struct as a tuple.
Currently, tuples in IDA behave the same way as structures but they are returned in a different manner from functions. Also, 2 different tuples having the same members are considered to be equal. This function works only with structures (not unions).
on |
Create a tinfo_t object for the function frame.
pfn | function |
|
inline |
Is a function frame?
|
inline |
Get function address for the frame.
|
inline |
Retrieve frame tinfo for a stack variable.
actval[out] | actual value used to fetch stack variable, this pointer may point to 'v', may be nullptr |
insn | the instruction |
x | reference to instruction operand, may be nullptr |
v | immediate value in the operand (usually x.addr) |
|
inline |
Set the width of enum base type.
nbytes | width of enum base type, allowed values: 0 (unspecified),1,2,4,8,16,32,64 |
etf_flags | etf_flag_t |
|
inline |
Set enum sign.
sign | type_sign_t |
etf_flags | etf_flag_t |
|
inline |
|
inline |
Set the representation of enum members.
repr | value_repr_t |
etf_flags | etf_flag_t |
|
inline |
Set enum radix to display constants.
radix | radix 2, 4, 8, 16, with the special case 1 to display as character |
sign | display as signed or unsigned |
etf_flags | etf_flag_t |
|
inline |
Add a new enum member (a new symbolic constant)
edm | the constant name, value, and comment |
bmask | bmask of the group to add the constant to |
etf_flags | etf_flag_t ETF_FORCENAME may be used in case of TERR_ALIEN_NAME |
idx | the index in the edm array where the new edm should be placed. if the specified index cannot be honored because it would spoil the edm sorting order, it is silently ignored. |
|
inline |
Add a new enum member (a new symbolic constant)
name | the constant name |
value | the constant value |
bmask | bmask of the group to add the constant to |
etf_flags | etf_flag_t ETF_FORCENAME may be used in case of TERR_ALIEN_NAME |
idx | the index in the edm array where the new edm should be placed. if the specified index cannot be honored because it would spoil the edm sorting order, it is silently ignored. |
|
inline |
Delete enum members.
idx1 | index in edmvec_t |
idx2 | index in edmvec_t or size_t(-1) |
etf_flags | etf_flag_t Delete enum members in [idx1, idx2) |
|
inline |
|
inline |
Delete enum member by its name.
name | the enumerator name (cannot be nullptr) |
etf_flags | etf_flag_t |
|
inline |
Delete enum member by its value.
value | the enumerator value |
etf_flags | etf_flag_t |
bmask,in | case of DEFMASK64 the bitmask enum property is ignored |
serial |
|
inline |
Rename a enum member.
idx | index in edmvec_t |
name | new name |
etf_flags | etf_flag_t ETF_FORCENAME may be used in case of TERR_ALIEN_NAME |
|
inline |
Set a comment for an enum member.
Such comments are always considered as repeatable.
idx | index in edmvec_t |
cmt | comment |
etf_flags | etf_flag_t |
|
inline |
Change constant value and/or bitmask.
idx | index in edmvec_t |
value | old or new value |
bmask | old or new bitmask |
etf_flags | etf_flag_t |
|
inline |
Rename a function argument.
The new name must be unique.
index | argument index in the function array |
name | new name |
etf_flags | etf_flag_t |
|
inline |
Set type of a function argument.
index | argument index in the function array |
tif | new type for the argument |
etf_flags | etf_flag_t |
|
inline |
Set function return type .
tif | new type for the return type |
etf_flags | etf_flag_t |
|
inline |
Delete function arguments.
idx1 | index in funcargvec_t |
idx2 | index in funcargvec_t or size_t(-1) |
etf_flags | etf_flag_t Delete function arguments in [idx1, idx2) |
|
inline |
|
inline |
Add a function argument.
farg | argument to add |
etf_flags | type changing flags flags |
idx | 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. |
|
inline |
Set function calling convention.
|
inline |
Set location of a function argument.
index | argument index in the function array |
argloc | new location for the argument |
etf_flags | etf_flag_t |
|
inline |
Set location of function return value.
argloc | new location for the return value |
etf_flags | etf_flag_t |
|
inline |
Compare two types, based on given flags (see tinfo_t comparison flags)
BT_PTR: If the current type is a pointer, return the pointed object.
If the current type is not a pointer, return the current type. See also get_ptrarr_object() and get_pointed_object()
const char* tinfo_t::name |
const char type_t tinfo_t::decl_type =BTF_TYPEDEF |