ida_typeinf
Type information in IDA.
In IDA, types are represented by and manipulated through tinfo_t objects.
A tinfo_t can represent a simple type (e.g., int, float), a complex type (a structure, enum, union, typedef), or even an array, or a function prototype.
The key types in this file are:
Constants
DEFMASK64: default bitmask 64bitsRESERVED_BYTE: multifunctional purposeTAH_BYTE: type attribute header byteFAH_BYTE: function argument attribute header byteMAX_DECL_ALIGNTAH_HASATTRS: has extended attributesTAUDT_UNALIGNED: struct: unaligned structTAUDT_MSSTRUCT: struct: gcc msstruct attributeTAUDT_CPPOBJ: struct: a c++ object, not simple pod typeTAUDT_VFTABLE: struct: is virtual function tableTAUDT_FIXED: struct: fixed field offsets, stored in serialized form; cannot be set for unionsTAUDT_TUPLE: tuple: tuples are like structs but are returned differently from functionsTAFLD_BASECLASS: field: do not include but inherit from the current fieldTAFLD_UNALIGNED: field: unaligned fieldTAFLD_VIRTBASE: field: virtual base (not supported yet)TAFLD_VFTABLE: field: ptr to virtual function tableTAFLD_METHOD: denotes a udt member functionTAFLD_GAP: field: gap member (displayed as padding in type details)TAFLD_REGCMT: field: the comment is regular (if not set, it is repeatable)TAFLD_FRAME_R: frame: function return address frame slotTAFLD_FRAME_S: frame: function saved registers frame slotTAFLD_BYTIL: field: was the member created due to the type systemTAPTR_PTR32: ptr: __ptr32TAPTR_PTR64: ptr: __ptr64TAPTR_RESTRICT: ptr: __restrictTAPTR_SHIFTED: ptr: __shifted(parent_struct, delta)TAENUM_64BIT: enum: store 64-bit valuesTAENUM_UNSIGNED: enum: unsignedTAENUM_SIGNED: enum: signedTAENUM_OCT: enum: octal representation, if BTE_HEXTAENUM_BIN: enum: binary representation, if BTE_HEX only one of OCT/BIN bits can be set. they are meaningful only if BTE_HEX is used.TAENUM_NUMSIGN: enum: signed representation, if BTE_HEXTAENUM_LZERO: enum: print numbers with leading zeroes (only for HEX/OCT/BIN)TAH_ALL: all defined bitscvarTYPE_BASE_MASK: the low 4 bits define the basic typeTYPE_FLAGS_MASK: type flags - they have different meaning depending on the basic typeTYPE_MODIF_MASK: modifiers.TYPE_FULL_MASK: basic type with type flagsBT_UNK: unknownBT_VOID: voidBTMT_SIZE0: BT_VOID - normal void; BT_UNK - don't useBTMT_SIZE12: size = 1 byte if BT_VOID; 2 if BT_UNKBTMT_SIZE48: size = 4 bytes if BT_VOID; 8 if BT_UNKBTMT_SIZE128: size = 16 bytes if BT_VOID; unknown if BT_UNK (IN struct alignment - see below)BT_INT8: __int8BT_INT16: __int16BT_INT32: __int32BT_INT64: __int64BT_INT128: __int128 (for alpha & future use)BT_INT: natural int. (size provided by idp module)BTMT_UNKSIGN: unknown signednessBTMT_SIGNED: signedBTMT_USIGNED: unsignedBTMT_UNSIGNEDBTMT_CHAR: specify char or segment registerBT_BOOL: boolBTMT_DEFBOOL: size is model specific or unknown(?)BTMT_BOOL1: size 1byteBTMT_BOOL2: size 2bytes - !inf_is_64bit()BTMT_BOOL8: size 8bytes - inf_is_64bit()BTMT_BOOL4: size 4bytesBT_FLOAT: floatBTMT_FLOAT: float (4 bytes)BTMT_DOUBLE: double (8 bytes)BTMT_LNGDBL: long double (compiler specific)BTMT_SPECFLT: float (variable size). if processor_t::use_tbyte() then use processor_t::tbyte_size, otherwise 2 bytesBT_PTR: pointer. has the following format: [db sizeof(ptr)]; [tah-typeattrs]; type_t...BTMT_DEFPTR: default for modelBTMT_NEAR: nearBTMT_FAR: farBTMT_CLOSURE: closure.BT_ARRAY: arrayBTMT_NONBASED: setBTMT_ARRESERV: reserved bitBT_FUNC: function. format:BTMT_DEFCALL: call method - default for model or unknownBTMT_NEARCALL: function returns by retnBTMT_FARCALL: function returns by retfBTMT_INTCALL: function returns by iret in this case cc MUST be 'unknown'BT_COMPLEX: struct/union/enum/typedef. format:BTMT_STRUCT: struct: MCNT records: type_t; [sdacl-typeattrs];BTMT_UNION: union: MCNT records: type_t...BTMT_ENUM: enum: next byte bte_t (see below) N records: de delta(s) OR blocks (see below)BTMT_TYPEDEF: named reference always p_string nameBT_BITFIELD: bitfield (only in struct) ['bitmasked' enum see below] next byte is dt ((size in bits << 1) | (unsigned ? 1 : 0))BTMT_BFLDI8: __int8BTMT_BFLDI16: __int16BTMT_BFLDI32: __int32BTMT_BFLDI64: __int64BT_RESERVED: RESERVED.BTM_CONST: constBTM_VOLATILE: volatileBTE_SIZE_MASK: storage size.BTE_RESERVED: must be 0, in order to distinguish from a tah-byteBTE_BITMASK: 'subarrays'. In this case ANY record has the following format:BTE_OUT_MASK: output style maskBTE_HEX: hexBTE_CHAR: char or hexBTE_SDEC: signed decimalBTE_UDEC: unsigned decimalBTE_ALWAYS: this bit MUST be presentBT_SEGREG: segment registerBT_UNK_BYTE: 1 byteBT_UNK_WORD: 2 bytesBT_UNK_DWORD: 4 bytesBT_UNK_QWORD: 8 bytesBT_UNK_OWORD: 16 bytesBT_UNKNOWN: unknown size - for parametersBTF_BYTE: byteBTF_UNK: unknownBTF_VOID: voidBTF_INT8: signed byteBTF_CHAR: signed charBTF_UCHAR: unsigned charBTF_UINT8: unsigned byteBTF_INT16: signed shortBTF_UINT16: unsigned shortBTF_INT32: signed intBTF_UINT32: unsigned intBTF_INT64: signed longBTF_UINT64: unsigned longBTF_INT128: signed 128-bit valueBTF_UINT128: unsigned 128-bit valueBTF_INT: int, unknown signednessBTF_UINT: unsigned intBTF_SINT: singed intBTF_BOOL: booleanBTF_FLOAT: floatBTF_DOUBLE: doubleBTF_LDOUBLE: long doubleBTF_TBYTE: see BTMT_SPECFLTBTF_STRUCT: structBTF_UNION: unionBTF_ENUM: enumBTF_TYPEDEF: typedefTA_ORG_TYPEDEF: the original typedef name (simple string)TA_ORG_ARRDIM: the original array dimension (pack_dd)TA_FORMAT: info about the 'format' argument. 3 times pack_dd: format_functype_t, argument number of 'format', argument number of '...'TA_VALUE_REPR: serialized value_repr_t (used for scalars and arrays)no_sign: no sign, or unknowntype_signed: signed typetype_unsigned: unsigned typeTIL_ZIP: pack buckets using zipTIL_MAC: til has macro tableTIL_ESI: extended sizeof info (short, long, longlong)TIL_UNI: universal til for any compilerTIL_ORD: type ordinal numbers are presentTIL_ALI: type aliases are present (this bit is used only on the disk)TIL_MOD: til has been modified, should be savedTIL_STM: til has extra streamsTIL_SLD: sizeof(long double)TIL_ECC: extended callcnv_tTIL_ADD_FAILED: see errbufTIL_ADD_OK: some tils were addedTIL_ADD_ALREADY: the base til was already addedCM_MASKCM_UNKNOWN: unknownCM_N8_F16: if sizeof(int)<=2: near 1 byte, far 2 bytesCM_N64: if sizeof(int)>2: near 8 bytes, far 8 bytesCM_N16_F32: near 2 bytes, far 4 bytesCM_N32_F48: near 4 bytes, far 6 bytesCM_M_MASKCM_M_NN: small: code=near, data=near (or unknown if CM_UNKNOWN)CM_M_FF: large: code=far, data=farCM_M_NF: compact: code=near, data=farCM_M_FN: medium: code=far, data=nearCM_CC_MASKCM_CC_INVALID: this value is invalidCM_CC_UNKNOWN: unknown calling conventionCM_CC_VOIDARG: function without arguments if has other cc and argnum == 0, represent as f() - unknown listCM_CC_CDECL: stackCM_CC_ELLIPSIS: cdecl + ellipsisCM_CC_STDCALL: stack, purgedCM_CC_PASCAL: stack, purged, reverse order of argsCM_CC_FASTCALL: stack, purged (x86), first args are in regs (compiler-dependent)CM_CC_THISCALL: stack, purged (x86), first arg is in reg (compiler-dependent)CM_CC_SWIFT: (Swift) arguments and return values in registers (compiler-dependent)CM_CC_SPOILED: This is NOT a cc! Mark of __spoil record the low nibble is count and after n {spoilreg_t} present real cm_t byte. if n == BFA_FUNC_MARKER, the next byte is the function attribute byte.CM_CC_GOLANG: (Go) arguments and return value reg/stack depending on versionCM_CC_RESERVE3: reserved; used for internal needsCM_CC_SPECIALE: CM_CC_SPECIAL with ellipsisCM_CC_SPECIALP: Equal to CM_CC_SPECIAL, but with purged stack.CM_CC_SPECIAL: usercall: locations of all arguments and the return value are explicitly specifiedCM_CC_LAST_USERCALLCM_CC_GOSTK: (Go) arguments and return value in stackCM_CC_FIRST_PLAIN_CUSTOMBFA_NORET: __noreturnBFA_PURE: __pureBFA_HIGH: high level prototype (with possibly hidden args)BFA_STATIC: staticBFA_VIRTUAL: virtualBFA_FUNC_MARKER: This is NOT a cc! (used internally as a marker)BFA_FUNC_EXT_FORMAT: This is NOT a real attribute (used internally as marker for extended format)ALOC_NONE: noneALOC_STACK: stack offsetALOC_DIST: distributed (scattered)ALOC_REG1: one register (and offset within it)ALOC_REG2: register pairALOC_RREL: register relativeALOC_STATIC: global addressALOC_CUSTOM: custom argloc (7 or higher)PRALOC_VERIFY: interr if illegal arglocPRALOC_STKOFF: print stack offsetsC_PC_TINYC_PC_SMALLC_PC_COMPACTC_PC_MEDIUMC_PC_LARGEC_PC_HUGEC_PC_FLATCCI_VARARG: is variadic?CCI_PURGE: purges arguments?CCI_USER: is usercall? not testedARGREGS_POLICY_UNDEFINEDARGREGS_GP_ONLY: GP registers used for all arguments.ARGREGS_INDEPENDENT: FP/GP registers used separately (like gcc64)ARGREGS_BY_SLOTS: fixed FP/GP register per each slot (like vc64)ARGREGS_FP_MASKS_GP: FP register also consumes one or more GP regs but not vice versa (aix ppc ABI)ARGREGS_MIPS_O32: MIPS ABI o32.ARGREGS_RISCV: Risc-V API FP arguments are passed in GP registers if FP registers are exhausted and GP ones are not. Wide FP arguments are passed in GP registers. Variadic FP arguments are passed in GP registers.SETCOMP_OVERRIDE: may override old compiler infoSETCOMP_ONLY_ID: cc has only 'id' field; the rest will be set to defaults corresponding to the program bitnessSETCOMP_ONLY_ABI: ignore cc field complete, use only abinameSETCOMP_BY_USER: invoked by user, cannot be replaced by module/loaderMAX_FUNC_ARGS: max number of function argumentsABS_UNKABS_NOABS_YESSC_UNK: unknownSC_TYPE: typedefSC_EXT: externSC_STAT: staticSC_REG: registerSC_AUTO: autoSC_FRIEND: friendSC_VIRT: virtualHTI_CPP: C++ mode (not implemented)HTI_INT: debug: print internal representation of typesHTI_EXT: debug: print external representation of typesHTI_LEX: debug: print tokensHTI_UNP: debug: check the result by unpacking itHTI_TST: test mode: discard the resultHTI_FIL: "input" is file name, otherwise "input" contains a C declarationHTI_MAC: define macros from the base tilsHTI_NWR: no warning messagesHTI_NER: ignore all errors but display themHTI_DCL: don't complain about redeclarationsHTI_NDC: don't decorate namesHTI_PAK: explicit structure pack value (#pragma pack)HTI_PAK_SHIFT: shift for HTI_PAK. This field should be used if you want to remember an explicit pack value for each structure/union type. See HTI_PAK... definitionsHTI_PAKDEF: default pack valueHTI_PAK1: #pragma pack(1)HTI_PAK2: #pragma pack(2)HTI_PAK4: #pragma pack(4)HTI_PAK8: #pragma pack(8)HTI_PAK16: #pragma pack(16)HTI_HIGH: assume high level prototypes (with hidden args, etc)HTI_LOWER: lower the function prototypesHTI_RAWARGS: leave argument names unchanged (do not remove underscores)HTI_RELAXED: accept references to unknown namespacesHTI_NOBASE: do not inspect base tilsHTI_SEMICOLON: do not complain if the terminating semicolon is absentHTI_STANDALONE: should parse standalone declaration, it may contain qualified name and type names, strictly speaking it is not a valid C++ code, IDA Pro specificPT_SIL: silent, no messagesPT_NDC: don't decorate namesPT_TYP: return declared type informationPT_VAR: return declared object informationPT_PACKMASK: mask for pack alignment valuesPT_HIGH: assume high level prototypes (with hidden args, etc)PT_LOWER: lower the function prototypesPT_REPLACE: replace the old type (used in idc)PT_RAWARGS: leave argument names unchanged (do not remove underscores)PT_RELAXED: accept references to unknown namespacesPT_EMPTY: accept empty declPT_SEMICOLON: append the terminating semicolonPT_SYMBOL: accept a symbol name and return its type. e.g. "LoadLibrary" will return its prototypePRTYPE_1LINE: print to one linePRTYPE_MULTI: print to many linesPRTYPE_TYPE: print type declaration (not variable declaration)PRTYPE_PRAGMA: print pragmas for alignmentPRTYPE_SEMI: append ; to the endPRTYPE_CPP: use c++ name (only for print_type())PRTYPE_DEF: tinfo_t: print definition, if availablePRTYPE_NOARGS: tinfo_t: do not print function argument namesPRTYPE_NOARRS: tinfo_t: print arguments with FAI_ARRAY as pointersPRTYPE_NORES: tinfo_t: never resolve types (meaningful with PRTYPE_DEF)PRTYPE_RESTORE: tinfo_t: print restored types for FAI_ARRAY and FAI_STRUCTPRTYPE_NOREGEX: do not apply regular expressions to beautify namePRTYPE_COLORED: add color tag COLOR_SYMBOL for any parentheses, commas and colonsPRTYPE_METHODS: tinfo_t: print udt methodsPRTYPE_1LINCMT: print comments even in the one line modePRTYPE_HEADER: print only type header (only for definitions)PRTYPE_OFFSETS: print udt member offsetsPRTYPE_MAXSTR: limit the output length to 1024 bytes (the output may be slightly longer)PRTYPE_TAIL: print only the definition tail (only for definitions, exclusive with PRTYPE_HEADER)PRTYPE_ARGLOCS: print function arglocs (not only for usercall)NTF_TYPE: type nameNTF_SYMU: symbol, name is unmangled ('func')NTF_SYMM: symbol, name is mangled ('_func'); only one of NTF_TYPE and NTF_SYMU, NTF_SYMM can be usedNTF_NOBASE: don't inspect base tils (for get_named_type)NTF_REPLACE: replace original type (for set_named_type)NTF_UMANGLED: name is unmangled (don't use this flag)NTF_NOCUR: don't inspect current til file (for get_named_type)NTF_64BIT: value is 64bitNTF_FIXNAME: force-validate the name of the type when setting (set_named_type, set_numbered_type only)NTF_IDBENC: the name is given in the IDB encoding; non-ASCII bytes will be decoded accordingly (set_named_type, set_numbered_type only)NTF_CHKSYNC: check that synchronization to IDB passed OK (set_numbered_type, set_named_type)NTF_NO_NAMECHK: do not validate type name (set_numbered_type, set_named_type)NTF_COPY: save a new type definition, not a typeref (tinfo_t::set_numbered_type, tinfo_t::set_named_type)TERR_OK: okTERR_SAVE_ERROR: failed to saveTERR_SERIALIZE: failed to serializeTERR_BAD_NAME: name s is not acceptableTERR_BAD_ARG: bad argumentTERR_BAD_TYPE: bad typeTERR_BAD_SIZE: bad size dTERR_BAD_INDEX: bad index dTERR_BAD_ARRAY: arrays are forbidden as function argumentsTERR_BAD_BF: bitfields are forbidden as function argumentsTERR_BAD_OFFSET: bad member offset sTERR_BAD_UNIVAR: unions cannot have variable sized membersTERR_BAD_VARLAST: variable sized member must be the last member in the structureTERR_OVERLAP: the member overlaps with other members that cannot be deletedTERR_BAD_SUBTYPE: recursive structure nesting is forbiddenTERR_BAD_VALUE: value 0xI64X is not acceptableTERR_NO_BMASK: bitmask 0xI64X is not foundTERR_BAD_BMASK: Bad enum member mask 0xI64X. The specified mask should not intersect with any existing mask in the enum. Zero masks are prohibited too.TERR_BAD_MSKVAL: bad bmask and value combination (value=0xI64X; bitmask 0xI64X)TERR_BAD_REPR: bad or incompatible field representationTERR_GRP_NOEMPTY: could not delete group mask for not empty group 0xI64XTERR_DUPNAME: duplicate name sTERR_UNION_BF: unions cannot have bitfieldsTERR_BAD_TAH: bad bits in the type attributes (TAH bits)TERR_BAD_BASE: bad base classTERR_BAD_GAP: bad gapTERR_NESTED: recursive structure nesting is forbiddenTERR_NOT_COMPAT: the new type is not compatible with the old typeTERR_BAD_LAYOUT: failed to calculate the structure/union layoutTERR_BAD_GROUPS: bad group sizes for bitmask enumTERR_BAD_SERIAL: enum value has too many serialsTERR_ALIEN_NAME: enum member name is used in another enumTERR_STOCK: stock type info cannot be modifiedTERR_ENUM_SIZE: bad enum sizeTERR_NOT_IMPL: not implementedTERR_TYPE_WORSE: the new type is worse than the old typeTERR_BAD_FX_SIZE: cannot extend struct beyond fixed sizeTERR_STRUCT_SIZE: bad fixed structure sizeTERR_NOT_FOUND: member not foundTERR_COUNTCCN_CCCN_CPPADDTIL_DEFAULT: default behaviorADDTIL_INCOMP: load incompatible tilsADDTIL_SILENT: do not ask any questionsADDTIL_FAILED: something bad, the warning is displayedADDTIL_OK: ok, til is loadedADDTIL_COMP: ok, but til is not compatible with the current compilerADDTIL_ABORTED: til was not loaded (incompatible til rejected by user)TINFO_GUESSED: this is a guessed typeTINFO_DEFINITE: this is a definite typeTINFO_DELAYFUNC: if type is a function and no function exists at ea, schedule its creation and argument renaming to auto-analysis, otherwise try to create it immediatelyTINFO_STRICT: never convert given type to another one before applyingGUESS_FUNC_FAILED: couldn't guess the function typeGUESS_FUNC_TRIVIAL: the function type doesn't have interesting infoGUESS_FUNC_OK: ok, some non-trivial information is gatheredSTI_PCHAR: char *STI_PUCHAR: uint8 *STI_PCCHAR: const char *STI_PCUCHAR: const uint8 *STI_PBYTE: _BYTE *STI_PINT: int *STI_PUINT: unsigned int *STI_PVOID: void *STI_PPVOID: void **STI_PCVOID: const void *STI_ACHAR: char[]STI_AUCHAR: uint8[]STI_ACCHAR: const char[]STI_ACUCHAR: const uint8[]STI_FPURGING: void __userpurge(int)STI_FDELOP: void __cdecl(void *)STI_MSGSEND: void *(void *, const char *, ...)STI_AEABI_LCMP: int __fastcall __pure(int64 x, int64 y)STI_AEABI_ULCMP: int __fastcall __pure(uint64 x, uint64 y)STI_DONT_USE: unused stock type id; should not be usedSTI_SIZE_T: size_tSTI_SSIZE_T: ssize_tSTI_AEABI_MEMCPY: void __fastcall(void *, const void *, size_t)STI_AEABI_MEMSET: void __fastcall(void *, size_t, int)STI_AEABI_MEMCLR: void __fastcall(void *, size_t)STI_RTC_CHECK_2: int16 __fastcall(int16 x)STI_RTC_CHECK_4: int32 __fastcall(int32 x)STI_RTC_CHECK_8: int64 __fastcall(int64 x)STI_COMPLEX64: struct complex64_t { float real, imag; }STI_COMPLEX128: struct complex128_t { double real, imag; }STI_PUNKNOWN: _UNKNOWN *STI_LASTETF_NO_SAVE: don't save to til (normally typerefs are saved to til) A call with ETF_NO_SAVE must be followed by a call without it. Otherwise there may be inconsistencies between the memory and the type library.ETF_NO_LAYOUT: don't calc type layout before editingETF_MAY_DESTROY: may destroy other membersETF_COMPATIBLE: new type must be compatible with the oldETF_FUNCARG: udm - member is a function argument (cannot create arrays)ETF_FORCENAME: anyway use name, see below for more usage descriptionETF_AUTONAME: udm - generate a member name if was not specified (add_udm, set_udm_type)ETF_BYTIL: udm - new type was created by the type subsystemETF_NO_ARRAY: add_udm, set_udm_type - do not convert type to an array on the size mismatchGTD_CALC_LAYOUT: calculate udt layoutGTD_NO_LAYOUT: don't calculate udt layout please note that udt layout may have been calculated earlierGTD_DEL_BITFLDS: delete udt bitfieldsGTD_CALC_ARGLOCS: calculate func arg locationsGTD_NO_ARGLOCS: don't calculate func arg locations please note that the locations may have been calculated earlierGTS_NESTED: nested type (embedded into a udt)GTS_BASECLASS: is baseclass of a udtSUDT_SORT: fields are not sorted by offset, sort them firstSUDT_ALIGN: recalculate field alignments, struct packing, etc to match the offsets and size infoSUDT_GAPS: allow to fill gaps with additional members (_BYTE[])SUDT_UNEX: references to nonexistent member types are acceptable; in this case it is better to set the corresponding udm_t::fda field to the type alignment. If this field is not set, ida will try to guess the alignment.SUDT_FAST: serialize without verifying offsets and alignmentsSUDT_CONST: only for serialize_udt: make type constSUDT_VOLATILE: only for serialize_udt: make type volatileSUDT_TRUNC: serialize: truncate useless strings from fields, fldcmtsSUDT_SERDEF: serialize: if a typeref, serialize its definitionCOMP_MASKCOMP_UNK: Unknown.COMP_MS: Visual C++.COMP_BC: Borland C++.COMP_WATCOM: Watcom C++.COMP_GNU: GNU C++.COMP_VISAGE: Visual Age C++.COMP_BP: Delphi.COMP_UNSURE: uncertain compiler idBADSIZE: bad type sizeFIRST_NONTRIVIAL_TYPID: Denotes the first bit describing a nontrivial type.TYPID_ISREF: Identifies that a type that is a typeref.TYPID_SHIFT: First type detail bit.STRMEM_MASKSTRMEM_OFFSET: get member by offsetSTRMEM_INDEX: get member by numberSTRMEM_AUTO: get member by offset if struct, or get member by index if unionSTRMEM_NAME: get member by nameSTRMEM_TYPE: get member by type.STRMEM_SIZE: get member by size.STRMEM_MINS: get smallest member by size.STRMEM_MAXS: get biggest member by size.STRMEM_LOWBND: get member by offset or the next member (lower bound)STRMEM_NEXT: get next member after the offsetSTRMEM_VFTABLE: can be combined with STRMEM_OFFSET, STRMEM_AUTO get vftable instead of the base classSTRMEM_SKIP_EMPTY: can be combined with STRMEM_OFFSET, STRMEM_AUTO skip empty members (i.e. having zero size) only last empty member can be returnedSTRMEM_CASTABLE_TO: can be combined with STRMEM_TYPE: member type must be castable to the specified typeSTRMEM_ANON: can be combined with STRMEM_NAME: look inside anonymous members too.STRMEM_SKIP_GAPS: can be combined with STRMEM_OFFSET, STRMEM_LOWBND skip gap membersTCMP_EQUAL: are types equal?TCMP_IGNMODS: ignore const/volatile modifiersTCMP_AUTOCAST: can t1 be cast into t2 automatically?TCMP_MANCAST: can t1 be cast into t2 manually?TCMP_CALL: can t1 be called with t2 type?TCMP_DELPTR: remove pointer from types before comparingTCMP_DECL: compare declarations without resolving themTCMP_ANYBASE: accept any base class when castingTCMP_SKIPTHIS: skip the first function argument in comparisonTCMP_DEEP_UDT: compare udt by member/attributesFAI_HIDDEN: hidden argumentFAI_RETPTR: pointer to return value. implies hiddenFAI_STRUCT: was initially a structureFAI_ARRAY: was initially an array; see "__org_typedef" or "__org_arrdim" type attributes to determine the original typeFAI_UNUSED: argument is not used by the functionFTI_SPOILED: information about spoiled registers is presentFTI_NORET: noreturnFTI_PURE: __pureFTI_HIGH: high level prototype (with possibly hidden args)FTI_STATIC: staticFTI_VIRTUAL: virtualFTI_CALLTYPE: mask for FTI_*CALLFTI_DEFCALL: default callFTI_NEARCALL: near callFTI_FARCALL: far callFTI_INTCALL: interrupt callFTI_ARGLOCS: info about argument locations has been calculated (stkargs and retloc too)FTI_EXPLOCS: all arglocs are specified explicitlyFTI_CONST: const member functionFTI_CTOR: constructorFTI_DTOR: destructorFTI_ALL: all defined bitsCC_CDECL_OK: can use __cdecl calling convention?CC_ALLOW_ARGPERM: disregard argument order?CC_ALLOW_REGHOLES: allow holes in register argument list?CC_HAS_ELLIPSIS: function has a variable list of arguments?CC_GOLANG_OK: can use __golang calling conventionFMTFUNC_PRINTFFMTFUNC_SCANFFMTFUNC_STRFTIMEFMTFUNC_STRFMONMAX_ENUM_SERIAL: Max number of identical constants allowed for one enum type.FRB_MASK: Mask for the value type (* means requires additional info):FRB_UNK: Unknown.FRB_NUMB: Binary number.FRB_NUMO: Octal number.FRB_NUMH: Hexadecimal number.FRB_NUMD: Decimal number.FRB_FLOAT: Floating point number (for interpreting an integer type as a floating value)FRB_CHAR: Char.FRB_SEG: Segment.FRB_ENUM: *EnumerationFRB_OFFSET: *OffsetFRB_STRLIT: *String literal (used for arrays)FRB_STROFF: *Struct offsetFRB_CUSTOM: *Custom data typeFRB_INVSIGN: Invert sign (0x01 is represented as -0xFF)FRB_INVBITS: Invert bits (0x01 is represented as ~0xFE)FRB_SIGNED: Force signed representation.FRB_LZERO: Toggle leading zeroes (used for integers)FRB_TABFORM: has additional tabular parametersSTRUC_SEPARATOR: structname.fieldnameVTBL_SUFFIXVTBL_MEMNAMETPOS_LNNUMTPOS_REGCMTTVIS_TYPE: new type info is presentTVIS_NAME: new name is present (only for funcargs and udt members)TVIS_CMT: new comment is present (only for udt members)TVIS_RPTCMT: the new comment is repeatableTVST_PRUNE: don't visit children of current typeTVST_DEF: visit type definition (meaningful for typerefs)TVST_LEVELPIO_NOATTR_FAIL: missing attributes are not okPIO_IGNORE_PTRS: do not follow pointersUTP_ENUMUTP_STRUCTVALSTR_OPEN: printed opening curly brace '{'PDF_INCL_DEPS: Include all type dependencies.PDF_DEF_FWD: Allow forward declarations.PDF_DEF_BASE: Include base types: __int8, __int16, etc..PDF_HEADER_CMT: Prepend output with a descriptive comment.PT_FILEPT_STANDALONEcvarsc_autosc_extsc_friendsc_regsc_statsc_typesc_unksc_virtTERR_SAVETERR_WRONGNAMEBADORDenum_member_vec_tenum_member_tudt_member_t
Classes Overview
funcargvec_treginfovec_tedmvec_targpartvec_tvalstrvec_tregobjvec_ttype_attrs_tudtmembervec_template_ttype_attr_ttil_trrel_targloc_targpart_tscattered_aloc_taloc_visitor_tconst_aloc_visitor_tstkarg_area_info_tcustom_callcnv_tcallregs_ttinfo_tsimd_info_tptr_type_data_tarray_type_data_tfuncarg_tfunc_type_data_tedm_tenum_type_data_ttypedef_type_data_tcustom_data_type_info_tvalue_repr_tudm_tudtmembervec_tudt_type_data_tudm_visitor_tbitfield_type_data_ttype_mods_ttinfo_visitor_tregobj_tregobjs_targtinfo_helper_tlowertype_helper_tida_lowertype_helper_tvalstr_tvalstrs_ttext_sink_ttil_symbol_tpredicate_ttil_type_ref_t
Functions Overview
deserialize_tinfo(tif: tinfo_t, til: til_t, ptype: type_t const **, pfields: p_list const **, pfldcmts: p_list const **, cmt: str = None) -> boolis_type_const(t: type_t) -> bool: See BTM_CONST.is_type_volatile(t: type_t) -> bool: See BTM_VOLATILE.get_base_type(t: type_t) -> type_t: Get get basic type bits (TYPE_BASE_MASK)get_type_flags(t: type_t) -> type_t: Get type flags (TYPE_FLAGS_MASK)get_full_type(t: type_t) -> type_t: Get basic type bits + type flags (TYPE_FULL_MASK)is_typeid_last(t: type_t) -> bool: Is the type_t the last byte of type declaration? (there are no additional bytes after a basic type, see _BT_LAST_BASIC)is_type_partial(t: type_t) -> bool: Identifies an unknown or void type with a known size (see Basic type: unknown & void)is_type_void(t: type_t) -> bool: See BTF_VOID.is_type_unknown(t: type_t) -> bool: See BT_UNKNOWN.is_type_ptr(t: type_t) -> bool: See BT_PTR.is_type_complex(t: type_t) -> bool: See BT_COMPLEX.is_type_func(t: type_t) -> bool: See BT_FUNC.is_type_array(t: type_t) -> bool: See BT_ARRAY.is_type_typedef(t: type_t) -> bool: See BTF_TYPEDEF.is_type_sue(t: type_t) -> bool: Is the type a struct/union/enum?is_type_struct(t: type_t) -> bool: See BTF_STRUCT.is_type_union(t: type_t) -> bool: See BTF_UNION.is_type_struni(t: type_t) -> bool: Is the type a struct or union?is_type_enum(t: type_t) -> bool: See BTF_ENUM.is_type_bitfld(t: type_t) -> bool: See BT_BITFIELD.is_type_int(bt: type_t) -> bool: Does the type_t specify one of the basic types in Basic type: integer?is_type_int128(t: type_t) -> bool: Does the type specify a 128-bit value? (signed or unsigned, see Basic type: integer)is_type_int64(t: type_t) -> bool: Does the type specify a 64-bit value? (signed or unsigned, see Basic type: integer)is_type_int32(t: type_t) -> bool: Does the type specify a 32-bit value? (signed or unsigned, see Basic type: integer)is_type_int16(t: type_t) -> bool: Does the type specify a 16-bit value? (signed or unsigned, see Basic type: integer)is_type_char(t: type_t) -> bool: Does the type specify a char value? (signed or unsigned, see Basic type: integer)is_type_paf(t: type_t) -> bool: Is the type a pointer, array, or function type?is_type_ptr_or_array(t: type_t) -> bool: Is the type a pointer or array type?is_type_floating(t: type_t) -> bool: Is the type a floating point type?is_type_integral(t: type_t) -> bool: Is the type an integral type (char/short/int/long/bool)?is_type_ext_integral(t: type_t) -> bool: Is the type an extended integral type? (integral or enum)is_type_arithmetic(t: type_t) -> bool: Is the type an arithmetic type? (floating or integral)is_type_ext_arithmetic(t: type_t) -> bool: Is the type an extended arithmetic type? (arithmetic or enum)is_type_uint(t: type_t) -> bool: See BTF_UINT.is_type_uchar(t: type_t) -> bool: See BTF_UCHAR.is_type_uint16(t: type_t) -> bool: See BTF_UINT16.is_type_uint32(t: type_t) -> bool: See BTF_UINT32.is_type_uint64(t: type_t) -> bool: See BTF_UINT64.is_type_uint128(t: type_t) -> bool: See BTF_UINT128.is_type_ldouble(t: type_t) -> bool: See BTF_LDOUBLE.is_type_double(t: type_t) -> bool: See BTF_DOUBLE.is_type_float(t: type_t) -> bool: See BTF_FLOAT.is_type_tbyte(t: type_t) -> bool: See BTF_FLOAT.is_type_bool(t: type_t) -> bool: See BTF_BOOL.is_tah_byte(t: type_t) -> bool: The TAH byte (type attribute header byte) denotes the start of type attributes. (see "tah-typeattrs" in the type bit definitions)is_sdacl_byte(t: type_t) -> bool: Identify an sdacl byte. The first sdacl byte has the following format: 11xx000x. The sdacl bytes are appended to udt fields. They indicate the start of type attributes (as the tah-bytes do). The sdacl bytes are used in the udt headers instead of the tah-byte. This is done for compatibility with old databases, they were already using sdacl bytes in udt headers and as udt field postfixes. (see "sdacl-typeattrs" in the type bit definitions)append_argloc(out: qtype *, vloc: argloc_t) -> bool: Serialize argument locationextract_argloc(vloc: argloc_t, ptype: type_t const **, forbid_stkoff: bool) -> bool: Deserialize an argument location. Argument FORBID_STKOFF checks location type. It can be used, for example, to check the return location of a function that cannot return a value in the stackresolve_typedef(til: til_t, type: type_t const *) -> type_t const *is_restype_void(til: til_t, type: type_t const *) -> boolis_restype_enum(til: til_t, type: type_t const *) -> boolis_restype_struni(til: til_t, type: type_t const *) -> boolis_restype_struct(til: til_t, type: type_t const *) -> boolget_scalar_bt(size: int) -> type_tnew_til(name: str, desc: str) -> til_t *: Initialize a til.load_til(name: str, tildir: str = None) -> str: Load til from a file without adding it to the database list (see also add_til). Failure to load base tils are reported into 'errbuf'. They do not prevent loading of the main til.compact_til(ti: til_t) -> bool: Collect garbage in til. Must be called before storing the til.store_til(ti: til_t, tildir: str, name: str) -> bool: Store til to a file. If the til contains garbage, it will be collected before storing the til. Your plugin should call compact_til() before calling store_til().free_til(ti: til_t) -> None: Free memory allocated by til.load_til_header(tildir: str, name: str) -> str: Get human-readable til description.is_code_far(cm: cm_t) -> bool: Does the given model specify far code?.is_data_far(cm: cm_t) -> bool: Does the given model specify far data?.verify_argloc(vloc: argloc_t, size: int, gaps: rangeset_t) -> int: Verify argloc_t.optimize_argloc(vloc: argloc_t, size: int, gaps: rangeset_t) -> bool: Verify and optimize scattered argloc into simple form. All new arglocs must be processed by this function.print_argloc(vloc: argloc_t, size: int = 0, vflags: int = 0) -> size_t: Convert an argloc to human readable form.for_all_arglocs(vv: aloc_visitor_t, vloc: argloc_t, size: int, off: int = 0) -> int: Compress larger argloc types and initiate the aloc visitor.for_all_const_arglocs(vv: const_aloc_visitor_t, vloc: argloc_t, size: int, off: int = 0) -> int: See for_all_arglocs()is_user_cc(cc: callcnv_t) -> bool: Does the calling convention specify argument locations explicitly?is_vararg_cc(cc: callcnv_t) -> bool: Does the calling convention use ellipsis?is_purging_cc(cc: callcnv_t) -> bool: Does the calling convention clean the stack arguments upon return?.is_golang_cc(cc: callcnv_t) -> bool: GO language calling convention (return value in stack)?is_custom_callcnv(cc: callcnv_t) -> bool: Is custom calling convention?is_swift_cc(cc: callcnv_t) -> bool: Swift calling convention (arguments and return values in registers)?get_stkarg_area_info(out: stkarg_area_info_t, cc: callcnv_t) -> bool: Some calling conventions foresee special areas on the stack for call arguments. This structure lists their sizes.get_custom_callcnv(callcnv: callcnv_t) -> custom_callcnv_t const *: Retrieve custom calling convention details.find_custom_callcnv(name: str) -> callcnv_t: Find a calling convention by its nameget_custom_callcnvs(names: qstrvec_t *, codes: callcnvs_t *) -> size_t: Get all custom calling conventionsget_comp(comp: comp_t) -> comp_t: Get compiler bits.get_compiler_name(id: comp_t) -> str: Get full compiler name.get_compiler_abbr(id: comp_t) -> str: Get abbreviated compiler name.get_compilers(ids: compvec_t *, names: qstrvec_t *, abbrs: qstrvec_t *) -> None: Get names of all built-in compilers.is_comp_unsure(comp: comp_t) -> comp_t: See COMP_UNSURE.default_compiler() -> comp_t: Get compiler specified by inf.cc.is_gcc() -> bool: Is the target compiler COMP_GNU?is_gcc32() -> bool: Is the target compiler 32 bit gcc?is_gcc64() -> bool: Is the target compiler 64 bit gcc?gcc_layout() -> bool: Should use the struct/union layout as done by gcc?set_compiler(cc: compiler_info_t, flags: int, abiname: str = None) -> bool: Change current compiler.set_compiler_id(id: comp_t, abiname: str = None) -> bool: Set the compiler id (see Compiler IDs)set_abi_name(abiname: str, user_level: bool = False) -> bool: Set abi name (see Compiler IDs)get_abi_name() -> str: Get ABI name.append_abi_opts(abi_opts: str, user_level: bool = False) -> bool: Add/remove/check ABI option General form of full abi name: abiname-opt1-opt2-... or -opt1-opt2-...remove_abi_opts(abi_opts: str, user_level: bool = False) -> boolset_compiler_string(compstr: str, user_level: bool) -> booluse_golang_cc() -> bool: is GOLANG calling convention used by default?switch_to_golang() -> None: switch to GOLANG calling convention (to be used as default CC)convert_pt_flags_to_hti(pt_flags: int) -> int: Convert Type parsing flags to Type formatting flags. Type parsing flags lesser than 0x10 don't have stable meaning and will be ignored (more on these flags can be seen in idc.idc)parse_decl(out_tif: tinfo_t, til: til_t, decl: str, pt_flags: int) -> str: Parse ONE declaration. If the input string contains more than one declaration, the first complete type declaration (PT_TYP) or the last variable declaration (PT_VAR) will be used.parse_decls(til: til_t, input: str, printer: printer_t *, hti_flags: int) -> int: Parse many declarations and store them in a til. If there are any errors, they will be printed using 'printer'. This function uses default include path and predefined macros from the database settings. It always uses the HTI_DCL bit.print_type(ea: ida_idaapi.ea_t, prtype_flags: int) -> str: Get type declaration for the specified address.tinfo_errstr(code: tinfo_code_t) -> str: Helper function to convert an error code into a printable string. Additional arguments are handled using the functions from err.hdel_named_type(ti: til_t, name: str, ntf_flags: int) -> bool: Delete information about a symbol.first_named_type(ti: til_t, ntf_flags: int) -> str: Enumerate types.next_named_type(ti: til_t, name: str, ntf_flags: int) -> str: Enumerate types.copy_named_type(dsttil: til_t, srctil: til_t, name: str) -> int: Copy a named type from one til to another. This function will copy the specified type and all dependent types from the source type library to the destination library.decorate_name(*args) -> str: Decorate/undecorate a C symbol name.gen_decorate_name(name: str, should_decorate: bool, cc: callcnv_t, type: tinfo_t) -> str: Generic function for decorate_name() (may be used in IDP modules)calc_c_cpp_name(name: str, type: tinfo_t, ccn_flags: int) -> str: Get C or C++ form of the name.enable_numbered_types(ti: til_t, enable: bool) -> bool: Enable the use of numbered types in til. Currently it is impossible to disable numbered types once they are enabledalloc_type_ordinals(ti: til_t, qty: int) -> int: Allocate a range of ordinal numbers for new types.alloc_type_ordinal(ti: til_t) -> int: alloc_type_ordinals(ti, 1)get_ordinal_limit(ti: til_t = None) -> int: Get number of allocated ordinals + 1. If there are no allocated ordinals, return 0. To enumerate all ordinals, use: for ( uint32 i = 1; i < limit; ++i )get_ordinal_count(ti: til_t = None) -> int: Get number of allocated ordinals.del_numbered_type(ti: til_t, ordinal: int) -> bool: Delete a numbered type.set_type_alias(ti: til_t, src_ordinal: int, dst_ordinal: int) -> bool: Create a type alias. Redirects all references to source type to the destination type. This is equivalent to instantaneous replacement all references to srctype by dsttype.get_alias_target(ti: til_t, ordinal: int) -> int: Find the final alias destination. If the ordinal has not been aliased, return the specified ordinal itself If failed, returns 0.get_type_ordinal(ti: til_t, name: str) -> int: Get type ordinal by its name.get_numbered_type_name(ti: til_t, ordinal: int) -> str: Get type name (if exists) by its ordinal. If the type is anonymous, returns "". If failed, returns nullptrcreate_numbered_type_name(ord: int) -> str: Create anonymous name for num
…(truncated)