104#define DEFMASK64 bmask64_t(-1)
118struct tinfo_changes_t;
121#define RESERVED_BYTE 0xFF
543#define MAX_DECL_ALIGN 0x000F
547#define TAH_HASATTRS 0x0010
552#define TAUDT_UNALIGNED 0x0040
553#define TAUDT_MSSTRUCT 0x0020
554#define TAUDT_CPPOBJ 0x0080
555#define TAUDT_VFTABLE 0x0100
556#define TAUDT_FIXED 0x0400
558#define TAUDT_TUPLE 0x0800
564#define TAFLD_BASECLASS 0x0020
565#define TAFLD_UNALIGNED 0x0040
566#define TAFLD_VIRTBASE 0x0080
567#define TAFLD_VFTABLE 0x0100
568#define TAFLD_METHOD 0x0200
569#define TAFLD_GAP 0x0400
570#define TAFLD_REGCMT 0x0800
571#define TAFLD_FRAME_R 0x1000
572#define TAFLD_FRAME_S 0x2000
573#define TAFLD_BYTIL 0x4000
578#define TAPTR_PTR32 0x0020
579#define TAPTR_PTR64 0x0040
580#define TAPTR_RESTRICT 0x0060
581#define TAPTR_SHIFTED 0x0080
586#define TAENUM_64BIT 0x0020
587#define TAENUM_UNSIGNED 0x0040
588#define TAENUM_SIGNED 0x0080
589#define TAENUM_OCT 0x0100
590#define TAENUM_BIN 0x0200
593#define TAENUM_NUMSIGN 0x0400
594#define TAENUM_LZERO 0x0800
597#define TAH_ALL 0x7FF0
607 return t == TAH_BYTE;
634 for (
size_t i=0; i <
n; i++ )
654#define TA_ORG_TYPEDEF "__org_typedef"
655#define TA_ORG_ARRDIM "__org_arrdim"
656#define TA_FORMAT "format"
661#define TA_VALUE_REPR "\x01"
734#define TIL_ZIP 0x0001
735#define TIL_MAC 0x0002
736#define TIL_ESI 0x0004
737#define TIL_UNI 0x0008
738#define TIL_ORD 0x0010
739#define TIL_ALI 0x0020
740#define TIL_MOD 0x0040
741#define TIL_STM 0x0080
742#define TIL_SLD 0x0100
743#define TIL_ECC 0x0200
757 for (
int i = 0; i <
nbases; ++i )
793#define TIL_ADD_FAILED 0
795#define TIL_ADD_ALREADY 2
834idaman
bool ida_export
store_til(
til_t *ti,
const char *tildir,
const char *name);
934#define ARGLOC_HELPER_DEFINITIONS(decl) \
935decl void ida_export copy_argloc(argloc_t *dst, const argloc_t *src); \
936decl void ida_export cleanup_argloc(argloc_t *vloc);\
937decl int ida_export compare_arglocs(const argloc_t &a, const argloc_t &b);
939#define ARGLOC_HELPER_DEFINITIONS(decl)
941ARGLOC_HELPER_DEFINITIONS(idaman)
949typedef int argloc_type_t;
1116 ARGLOC_HELPER_DEFINITIONS(
friend)
1120 argloc_t(
const argloc_t &r) : type(
ALOC_NONE) { copy_argloc(
this, &r); }
1121 ~argloc_t() { cleanup_argloc(
this); }
1122 argloc_t &operator=(
const argloc_t &r) { copy_argloc(
this, &r);
return *
this; }
1123 DEFINE_MEMORY_ALLOCATION_FUNCS()
1126 void swap(argloc_t &r)
1129 argloc_type_t
t = type; type = r.type; r.type =
t;
1132 const char *dstr()
const;
1134 argloc_type_t atype()
const {
return type; }
1135 bool is_reg1()
const {
return type ==
ALOC_REG1; }
1136 bool is_reg2()
const {
return type ==
ALOC_REG2; }
1138 bool is_rrel()
const {
return type ==
ALOC_RREL; }
1139 bool is_ea()
const {
return type ==
ALOC_STATIC; }
1140 bool is_stkoff()
const {
return type ==
ALOC_STACK; }
1141 bool is_scattered()
const {
return type ==
ALOC_DIST; }
1142 inline bool has_reg()
const;
1143 inline bool has_stkoff()
const;
1144 inline bool is_mixed_scattered()
const;
1145 inline bool in_stack()
const;
1147 bool is_custom()
const {
return type >=
ALOC_CUSTOM; }
1148 bool is_badloc()
const {
return type ==
ALOC_NONE; }
1172 ea_t get_ea()
const {
return sval; }
1176 scattered_aloc_t &scattered() {
return *
dist; }
1177 const scattered_aloc_t &scattered()
const {
return *
dist; }
1181 rrel_t &get_rrel() {
return *
rrel; }
1182 const rrel_t &get_rrel()
const {
return *
rrel; }
1186 void *get_custom()
const {
return custom; }
1192 void _set_badloc() { type =
ALOC_NONE; }
1193 void _set_reg1(
int reg,
int off=0) { type =
ALOC_REG1;
reginfo = reg | (off << 16); }
1194 void _set_reg2(
int _reg1,
int _reg2) { type =
ALOC_REG2;
reginfo = _reg1 | (_reg2 << 16); }
1198 bool _consume_rrel(rrel_t *p)
1207 bool _consume_scattered(scattered_aloc_t *p)
1217 void _set_custom(argloc_type_t
ct,
void *pdata) { type =
ct;
custom = pdata; }
1223 void set_reg1(
int reg,
int off=0) { cleanup_argloc(
this); _set_reg1(reg, off); }
1226 void set_reg2(
int _reg1,
int _reg2) { cleanup_argloc(
this); _set_reg2(_reg1, _reg2); }
1229 void set_stkoff(
sval_t off) { cleanup_argloc(
this); _set_stkoff(off); }
1232 void set_ea(
ea_t _ea) { cleanup_argloc(
this); _set_ea(_ea); }
1235 void consume_rrel(rrel_t *p) { cleanup_argloc(
this); _consume_rrel(p); }
1238 void consume_scattered(scattered_aloc_t *p) { cleanup_argloc(
this); _consume_scattered(p); }
1241 void set_badloc() { cleanup_argloc(
this); }
1244 sval_t calc_offset()
const
1264 bool advance(
int delta)
1269 _set_reg1(reg1()+delta, regoff());
1285 void align_reg_high(
size_t size,
size_t _slotsize)
1288 _set_reg1(reg1(),
size < _slotsize ? _slotsize -
size : 0);
1292 void align_stkoff_high(
size_t size,
size_t _slotsize)
1297 if (
size < _slotsize )
1298 off += _slotsize -
size;
1303 DECLARE_COMPARISONS(argloc_t)
1305 return compare_arglocs(*
this, r);
1376#define PRALOC_VERIFY 0x01
1377#define PRALOC_STKOFF 0x02
1546#define CCI_VARARG 0x0001
1547#define CCI_PURGE 0x0002
1548#define CCI_USER 0x0004
1643 ea_t call_ea=BADADDR)
const
1657 bool should_decorate,
1734 bool set_inds(
int *p_ind1,
int *p_ind2,
int ind)
const
1744 static void set_regarray(
intvec_t *regvec,
const int *regarray)
1747 if ( regarray !=
nullptr )
1748 while ( *regarray != -1 )
1789 if ( ccc ==
nullptr )
1803 set_regarray(&
gpregs, gprs);
1804 set_regarray(&
fpregs, fprs);
1813 size_t n = regvec.
size();
1814 regvec.
resize(
n + last_reg - first_reg + 1);
1815 for (
int i = first_reg; i <= last_reg; ++i )
1816 regvec[
n + i - first_reg] = i;
1842 return p == regs.
end() ? -1 : (p-regs.
begin());
1847 bool reginds(
int *gp_ind,
int *fp_ind,
int r)
const
1857 *gp_ind = *fp_ind = -1;
1858 return set_inds(gp_ind, fp_ind,
findreg(gprs, r))
1859 || set_inds(fp_ind, gp_ind,
findreg(fprs, r));
1950 const char *abiname=
nullptr);
1954#define SETCOMP_OVERRIDE 0x0001
1955#define SETCOMP_ONLY_ID 0x0002
1958#define SETCOMP_ONLY_ABI 0x0004
1959#define SETCOMP_BY_USER 0x0008
1974inline bool idaapi
set_abi_name(
const char *abiname,
bool user_level =
false)
1978 int flags = SETCOMP_ONLY_ABI | (user_level ? SETCOMP_BY_USER : 0);
2022#define MAX_FUNC_ARGS 256
2050#define HTI_CPP 0x00000001
2051#define HTI_INT 0x00000002
2052#define HTI_EXT 0x00000004
2053#define HTI_LEX 0x00000008
2054#define HTI_UNP 0x00000010
2055#define HTI_TST 0x00000020
2056#define HTI_FIL 0x00000040
2058#define HTI_MAC 0x00000080
2059#define HTI_NWR 0x00000100
2060#define HTI_NER 0x00000200
2061#define HTI_DCL 0x00000400
2062#define HTI_NDC 0x00000800
2063#define HTI_PAK 0x00007000
2064#define HTI_PAK_SHIFT 12
2068#define HTI_PAKDEF 0x00000000
2069#define HTI_PAK1 0x00001000
2070#define HTI_PAK2 0x00002000
2071#define HTI_PAK4 0x00003000
2072#define HTI_PAK8 0x00004000
2073#define HTI_PAK16 0x00005000
2074#define HTI_HIGH 0x00008000
2076#define HTI_LOWER 0x00010000
2077#define HTI_RAWARGS 0x00020000
2078#define HTI_RELAXED 0x00080000
2079#define HTI_NOBASE 0x00100000
2080#define HTI_SEMICOLON 0x00200000
2081#define HTI_STANDALONE 0x00400000
2129 printer_t *print_cb=
nullptr,
2130 void *_cb_data=
nullptr,
2140 return ((pt_flags >> 4) & 0x1f) << HTI_PAK_SHIFT;
2166#define PT_SIL 0x0001
2167#define PT_NDC 0x0002
2168#define PT_TYP 0x0004
2169#define PT_VAR 0x0008
2170#define PT_PACKMASK 0x0070
2171#define PT_HIGH 0x0080
2173#define PT_LOWER 0x0100
2174#define PT_REPLACE 0x0200
2175#define PT_RAWARGS 0x0400
2176#define PT_RELAXED 0x1000
2177#define PT_EMPTY 0x2000
2178#define PT_SEMICOLON 0x4000
2179#define PT_SYMBOL 0x8000
2212#define PRTYPE_1LINE 0x00000
2213#define PRTYPE_MULTI 0x00001
2214#define PRTYPE_TYPE 0x00002
2215#define PRTYPE_PRAGMA 0x00004
2216#define PRTYPE_SEMI 0x00008
2217#define PRTYPE_CPP 0x00010
2218#define PRTYPE_DEF 0x00020
2219#define PRTYPE_NOARGS 0x00040
2220#define PRTYPE_NOARRS 0x00080
2221#define PRTYPE_NORES 0x00100
2222#define PRTYPE_RESTORE 0x00200
2223#define PRTYPE_NOREGEX 0x00400
2224#define PRTYPE_COLORED 0x00800
2225#define PRTYPE_METHODS 0x01000
2226#define PRTYPE_1LINCMT 0x02000
2227#define PRTYPE_HEADER 0x04000
2228#define PRTYPE_OFFSETS 0x08000
2229#define PRTYPE_MAXSTR 0x10000
2230#define PRTYPE_TAIL 0x20000
2231#define PRTYPE_ARGLOCS 0x40000
2266 const p_list **fields=
nullptr,
2267 const char **cmt=
nullptr,
2268 const p_list **fieldcmts=
nullptr,
2274#define NTF_TYPE 0x0001
2275#define NTF_SYMU 0x0008
2276#define NTF_SYMM 0x0000
2278#define NTF_NOBASE 0x0002
2279#define NTF_REPLACE 0x0004
2280#define NTF_UMANGLED 0x0008
2281#define NTF_NOCUR 0x0020
2282#define NTF_64BIT 0x0040
2283#define NTF_FIXNAME 0x0080
2285#define NTF_IDBENC 0x0100
2288#define NTF_CHKSYNC 0x0200
2290#define NTF_NO_NAMECHK 0x0400
2292#define NTF_COPY 0x1000
2305 const p_list **fields=
nullptr,
2306 const char **cmt=
nullptr,
2307 const p_list **fieldcmts=
nullptr,
2312 type, fields, cmt, fieldcmts, sclass, (
uint32 *)value);
2403 const til_t *srctil,
2416 bool should_decorate,
2424 bool should_decorate,
2432 bool should_decorate,
2480 const p_list **fields=
nullptr,
2481 const char **cmt=
nullptr,
2482 const p_list **fieldcmts=
nullptr,
2516 return maxord == 0 || maxord ==
uint32(-1) ? 0 : maxord - 1;
2650inline THREAD_SAFE
void align_size(
size_t &cur_tot_size,
size_t elem_size,
size_t algn)
2652 size_t al = elem_size;
2653 if ( algn != 0 && algn < al )
2655 cur_tot_size =
align_up(cur_tot_size, al);
2669 ea_t *closure_obj=
nullptr);
2685idaman
int ida_export
add_til(
const char *name,
int flags);
2690#define ADDTIL_DEFAULT 0x0000
2691#define ADDTIL_INCOMP 0x0001
2692#define ADDTIL_SILENT 0x0002
2698#define ADDTIL_FAILED 0
2700#define ADDTIL_COMP 2
2701#define ADDTIL_ABORTED 3
2734#define TINFO_GUESSED 0x0000
2735#define TINFO_DEFINITE 0x0001
2736#define TINFO_DELAYFUNC 0x0002
2739#define TINFO_STRICT 0x0004
2810#define GUESS_FUNC_FAILED 0
2811#define GUESS_FUNC_TRIVIAL 1
2812#define GUESS_FUNC_OK 2
2852 size_t *out_alsize=
nullptr);
2958#define SUDT_SORT 0x0001
2959#define SUDT_ALIGN 0x0002
2961#define SUDT_GAPS 0x0004
2962#define SUDT_UNEX 0x0008
2966#define SUDT_FAST 0x0010
2968#define SUDT_CONST 0x0040
2969#define SUDT_VOLATILE 0x0080
2971#define SUDT_TRUNC 0x0100
2972#define SUDT_SERDEF 0x0200
2978#define DECLARE_TINFO_HELPERS(decl)\
2979decl void ida_export copy_tinfo_t(tinfo_t *_this, const tinfo_t &r); \
2980decl bool ida_export detach_tinfo_t(tinfo_t *_this); \
2981decl void ida_export clear_tinfo_t(tinfo_t *_this);\
2982decl bool ida_export create_tinfo(tinfo_t *_this, type_t bt, type_t bt2, void *ptr);\
2983decl int ida_export verify_tinfo(typid_t typid);\
2984decl bool ida_export get_tinfo_details(typid_t typid, type_t bt2, void *buf);\
2985decl size_t ida_export get_tinfo_size(uint32 *p_effalign, typid_t typid, int gts_code);\
2986decl size_t ida_export get_tinfo_pdata(void *outptr, typid_t typid, int what);\
2987decl size_t ida_export get_tinfo_property(typid_t typid, int gta_prop);\
2988decl size_t ida_export get_tinfo_property4(typid_t typid, int gta_prop, size_t p1, size_t p2, size_t p3, size_t p4);\
2989decl size_t ida_export set_tinfo_property(tinfo_t *tif, int sta_prop, size_t x);\
2990decl size_t ida_export set_tinfo_property4(tinfo_t *tif, int sta_prop, size_t p1, size_t p2, size_t p3, size_t p4);\
2991decl bool ida_export serialize_tinfo(qtype *type, qtype *fields, qtype *fldcmts, const tinfo_t *tif, int sudt_flags);\
2992decl bool ida_export deserialize_tinfo(tinfo_t *tif, const til_t *til, const type_t **ptype, const p_list **pfields, const p_list **pfldcmts, const char *cmt);\
2993decl int ida_export find_tinfo_udt_member(udm_t *udm, typid_t typid, int strmem_flags);\
2994decl bool ida_export print_tinfo(qstring *result, const char *prefix, int indent, int cmtindent, int flags, const tinfo_t *tif, const char *name, const char *cmt);\
2995decl const char *ida_export dstr_tinfo(const tinfo_t *tif);\
2996decl int ida_export visit_subtypes(struct tinfo_visitor_t *visitor, struct type_mods_t *out, const tinfo_t &tif, const char *name, const char *cmt);\
2997decl bool ida_export compare_tinfo(typid_t t1, typid_t t2, int tcflags);\
2998decl int ida_export lexcompare_tinfo(typid_t t1, typid_t t2, int);\
2999decl bool ida_export get_stock_tinfo(tinfo_t *tif, stock_type_id_t id);\
3000decl uint64 ida_export read_tinfo_bitfield_value(typid_t typid, uint64 v, int bitoff);\
3001decl uint64 ida_export write_tinfo_bitfield_value(typid_t typid, uint64 dst, uint64 v, int bitoff);\
3002decl bool ida_export get_tinfo_attr(typid_t typid, const qstring &key, bytevec_t *bv, bool all_attrs);\
3003decl bool ida_export set_tinfo_attr(tinfo_t *tif, const type_attr_t &ta, bool may_overwrite);\
3004decl bool ida_export del_tinfo_attr(tinfo_t *tif, const qstring &key, bool make_copy);\
3005decl bool ida_export get_tinfo_attrs(typid_t typid, type_attrs_t *tav, bool include_ref_attrs);\
3006decl bool ida_export set_tinfo_attrs(tinfo_t *tif, type_attrs_t *ta);\
3007decl uint32 ida_export score_tinfo(const tinfo_t *tif);\
3008decl tinfo_code_t ida_export save_tinfo(tinfo_t *tif, til_t *til, size_t ord, const char *name, int ntf_flags);\
3009decl bool ida_export append_tinfo_covered(rangeset_t *out, typid_t typid, uint64 offset);\
3010decl bool ida_export calc_tinfo_gaps(rangeset_t *out, typid_t typid);\
3011decl bool ida_export name_requires_qualifier(qstring *out, typid_t typid, const char *name, uint64 offset);\
3012decl bool ida_export value_repr_t__from_opinfo(value_repr_t *_this, flags64_t flags, aflags_t afl, const opinfo_t *opinfo, const array_parameters_t *ap); \
3013decl size_t ida_export value_repr_t__print_(const value_repr_t *_this, qstring *result, bool colored); \
3014decl bool ida_export value_repr_t__parse_value_repr(value_repr_t *_this, const qstring &attr, type_t target_type); \
3015decl ssize_t ida_export udt_type_data_t__find_member(const udt_type_data_t *_this, udm_t *udm, int strmem_flags); \
3016decl ssize_t ida_export udt_type_data_t__get_best_fit_member(const udt_type_data_t *_this, asize_t disp); \
3017decl uchar ida_export enum_type_data_t__get_max_serial(const enum_type_data_t *ei, uint64 value); \
3018decl tinfo_code_t ida_export enum_type_data_t__set_value_repr(enum_type_data_t *ei, const value_repr_t &repr); \
3019decl tinfo_code_t ida_export enum_type_data_t__get_value_repr(const enum_type_data_t *ei, value_repr_t *repr); \
3020decl void ida_export tinfo_get_innermost_udm(tinfo_t *itif, const tinfo_t *tif, uint64 offset, size_t *udm_idx, uint64 *bit_offset, bool return_member_type); \
3021decl ssize_t ida_export get_udm_by_tid(tinfo_t *tif, udm_t *udm, tid_t tid); \
3022decl ssize_t ida_export get_edm_by_tid(tinfo_t *tif, edm_t *edm, tid_t tid); \
3023decl bool ida_export get_type_by_tid(tinfo_t *tif, tid_t tid); \
3024decl tid_t ida_export get_tinfo_tid(tinfo_t *tif, bool force_tid); \
3025decl ssize_t ida_export get_tinfo_by_edm_name(tinfo_t *tif, const til_t *til, const char *mname); \
3026decl ssize_t ida_export get_frame_var(tinfo_t *tif, sval_t *actval, const insn_t &insn, const op_t *x, sval_t v); \
3027decl bool ida_export tinfo_get_func_frame(tinfo_t *tif, const func_t *pfn); \
3029DECLARE_TINFO_HELPERS(idaman)
3039const int FIRST_NONTRIVIAL_TYPID = 0x100;
3050 return create_tinfo(
this,
decl_type, bt2, details);
3056 bool get_type_details(
type_t bt2,
void *buf)
const {
return get_tinfo_details(typid, bt2, buf); }
3057 void copy(
const tinfo_t &r) { copy_tinfo_t(
this, r); }
3058 DECLARE_TINFO_HELPERS(
friend)
3059 friend struct type_detail_t;
3090 GTA_LAST_FUNC_ARG = GTA_FUNC_ARG + 255,
3183 parse(decl, til, pt_flags);
3241 bool detach() {
return detach_tinfo_t(
this); }
3246 qtype *fields=
nullptr,
3247 qtype *fldcmts=
nullptr,
3248 int sudt_flags=SUDT_FAST|SUDT_TRUNC)
const
3250 return serialize_tinfo(
type, fields, fldcmts,
this, sudt_flags);
3257 const p_list **pfields=
nullptr,
3258 const p_list **pfldcmts=
nullptr,
3259 const char *cmt=
nullptr)
3261 return deserialize_tinfo(
this, til, ptype, pfields, pfldcmts, cmt);
3267 const qtype *pfields=
nullptr,
3268 const qtype *pfldcmts=
nullptr,
3269 const char *cmt=
nullptr)
3272 const p_list *fp = pfields ==
nullptr ? nullptr : pfields->begin();
3273 const p_list *cp = pfldcmts ==
nullptr ? nullptr : pfldcmts->begin();
3274 const p_list **pfp = fp ==
nullptr ? nullptr : &fp;
3275 const p_list **pcp = cp ==
nullptr ? nullptr : &cp;
3317 size_t get_size(
uint32 *p_effalign=
nullptr,
int gts_code=0)
const {
return get_tinfo_size(p_effalign, typid, gts_code); }
3348 THREAD_SAFE
bool has_details()
const {
return typid >= FIRST_NONTRIVIAL_TYPID; }
3425 bool is_typedef()
const {
return get_tinfo_property(typid, GTA_IS_TYPEDEF) != 0; }
3518 return get_type_details(
BT_PTR, pi);
3524 return get_type_details(
BT_ARRAY, ai);
3530 return get_type_details(
BTF_ENUM, ei);
3542 return get_type_details(
BTF_STRUCT|gtd, udt);
3548 return get_type_details(
BT_FUNC|gtd, fi);
3552 bool is_funcptr()
const {
return get_tinfo_property(typid, GTA_IS_FUNCPTR) != 0; }
3555 bool is_shifted_ptr()
const {
return get_tinfo_property(typid, GTA_IS_SHIFTED_PTR) != 0; }
3558 bool is_varstruct()
const {
return get_tinfo_property(typid, GTA_IS_VARSTRUCT) != 0; }
3563 bool is_varmember()
const {
return get_tinfo_property(typid, GTA_IS_VARMEMBER) != 0; }
3596 if (
n >= -1 &&
n < MAX_FUNC_ARGS )
3597 r.typid = get_tinfo_property(typid, GTA_FUNC_ARG+
n);
3605 int get_nargs()
const {
return get_tinfo_property(typid, GTA_FUNC_NARGS); }
3617 bool is_high_func()
const {
return get_tinfo_property(typid, GTA_IS_HIGH_TYPE) != 0; }
3635 int find_udm(
udm_t *udm,
int strmem_flags)
const {
return find_tinfo_udt_member(udm, typid, strmem_flags); }
3639#define STRMEM_MASK 0x000F
3640#define STRMEM_OFFSET 0x0000
3642#define STRMEM_INDEX 0x0001
3644#define STRMEM_AUTO 0x0002
3647#define STRMEM_NAME 0x0003
3649#define STRMEM_TYPE 0x0004
3652#define STRMEM_SIZE 0x0005
3654#define STRMEM_MINS 0x0006
3655#define STRMEM_MAXS 0x0007
3656#define STRMEM_LOWBND 0x0008
3658#define STRMEM_NEXT 0x0009
3661#define STRMEM_VFTABLE 0x10000000
3664#define STRMEM_SKIP_EMPTY 0x20000000
3668#define STRMEM_CASTABLE_TO 0x40000000
3671#define STRMEM_ANON 0x80000000
3674#define STRMEM_SKIP_GAPS 0x01000000
3685 inline int find_udm(
const char *
name,
int strmem_flags=0)
const;
3712 bool is_small_udt()
const {
return get_tinfo_property(typid, GTA_IS_SMALL_UDT) != 0; }
3749 bool calc_gaps(rangeset_t *out)
const {
return calc_tinfo_gaps(out, typid); }
3755 bool is_sse_type()
const {
return get_tinfo_property(typid, GTA_IS_SSE_TYPE) != 0; }
3762 bool has_vftable()
const {
return get_tinfo_property(typid, GTA_HAS_VFTABLE) != 0; }
3765 bool has_union()
const {
return get_tinfo_property(typid, GTA_HAS_UNION) != 0; }
3822 tid_t get_edm_tid(
size_t idx)
const {
return get_tinfo_property4(typid, GTA_EDM_TID, idx, 0, 0, 0); }
3856 const char *
name=
nullptr,
3857 int prtype_flags=PRTYPE_1LINE,
3860 const char *prefix=
nullptr,
3861 const char *cmt=
nullptr)
const
3863 return print_tinfo(out, prefix, indent, cmtindent, prtype_flags,
this,
name, cmt);
3867 const char *
dstr()
const {
return dstr_tinfo(
this); }
3881 bool set_attr(
const type_attr_t &ta,
bool may_overwrite=
true) {
return set_tinfo_attr(
this, ta, may_overwrite); }
3887 bool del_attr(
const qstring &key,
bool make_copy=
true) {
return del_tinfo_attr(
this, key, make_copy); }
3896 return create_type(
decl_type, bt2, (
void *)&p);
3914 return ::parse_decl(
this,
nullptr, til, decl, pt_flags | PT_SEMICOLON);
4029 return tinfo_code_t(set_tinfo_property4(
this, STA_ALIGNMENT, declalign, 0, 0, etf_flags));
4031#ifndef NO_OBSOLETE_FUNCS
4032 DEPRECATED
bool set_declalign(
uchar declalign) {
return set_tinfo_property(
this, STA_DECLALIGN, declalign) != 0; }
4041 {
return set_tinfo_property(
this, STA_UDT_ALIGN, sudt_flags) != 0; }
4047 return set_tinfo_property(
this, STA_UDT_METHODS,
size_t(&methods)) != 0;
4054 return tinfo_code_t(set_tinfo_property4(
this, STA_COMMENT,
size_t(cmt), is_regcmt, etf_flags, 0));
4061 return get_tinfo_property(typid, GTA_ALIAS);
4070 return set_tinfo_property4(
this, STA_ALIAS, dest_ord, 0, 0, 0) != 0;
4080 return tinfo_code_t(set_tinfo_property4(
this, STA_SET_SDA, sda, 0, 0, etf_flags));
4092 return tinfo_code_t(set_tinfo_property4(
this, STA_SET_PACK, pack, 0, 0, etf_flags));
4100 tid_t get_udm_tid(
size_t idx)
const {
return get_tinfo_property4(typid, GTA_UDM_TID, idx, 0, 0, 0); }
4113 return tinfo_code_t(set_tinfo_property4(
this, STA_ADD_UDM,
size_t(&udm), times, idx, etf_flags));
4192 return del_udms(index, index+1, etf_flags);
4198 return tinfo_code_t(set_tinfo_property4(
this, STA_DEL_UDMS, idx1, idx2, 0, etf_flags));
4206 return tinfo_code_t(set_tinfo_property4(
this, STA_UDM_NAME, index,
size_t(
name), 0, etf_flags));
4217 return tinfo_code_t(set_tinfo_property4(
this, STA_UDM_TYPE, index,
size_t(&tif),
size_t(repr), etf_flags));
4224 return tinfo_code_t(set_tinfo_property4(
this, STA_UDM_CMT, index,
size_t(cmt), is_regcmt, etf_flags));
4230 return tinfo_code_t(set_tinfo_property4(
this, STA_UDM_REPR, index,
size_t(&repr), 0, etf_flags));
4235 bool is_udm_by_til(
size_t idx)
const {
return get_tinfo_property4(typid, GTA_UDM_IS_BYTIL, idx, 0, 0, 0) != 0; }
4281 return tinfo_code_t(set_tinfo_property4(
this, STA_EXPAND_UDT, idx, delta, 0, etf_flags));
4318 return ::get_frame_var(
this, actval, insn, x, v);
4326 return tinfo_code_t(set_tinfo_property4(
this, STA_ENUM_WIDTH,
nbytes, 0, 0, etf_flags));
4334 return tinfo_code_t(set_tinfo_property4(
this, STA_ENUM_SIGN, sign, 0, 0, etf_flags));
4391 return tinfo_code_t(set_tinfo_property4(
this, STA_ADD_EDM,
size_t(&edm), bmask, idx, etf_flags));
4422 return tinfo_code_t(set_tinfo_property4(
this, STA_DEL_EDMS, idx1, idx2, 0, etf_flags));
4450 return tinfo_code_t(set_tinfo_property4(
this, STA_EDM_NAME, idx,
size_t(
name), 0, etf_flags));
4460 return tinfo_code_t(set_tinfo_property4(
this, STA_EDM_CMT, idx,
size_t(cmt), 0, etf_flags));
4471 return tinfo_code_t(set_tinfo_property4(
this, STA_EDIT_EDM, idx, value, bmask, etf_flags));
4482 return tinfo_code_t(set_tinfo_property4(
this, STA_FUNCARG_NAME, index,
size_t(
name), 0, etf_flags));
4492 return tinfo_code_t(set_tinfo_property4(
this, STA_FUNCARG_TYPE, index,
size_t(&tif), 0, etf_flags));
4501 return tinfo_code_t(set_tinfo_property4(
this, STA_FUNC_RETTYPE,
size_t(&tif), 0, 0, etf_flags));
4511 return tinfo_code_t(set_tinfo_property4(
this, STA_DEL_FUNCARGS, idx1, idx2, 0, etf_flags));
4524 return tinfo_code_t(set_tinfo_property4(
this, STA_ADD_FUNCARG,
size_t(&farg), idx, 0, etf_flags));
4530 return tinfo_code_t(set_tinfo_property4(
this, STA_FUNC_CC, cc, 0, 0, etf_flags));
4540 return tinfo_code_t(set_tinfo_property4(
this, STA_FUNCARG_LOC, index,
size_t(&argloc), 0, etf_flags));
4549 return tinfo_code_t(set_tinfo_property4(
this, STA_FUNC_RETLOC,
size_t(&argloc), 0, 0, etf_flags));
4556 return lexcompare_tinfo(typid, r.typid, 0);
4561#define TCMP_EQUAL 0x0000
4562#define TCMP_IGNMODS 0x0001
4563#define TCMP_AUTOCAST 0x0002
4564#define TCMP_MANCAST 0x0004
4565#define TCMP_CALL 0x0008
4566#define TCMP_DELPTR 0x0010
4567#define TCMP_DECL 0x0020
4568#define TCMP_ANYBASE 0x0040
4569#define TCMP_SKIPTHIS 0x0080
4570#define TCMP_DEEP_UDT 0x0100
4601 if ( pattern ==
nullptr )
4604 || pattern->
name !=
nullptr && !streq(pattern->
name,
name)
4692#define FAI_HIDDEN 0x0001
4693#define FAI_RETPTR 0x0002
4694#define FAI_STRUCT 0x0004
4695#define FAI_ARRAY 0x0008
4698#define FAI_UNUSED 0x0010
4735 type.parse(_type,
nullptr, PT_SEMICOLON);
4758#define FTI_SPOILED 0x0001
4759#define FTI_NORET 0x0002
4760#define FTI_PURE 0x0004
4761#define FTI_HIGH 0x0008
4762#define FTI_STATIC 0x0010
4763#define FTI_VIRTUAL 0x0020
4764#define FTI_CALLTYPE 0x00C0
4765#define FTI_DEFCALL 0x0000
4766#define FTI_NEARCALL 0x0040
4767#define FTI_FARCALL 0x0080
4768#define FTI_INTCALL 0x00C0
4769#define FTI_ARGLOCS 0x0100
4771#define FTI_EXPLOCS 0x0200
4772#define FTI_CONST 0x0400
4773#define FTI_CTOR 0x0800
4774#define FTI_DTOR 0x1000
4775#define FTI_ALL 0x1FFF
4809#define CC_CDECL_OK 0x01
4810#define CC_ALLOW_ARGPERM 0x02
4811#define CC_ALLOW_REGHOLES 0x04
4812#define CC_HAS_ELLIPSIS 0x08
4813#define CC_GOLANG_OK 0x10
4824 if ( from <
size() )
4828 if ( p->name == name )
4878 DEFINE_MEMORY_ALLOCATION_FUNCS()
4901 int get_enum_radix()
const
4942 bool is_hex()
const {
return get_enum_radix() == 16; }
4943 bool is_oct()
const {
return get_enum_radix() == 8; }
4944 bool is_bin()
const {
return get_enum_radix() == 2; }
4986 size_t grp_start = 0;
4989 if ( grp_start + grp_size > idx )
4991 if ( group_start_index !=
nullptr )
4992 *group_start_index = grp_start;
4993 if ( group_size !=
nullptr )
4994 *group_size = grp_size;
4997 grp_start += grp_size;
5013 && grp_start == idx && grp_size > 1;
5028 return sum ==
size();
5036 if ( from <
size() )
5040 if ( p->name == name )
5049 if ( from <
size() )
5051 if ( vmask ==
uint64(-1) )
5054 uint64 value_signed = value | ~vmask;
5057 if ( (p->value == value || p->value == value_signed) && serial-- == 0 )
5090 for (
size_t i=0; i <
index; ++i )
5091 if (
at(i).value == value )
5106 auto gv = [v](
size_t grp_start,
int grp_size)
5108 if ( grp_size == 1 )
5109 return v(grp_start, grp_start, grp_size);
5110 size_t grp_end = grp_start + grp_size;
5111 for (
size_t idx=grp_start+1; idx < grp_end; ++idx )
5113 int code = v(idx, grp_start, grp_size);
5124 for (
size_t idx=0; idx < sz; ++idx )
5126 int code = v(idx, 0, sz);
5135 int for_all_groups(std::function<
int(
size_t grp_start,
int grp_size)> v,
bool skip_trivial=
false)
const
5139 size_t grp_start = 0;
5142 if ( !skip_trivial || grp_size != 1 )
5144 int code = v(grp_start, grp_size);
5148 grp_start += grp_size;
5210#define FRB_FLOAT 0x5
5215#define FRB_OFFSET 0x9
5216#define FRB_STRLIT 0xA
5217#define FRB_STROFF 0xB
5218#define FRB_CUSTOM 0xC
5219#define FRB_INVSIGN 0x0100
5220#define FRB_INVBITS 0x0200
5221#define FRB_SIGNED 0x0400
5222#define FRB_LZERO 0x0800
5223#define FRB_TABFORM 0x1000
5266 ap.flags &= ~AP_SIGNED;
5271 if ( _ap !=
nullptr )
5281 return value_repr_t__from_opinfo(
this, flags, afl, opinfo, _ap);
5285 return value_repr_t__print_(
this,
result, colored);
5289 return value_repr_t__parse_value_repr(
this, attr, target_type);
5360 if (
type.parse(_type,
nullptr, PT_SEMICOLON) )
5411 &&
type.compare_with(r.
type, tcflags)
5426 return name[0] ==
'_' &&
name[1] ==
'_' &&
type.is_anonymous_udt();
5454 bool is_unaligned()
const {
return (
taudt_bits & TAUDT_UNALIGNED) != 0; }
5492 ssize_t find_member(
udm_t *pattern_udm,
int strmem_flags)
const {
return udt_type_data_t__find_member(
this, pattern_udm, strmem_flags); }
5522#define STRUC_SEPARATOR '.'
5530#define VTBL_SUFFIX "_vtbl"
5535#define VTBL_MEMNAME "__vftable"
5592 if (
nbytes != r.nbytes )
5593 return nbytes > r.nbytes ? 1 : -1;
5594 if (
width != r.width )
5595 return width > r.width ? 1 : -1;
5598 if ( !r.is_unsigned )
5603 if ( r.is_unsigned )
5627#define TPOS_LNNUM "\x05"
5633#define TPOS_REGCMT '\x06'
5664 QASSERT(2858,
is_pow2(type_align));
5665 if ( type_align > slotsize*2 )
5669 type_align = slotsize*2;
5671 return type_align < slotsize
5696inline bool argloc_t::has_reg()
const
5698 if ( !is_scattered() )
5700 for (
const auto &part : scattered() )
5701 if ( part.is_reg() )
5706inline bool argloc_t::has_stkoff()
const
5708 if ( !is_scattered() )
5710 for (
const auto &part : scattered() )
5711 if ( part.is_stkoff() )
5716inline bool argloc_t::in_stack()
const
5718 if ( !is_scattered() )
5720 for (
const auto &part : scattered() )
5721 if ( !part.is_stkoff() )
5726inline bool argloc_t::is_mixed_scattered()
const
5728 if ( !is_scattered() )
5730 bool reg_found =
false;
5731 bool stkoff_found =
false;
5732 for (
const auto &part : scattered() )
5734 if ( part.is_reg() )
5736 if ( part.is_stkoff() )
5737 stkoff_found =
true;
5739 return reg_found && stkoff_found;
5749 if (
name ==
nullptr )
5866 return find_tinfo_udt_member(&udm, typid, STRMEM_OFFSET|strmem_flags);
5873 return find_tinfo_udt_member(&udm, typid, STRMEM_NAME|strmem_flags);
5951 r.typid = get_tinfo_property(tif.typid, tinfo_t::GTA_SAFE_PTR_OBJ);
5965#define TVIS_TYPE 0x0001
5966#define TVIS_NAME 0x0002
5967#define TVIS_CMT 0x0004
5968#define TVIS_RPTCMT 0x0008
5998#define TVST_PRUNE 0x01
5999#define TVST_DEF 0x02
6000#define TVST_LEVEL 0x04
6017 const char *cmt) = 0;
6025 return visit_subtypes(
this, out, tif, name, cmt);
6055#define PIO_NOATTR_FAIL 0x0004
6056#define PIO_IGNORE_PTRS 0x0008
6116 const char *name) = 0;
6182 : tif(_tif), ea(_ea), purged_bytes(_pb) {}
6188 return candidate == tif
6197 return candidate == tif
6222 const char *name=
nullptr,
6297 ea_t refinfo_ea=BADADDR);
6311 const char *enum_name,
6315 bool convert_to_bitmask,
6316 const char *enum_cmt=
nullptr)
6324 tid_t tid = BADADDR;
6346#define PTV_DEREF 0x0001
6349#define PTV_QUEST 0x0002
6350#define PTV_EMPTY 0x0004
6352#define PTV_CSTR 0x0008
6353#define PTV_EXPAND 0x0010
6356#define PTV_LZERO 0x0020
6357#define PTV_STPFLT 0x0040
6359#define PTV_SPACE 0x0080
6360#define PTV_DEBUG 0x0100
6361#define PTV_NOPTR 0x0200
6362#define PTV_NTOP 0x40000000
6363#define PTV_KEEP 0x80000000
6399 DEFINE_MEMORY_ALLOCATION_FUNCS()
6415#define VALSTR_OPEN 0x01
6419 DEFINE_MEMORY_ALLOCATION_FUNCS()
6421 struct flatten_args_t
6443 bool flatten(
const flatten_args_t &flargs,
int level);
6478 virtual int idaapi
print(
const char *str) = 0;
6499#define PDF_INCL_DEPS 0x1
6500#define PDF_DEF_FWD 0x2
6501#define PDF_DEF_BASE 0x4
6502#define PDF_HEADER_CMT 0x8
6536 bool dont_deref_ptr=
false);
6579 const p_list *fields) = 0;
6594 const til_t *root_til,
6620 void *ud =
nullptr);
6638 void *ud =
nullptr);
6678 return a1.compare(a2);
6703 retloc->swap(fti.
retloc);
iterator begin(void)
Get a pointer to the beginning of the qstring.
Definition pro.h:3177
Describes an argument location.
Definition typeinf.hpp:1101
rrel_t * rrel
Definition typeinf.hpp:1111
uint32 reginfo
Definition typeinf.hpp:1110
scattered_aloc_t * dist
Definition typeinf.hpp:1112
void * custom
Definition typeinf.hpp:1113
biggest_t biggest
Definition typeinf.hpp:1114
size_t biggest_t
Definition typeinf.hpp:1103
sval_t sval
Definition typeinf.hpp:1109
Vector of bytes (use for dynamic memory)
Definition pro.h:3773
Register allocation calling convention.
Definition typeinf.hpp:1733
callregs_t(callcnv_t cc)
Constructor - initialize with the given request (see init_regs())
Definition typeinf.hpp:1772
reg_kind_t
Init registers (sequential)
Definition typeinf.hpp:1809
@ FPREGS
Definition typeinf.hpp:1809
@ GPREGS
Definition typeinf.hpp:1809
void swap(callregs_t &r)
swap two instances
Definition typeinf.hpp:1775
argreg_policy_t policy
argument policy
Definition typeinf.hpp:1763
static int findreg(const intvec_t ®s, int r)
Definition typeinf.hpp:1839
bool reginds(int *gp_ind, int *fp_ind, int r) const
Get register indexes within GP/FP arrays.
Definition typeinf.hpp:1847
void reset()
Set policy and registers to invalid values.
Definition typeinf.hpp:1826
void set_registers(reg_kind_t kind, int first_reg, int last_reg)
Definition typeinf.hpp:1818
bool init_regs(callcnv_t cc)
Init policy & registers for given CC.
Definition typeinf.hpp:1784
void set(argreg_policy_t _policy, const int *gprs, const int *fprs)
Init policy & registers (arrays are -1-terminated)
Definition typeinf.hpp:1800
static int regcount(callcnv_t cc)
Get max number of registers may be used in a function call.
Definition typeinf.hpp:1832
intvec_t fpregs
array of fp registers (floating point)
Definition typeinf.hpp:1766
bool findregs(int *gp_ind, int *fp_ind, int r, const intvec_t &gprs, const intvec_t &fprs) const
Search for register r in gprs and fprs.
Definition typeinf.hpp:1855
int nregs
max number of registers that can be used in a call
Definition typeinf.hpp:1764
intvec_t gpregs
array of gp registers (general purpose)
Definition typeinf.hpp:1765
callregs_t()
Constructor.
Definition typeinf.hpp:1769
void append_registers(reg_kind_t kind, int first_reg, int last_reg)
Definition typeinf.hpp:1810
bool by_slots() const
Definition typeinf.hpp:1797
A function is a set of continuous ranges of addresses with characteristics.
Definition funcs.hpp:85
virtual int idaapi get_func_purged_bytes(const tinfo_t &candidate, const func_type_data_t &) override
Definition typeinf.hpp:6193
virtual bool idaapi func_has_stkframe_hole(const tinfo_t &candidate, const func_type_data_t &candidate_data) override
Definition typeinf.hpp:6184
ida_lowertype_helper_t(const tinfo_t &_tif, ea_t _ea, int _pb)
Definition typeinf.hpp:6181
Class to hold idc values.
Definition expr.hpp:315
Interface class - see ida_lowertype_helper_t.
Definition typeinf.hpp:6159
virtual int idaapi get_func_purged_bytes(const tinfo_t &candidate, const func_type_data_t &candidate_data)=0
virtual bool idaapi func_has_stkframe_hole(const tinfo_t &candidate, const func_type_data_t &candidate_data)=0
virtual ~lowertype_helper_t()
Definition typeinf.hpp:6161
Microcode of one basic block.
Definition hexrays.hpp:4184
Operand of an instruction.
Definition ua.hpp:170
Reimplementation of vector class from STL.
Definition pro.h:2250
void clear(void)
Destroy all elements and free memory.
Definition pro.h:2439
DEFINE_MEMORY_ALLOCATION_FUNCS() void push_back(const argpart_t &x)
Definition pro.h:2349
const int * const_iterator
Definition pro.h:2607
iterator end(void)
Get an iterator that points to the end of the qvector (NOT the last element)
Definition pro.h:2610
void resize(size_t _newsize, const T &x)
Resize to the given size.
Definition pro.h:2469
const edm_t & at(size_t _idx) const
Definition pro.h:2427
iterator find(const T &x)
Find an element in the qvector.
Definition pro.h:2703
qvector(void)
Definition pro.h:2328
edm_t & push_back(void)
Definition pro.h:2402
iterator begin(void)
Get an iterator that points to the first element in the qvector.
Definition pro.h:2609
void push_back(T &&x)
Append a new element to the end the qvector with a move semantics.
Definition pro.h:2361
size_t size(void) const
Get the number of elements in the qvector.
Definition pro.h:2423
ssize_t index(const edm_t &x) const
Definition pro.h:2723
Used to manage arguments that are described by multiple locations (also see ALOC_DIST)
Definition typeinf.hpp:1343
Primary mechanism for managing type information.
Definition typeinf.hpp:3046
bool remove_ptr_or_array()
Replace the current type with the ptr obj or array element.
Definition typeinf.hpp:3993
tinfo_code_t get_edm(edm_t *edm, size_t idx) const
Get enum member by its index.
Definition typeinf.hpp:3807
type_t get_forward_type() const
Get type of a forward declaration.
Definition typeinf.hpp:3417
THREAD_SAFE bool is_decl_udt() const
is_type_struni(get_decltype())
Definition typeinf.hpp:3448
DECLARE_COMPARISONS(tinfo_t)
Definition typeinf.hpp:4552
THREAD_SAFE bool is_decl_uint128() const
is_type_uint128(get_decltype())
Definition typeinf.hpp:3462
bool is_int64() const
is_type_int64(get_realtype())
Definition typeinf.hpp:3489
THREAD_SAFE bool is_decl_floating() const
is_type_floating(get_decltype())
Definition typeinf.hpp:3467
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.
Definition typeinf.hpp:4241
bool is_scalar() const
Does the type represent a single number?
Definition typeinf.hpp:3513
THREAD_SAFE bool is_decl_tbyte() const
is_type_tbyte(get_decltype())
Definition typeinf.hpp:3466
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.
Definition typeinf.hpp:4228
void create_typedef(const til_t *til, uint ord, type_t decl_type=BTF_TYPEDEF)
Definition typeinf.hpp:3904
bool get_array_details(array_type_data_t *ai) const
Get the array specific info.
Definition typeinf.hpp:3522
bool create_typedef(const typedef_type_data_t &p, type_t decl_type=BTF_TYPEDEF, bool try_ordinal=true)
Definition typeinf.hpp:3893
tinfo_code_t set_enum_radix(int radix, bool sign, uint etf_flags=0)
Set enum radix to display constants.
Definition typeinf.hpp:4371
tinfo_code_t set_enum_width(int nbytes, uint etf_flags=0)
Set the width of enum base type.
Definition typeinf.hpp:4324
tinfo_t get_rettype() const
BT_FUNC or BT_PTR BT_FUNC: Get the function's return type
Definition typeinf.hpp:3602
DEPRECATED bool set_declalign(uchar declalign)
Definition typeinf.hpp:4032
bool is_fixed_struct() const
Is a structure with fixed offsets?
Definition typeinf.hpp:3730
int get_type_cmt(qstring *out) const
Get type comment.
Definition typeinf.hpp:3429
tinfo_code_t set_named_type(til_t *til, const char *name, int ntf_flags=0)
Definition typeinf.hpp:3958
bool get_numbered_type(uint32 ordinal, type_t decl_type=BTF_TYPEDEF, bool resolve=true)
Definition typeinf.hpp:3234
bool has_vftable() const
Has a vftable?
Definition typeinf.hpp:3762
bool set_attrs(type_attrs_t *tav)
Set type attributes.
Definition typeinf.hpp:3878
tinfo_t get_onemember_type() const
For objects consisting of one member entirely: return type of the member.
Definition typeinf.hpp:3825
bool del_attr(const qstring &key, bool make_copy=true)
Del a type attribute. typerefs cannot be modified by this function.
Definition typeinf.hpp:3887
bool get_bit_buckets(range64vec_t *buckets) const
BT_STRUCT: get bit buckets Bit buckets are used to layout bitfields
Definition typeinf.hpp:3626
uint32 get_alignment() const
Get type alignment This function returns the effective type alignment.
Definition typeinf.hpp:3325
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_declal...
Definition typeinf.hpp:4078
tinfo_t get_innermost_member_type(uint64 bitoffset, uint64 *out_bitoffset=nullptr) const
Get the innermost member type at the given offset.
Definition typeinf.hpp:3840
size_t get_enum_nmembers() const
Get number of enum members.
Definition typeinf.hpp:3769
bool get_named_type(const char *name, type_t decl_type=BTF_TYPEDEF, bool resolve=true, bool try_ordinal=true)
Definition typeinf.hpp:3216
THREAD_SAFE bool is_decl_complex() const
is_type_complex(get_decltype())
Definition typeinf.hpp:3443
uint32 get_final_ordinal() const
Get final type ordinal (0 if none)
Definition typeinf.hpp:3400
bool create_udt(bool is_union=false)
Create an empty structure/union.
Definition typeinf.hpp:5765
THREAD_SAFE bool is_decl_uchar() const
is_type_uchar(get_decltype())
Definition typeinf.hpp:3458
tinfo_code_t set_enum_sign(type_sign_t sign, uint etf_flags=0)
Set enum sign.
Definition typeinf.hpp:4332
bool get_type_name(qstring *out) const
Does a type refer to a name?
Definition typeinf.hpp:3355
bool is_one_fpval() const
Floating value or an object consisting of one floating member entirely.
Definition typeinf.hpp:3752
THREAD_SAFE bool is_decl_uint32() const
is_type_uint32(get_decltype())
Definition typeinf.hpp:3460
bool is_ext_arithmetic() const
is_type_ext_arithmetic(get_realtype())
Definition typeinf.hpp:3511
type_sign_t get_sign() const
Get type sign.
Definition typeinf.hpp:3333
bool is_volatile() const
is_type_volatile(get_realtype())
Definition typeinf.hpp:3474
THREAD_SAFE bool is_decl_ldouble() const
is_type_ldouble(get_decltype())
Definition typeinf.hpp:3463
static tinfo_t get_stock(stock_type_id_t id)
Get stock type information.
Definition typeinf.hpp:3982
void set_modifiers(type_t mod)
Definition typeinf.hpp:4013
uint32 get_alias_target() const
Get type alias If the type has no alias, return 0.
Definition typeinf.hpp:4059
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.
Definition typeinf.hpp:3254
ssize_t get_udm_by_tid(udm_t *udm, tid_t tid)
Retrive tinfo using type TID or struct/enum member MID.
Definition typeinf.hpp:3940
bool is_ptr_or_array() const
is_type_ptr_or_array(get_realtype())
Definition typeinf.hpp:3506
bool is_vararg_cc() const
is_vararg_cc(get_cc())
Definition typeinf.hpp:3610
tinfo_code_t set_type_alignment(uchar declalign, uint etf_flags=0)
Set type alignment.
Definition typeinf.hpp:4027
bool is_uint() const
is_type_uint(get_realtype())
Definition typeinf.hpp:3494
bool get_enum_details(enum_type_data_t *ei) const
Get the enum specific info.
Definition typeinf.hpp:3528
tinfo_t get_ptrarr_object() const
BT_PTR & BT_ARRAY: get the pointed object or array element.
Definition typeinf.hpp:3570
tinfo_code_t save_type(int ntf_flags=NTF_TYPE|NTF_REPLACE)
Definition typeinf.hpp:3961
bool is_user_cc() const
is_user_cc(get_cc())
Definition typeinf.hpp:3609
til_t * get_til() const
Get the type library for tinfo_t.
Definition typeinf.hpp:3403
uchar get_declalign() const
Get declared alignment of the type.
Definition typeinf.hpp:3342
bool is_tuple() const
Is a tuple?
Definition typeinf.hpp:3733
bool is_varmember() const
Can the type be of a variable struct member?
Definition typeinf.hpp:3563
THREAD_SAFE bool is_decl_union() const
is_type_union(get_decltype())
Definition typeinf.hpp:3447
tinfo_code_t set_func_cc(callcnv_t cc, uint etf_flags=0)
Set function calling convention.
Definition typeinf.hpp:4528
bool get_attrs(type_attrs_t *tav, bool all_attrs=false) const
Get type attributes (all_attrs: include attributes of referenced types, if any)
Definition typeinf.hpp:3870
int get_udt_nmembers() const
Get number of udt members. -1-error.
Definition typeinf.hpp:3706
bool is_float() const
is_type_float(get_realtype())
Definition typeinf.hpp:3502
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.
Definition typeinf.hpp:3815
const char * dstr() const
Function to facilitate debugging.
Definition typeinf.hpp:3867
bool get_nice_type_name(qstring *out) const
Get the beautified type name.
Definition typeinf.hpp:3359
bool is_empty_enum() const
Is an empty enum? (has no constants)
Definition typeinf.hpp:3772
ssize_t get_by_edm_name(const char *mname, const til_t *til=nullptr)
Retrieve enum tinfo using enum member name.
Definition typeinf.hpp:3950
bool is_arithmetic() const
is_type_arithmetic(get_realtype())
Definition typeinf.hpp:3510
THREAD_SAFE bool is_decl_char() const
is_type_char(get_decltype())
Definition typeinf.hpp:3456
bool is_floating() const
is_type_floating(get_realtype())
Definition typeinf.hpp:3509
bool clr_const()
Definition typeinf.hpp:4021
tinfo_code_t set_funcarg_type(size_t index, const tinfo_t &tif, uint etf_flags=0)
Set type of a function argument.
Definition typeinf.hpp:4490
THREAD_SAFE bool is_decl_enum() const
is_type_enum(get_decltype())
Definition typeinf.hpp:3449
tid_t get_tid() const
Get the type tid Each type in the local type library has a so-called tid associated with it.
Definition typeinf.hpp:3386
bool is_char() const
is_type_char(get_realtype())
Definition typeinf.hpp:3493
void set_const()
Definition typeinf.hpp:4014
tinfo_t(const tinfo_t &r)
Constructor.
Definition typeinf.hpp:3187
THREAD_SAFE bool is_decl_uint() const
is_type_uint(get_decltype())
Definition typeinf.hpp:3457
bool create_simple_type(type_t decl_type)
Definition typeinf.hpp:3889
tinfo_code_t set_enum_repr(const value_repr_t &repr, uint etf_flags=0)
Set the representation of enum members.
Definition typeinf.hpp:4365
bool is_int128() const
is_type_int128(get_realtype())
Definition typeinf.hpp:3488
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 ...
Definition typeinf.hpp:4040
bool is_unaligned_struct() const
Is an unaligned struct.
Definition typeinf.hpp:3718
tinfo_code_t rename_funcarg(size_t index, const char *name, uint etf_flags=0)
Rename a function argument.
Definition typeinf.hpp:4480
THREAD_SAFE bool is_decl_unknown() const
is_type_unknown(get_decltype())
Definition typeinf.hpp:3438
THREAD_SAFE bool is_decl_int64() const
is_type_int64(get_decltype())
Definition typeinf.hpp:3452
THREAD_SAFE bool is_decl_int128() const
is_type_int128(get_decltype())
Definition typeinf.hpp:3451
bool is_int16() const
is_type_int16(get_realtype())
Definition typeinf.hpp:3491
bool set_type_alias(uint32 dest_ord)
Set type alias Redirects all references to source type to the destination type.
Definition typeinf.hpp:4068
tinfo_t get_pointed_object() const
BT_PTR: get type of pointed object.
Definition typeinf.hpp:3575
tinfo_code_t del_udms(size_t idx1, size_t idx2, uint etf_flags=0)
Delete structure/union members in the range [idx1, idx2)
Definition typeinf.hpp:4196
bool is_forward_struct() const
Definition typeinf.hpp:3418
const char type_t decl_type
Definition typeinf.hpp:3212
bool is_small_udt() const
Is a small udt? (can fit a register or a pair of registers)
Definition typeinf.hpp:3712
bool is_unsigned() const
Is this an unsigned type?
Definition typeinf.hpp:3339
friend tinfo_t remove_pointer(const tinfo_t &tif)
BT_PTR: If the current type is a pointer, return the pointed object.
Definition typeinf.hpp:5948
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.
Definition typeinf.hpp:3854
tinfo_t(type_t decl_type)
Constructor - can only be used to initialize simple types!
Definition typeinf.hpp:3178
tinfo_code_t create_forward_decl(til_t *til, type_t decl_type, const char *name, int ntf_flags=0)
Create a forward declaration.
Definition typeinf.hpp:3967
tinfo_code_t set_numbered_type(til_t *til, uint32 ord, int ntf_flags=0, const char *name=nullptr)
Definition typeinf.hpp:3960
bool is_cpp_struct() const
Is a c++ object, not simple pod type.
Definition typeinf.hpp:3724
bool is_varstruct() const
Is a variable-size structure?
Definition typeinf.hpp:3558
bool is_msstruct() const
Is gcc msstruct attribute applied.
Definition typeinf.hpp:3721
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.
Definition typeinf.hpp:3264
uint32 get_ordinal() const
Get type ordinal (only if the type was created as a numbered type, 0 if none)
Definition typeinf.hpp:3397
bool get_udt_details(udt_type_data_t *udt, gtd_udt_t gtd=GTD_CALC_LAYOUT) const
Get the udt specific info.
Definition typeinf.hpp:3540
const char type_t bool bool try_ordinal
Definition typeinf.hpp:3214
THREAD_SAFE bool is_decl_array() const
is_type_array(get_decltype())
Definition typeinf.hpp:3441
tid_t get_udm_tid(size_t idx) const
Get udt member TID.
Definition typeinf.hpp:4100
uint64 write_bitfield_value(uint64 dst, uint64 v, int bitoff) const
Definition typeinf.hpp:4006
bool is_typedef() const
Is this a typedef?
Definition typeinf.hpp:3425
THREAD_SAFE bool empty() const
Was tinfo_t initialized with some type info or not?
Definition typeinf.hpp:3308
bool create_enum(enum_type_data_t &p, type_t decl_type=BTF_ENUM)
Definition typeinf.hpp:3928
tinfo_code_t del_udm(size_t index, uint etf_flags=0)
Delete a structure/union member.
Definition typeinf.hpp:4190
tinfo_code_t del_funcarg(size_t idx, uint etf_flags=0)
Definition typeinf.hpp:4513
bool is_shifted_ptr() const
Is a shifted pointer?
Definition typeinf.hpp:3555
bool get_ptr_details(ptr_type_data_t *pi) const
Get the pointer info.
Definition typeinf.hpp:3516
bool is_sue() const
is_type_sue(get_realtype())
Definition typeinf.hpp:3486
int get_ptrarr_objsize() const
BT_PTR & BT_ARRAY: get size of pointed object or array element. On error returns -1
Definition typeinf.hpp:3566
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.
Definition typeinf.hpp:4312
tinfo_code_t set_func_rettype(const tinfo_t &tif, uint etf_flags=0)
Set function return type .
Definition typeinf.hpp:4499
bool clr_volatile()
Definition typeinf.hpp:4022
THREAD_SAFE bool is_decl_void() const
is_type_void(get_decltype())
Definition typeinf.hpp:3436
THREAD_SAFE bool is_decl_uint16() const
is_type_uint16(get_decltype())
Definition typeinf.hpp:3459
uint32 get_udt_taudt_bits() const
Get udt_type_data_t::taudt_bits.
Definition typeinf.hpp:3715
tinfo_code_t set_fixed_struct(bool on=true)
Declare struct member offsets as fixed.
Definition typeinf.hpp:4248
bool is_funcptr() const
Is this pointer to a function?
Definition typeinf.hpp:3552
bool is_forward_enum() const
Definition typeinf.hpp:3420
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.
Definition typeinf.hpp:4279
bool is_integral() const
is_type_integral(get_realtype())
Definition typeinf.hpp:3507
type_t get_enum_base_type() const
Get enum base type (convert enum to integer type) Returns BT_UNK if failed to convert.
Definition typeinf.hpp:3776
ssize_t get_edm_by_tid(edm_t *edm, tid_t tid)
Definition typeinf.hpp:3941
THREAD_SAFE bool has_details() const
Does this type refer to a nontrivial type?
Definition typeinf.hpp:3348
THREAD_SAFE bool is_decl_int32() const
is_type_int32(get_decltype())
Definition typeinf.hpp:3453
bool is_high_func() const
BT_FUNC: Is high level type?
Definition typeinf.hpp:3617
THREAD_SAFE bool is_decl_float() const
is_type_float(get_decltype())
Definition typeinf.hpp:3465
bool convert_array_to_ptr()
Convert an array into a pointer.
Definition typeinf.hpp:5815
bool is_bitfield() const
is_type_bitfld(get_realtype())
Definition typeinf.hpp:3487
bool equals_to(const tinfo_t &r) const
Definition typeinf.hpp:4574
THREAD_SAFE bool is_decl_struct() const
is_type_struct(get_decltype())
Definition typeinf.hpp:3446
tinfo_code_t rename_udm(size_t index, const char *name, uint etf_flags=0)
Rename a structure/union member.
Definition typeinf.hpp:4204
tinfo_code_t set_symbol_type(til_t *til, const char *name, int ntf_flags=0)
Definition typeinf.hpp:3959
THREAD_SAFE bool is_decl_sue() const
is_type_sue(get_decltype())
Definition typeinf.hpp:3445
void create_typedef(const til_t *til, const char *name, type_t decl_type=BTF_TYPEDEF, bool try_ordinal=true)
Definition typeinf.hpp:3903
bool create_func(func_type_data_t &p, type_t decl_type=BT_FUNC)
Definition typeinf.hpp:3929
tinfo_code_t edit_edm(size_t idx, uint64 value, bmask64_t bmask=DEFMASK64, uint etf_flags=0)
Change constant value and/or bitmask.
Definition typeinf.hpp:4469
bool is_uchar() const
is_type_uchar(get_realtype())
Definition typeinf.hpp:3495
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.
Definition typeinf.hpp:4111
bool create_udt(udt_type_data_t &p, type_t decl_type)
Definition typeinf.hpp:3927
bool change_sign(type_sign_t sign)
Change the type sign. Works only for the types that may have sign.
Definition typeinf.hpp:4036
bool present() const
Is the type really present? (not a reference to a missing type, for example)
Definition typeinf.hpp:3311
tinfo_code_t set_struct_size(size_t new_size)
Explicitly specify the struct size.
Definition typeinf.hpp:4255
tinfo_code_t del_edms(size_t idx1, size_t idx2, uint etf_flags=0)
Delete enum members.
Definition typeinf.hpp:4420
bool is_manually_castable_to(const tinfo_t &target) const
Definition typeinf.hpp:4576
uint64 read_bitfield_value(uint64 v, int bitoff) const
Definition typeinf.hpp:4005
bool has_union() const
Has a member of type "union"?
Definition typeinf.hpp:3765
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.
Definition typeinf.hpp:5755
THREAD_SAFE bool is_decl_int() const
is_type_int(get_decltype())
Definition typeinf.hpp:3455
bool create_bitfield(const bitfield_type_data_t &p, type_t decl_type=BT_BITFIELD)
Definition typeinf.hpp:3892
int get_array_nelems() const
BT_ARRAY: get number of elements (-1 means error)
Definition typeinf.hpp:3590
bool is_frame() const
Is a function frame?
Definition typeinf.hpp:4297
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)
Definition typeinf.hpp:4389
bool append_covered(rangeset_t *out, uint64 offset=0) const
Calculate set of covered bytes for the type.
Definition typeinf.hpp:3745
bool clr_const_volatile()
Definition typeinf.hpp:4023
bool create_enum(bte_t bte=BTE_ALWAYS|BTE_HEX)
Create an empty enum.
Definition typeinf.hpp:5777
const char * name
Definition typeinf.hpp:3211
THREAD_SAFE bool is_well_defined() const
!(empty()) && !(is_decl_partial()) && !(is_punknown())
Definition typeinf.hpp:3470
bool is_udm_by_til(size_t idx) const
Was the member created due to the type system.
Definition typeinf.hpp:4235
size_t get_unpadded_size() const
Get the type size in bytes without the final padding, in bytes.
Definition typeinf.hpp:3321
bool detach()
Detach tinfo_t from the underlying type.
Definition typeinf.hpp:3241
THREAD_SAFE bool is_decl_volatile() const
is_type_volatile(get_decltype())
Definition typeinf.hpp:3435
bool is_enum() const
is_type_enum(get_realtype())
Definition typeinf.hpp:3485
int get_udm(udm_t *out, const char *name) const
Retrieve a structure/union member with the specified name.
Definition typeinf.hpp:5876
tinfo_t get_final_element() const
repeat recursively: if an array, return the type of its element; else return the type itself.
Definition typeinf.hpp:3587
bool is_array() const
is_type_array(get_realtype())
Definition typeinf.hpp:3479
bool is_tbyte() const
is_type_tbyte(get_realtype())
Definition typeinf.hpp:3503
tinfo_code_t copy_type(til_t *til, const char *name, int ntf_flags=NTF_TYPE|NTF_COPY)
Definition typeinf.hpp:3962
bool create_ptr(const ptr_type_data_t &p, type_t decl_type=BT_PTR)
Definition typeinf.hpp:3890
THREAD_SAFE bool is_decl_const() const
is_type_const(get_decltype())
Definition typeinf.hpp:3434
bool is_ext_integral() const
is_type_ext_integral(get_realtype())
Definition typeinf.hpp:3508
bool is_int() const
is_type_int(get_realtype())
Definition typeinf.hpp:3492
bool set_methods(udtmembervec_t &methods)
BT_COMPLEX: set the list of member functions.
Definition typeinf.hpp:4045
bool is_forward_union() const
Definition typeinf.hpp:3419
THREAD_SAFE bool is_decl_func() const
is_type_func(get_decltype())
Definition typeinf.hpp:3442
bool is_uint128() const
is_type_uint128(get_realtype())
Definition typeinf.hpp:3499
THREAD_SAFE bool is_decl_ptr() const
is_type_ptr(get_decltype())
Definition typeinf.hpp:3440
THREAD_SAFE bool is_decl_double() const
is_type_double(get_decltype())
Definition typeinf.hpp:3464
bool calc_gaps(rangeset_t *out) const
Calculate set of padding bytes for the type.
Definition typeinf.hpp:3749
bool get_final_type_name(qstring *out) const
Use in the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn).
Definition typeinf.hpp:3370
bool is_from_subtil() const
Was the named type found in some base type library (not the top level type library)?
Definition typeinf.hpp:3408
tid_t force_tid()
Get the type tid.
Definition typeinf.hpp:3394
THREAD_SAFE bool is_decl_last() const
is_typeid_last(get_decltype())
Definition typeinf.hpp:3439
bool create_array(const array_type_data_t &p, type_t decl_type=BT_ARRAY)
Definition typeinf.hpp:3891
bool is_correct() const
Is the type object correct?
Definition typeinf.hpp:3285
tinfo_t()
Constructor.
Definition typeinf.hpp:3176
bool is_forward_decl() const
Is this a forward declaration?
Definition typeinf.hpp:3412
bool is_int32() const
is_type_int32(get_realtype())
Definition typeinf.hpp:3490
bool is_bitmask_enum() const
Is bitmask enum?
Definition typeinf.hpp:3781
tinfo_code_t del_funcargs(size_t idx1, size_t idx2, uint etf_flags=0)
Delete function arguments.
Definition typeinf.hpp:4509
void del_attrs()
Del all type attributes. typerefs cannot be modified by this function.
Definition typeinf.hpp:3884
tinfo_t & operator=(const tinfo_t &r)
Copy contents of given tinfo into this one.
Definition typeinf.hpp:3189
bool is_bool() const
is_type_bool(get_realtype())
Definition typeinf.hpp:3504
tinfo_t(const char *decl, til_t *til=nullptr, int pt_flags=0)
Constructor - will attempt to parse the provided C declaration.
Definition typeinf.hpp:3180
bool is_aliased() const
Definition typeinf.hpp:4063
ea_t get_frame_func() const
Get function address for the frame.
Definition typeinf.hpp:4300
bool is_empty_udt() const
Is an empty struct/union? (has no fields)
Definition typeinf.hpp:3709
tinfo_code_t set_enum_is_bitmask(bitmask_cvt_stance_t stance=ENUMBM_ON, uint etf_flags=0)
Definition typeinf.hpp:4360
int get_nargs() const
BT_FUNC or BT_PTR BT_FUNC: Calculate number of arguments (-1 - error)
Definition typeinf.hpp:3605
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.
Definition typeinf.hpp:4222
bool is_anonymous_udt() const
Is an anonymous struct/union?
Definition typeinf.hpp:3759
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.
Definition typeinf.hpp:3833
bitmask_cvt_stance_t
Set or clear the 'bitmask' attribute of an enum.
Definition typeinf.hpp:4355
@ ENUMBM_ON
convert to bitmask enum
Definition typeinf.hpp:4357
@ ENUMBM_OFF
convert to ordinal enum
Definition typeinf.hpp:4356
@ ENUMBM_AUTO
convert to bitmask if the outcome is nice and useful
Definition typeinf.hpp:4358
type_t get_modifiers() const
Definition typeinf.hpp:4012
bool get_func_frame(const func_t *pfn)
Create a tinfo_t object for the function frame.
Definition typeinf.hpp:4294
tinfo_code_t add_funcarg(const funcarg_t &farg, uint etf_flags=0, ssize_t idx=-1)
Add a function argument.
Definition typeinf.hpp:4522
type_t get_realtype(bool full=false) const
Get the resolved base type.
Definition typeinf.hpp:3298
tinfo_code_t set_func_retloc(const argloc_t &argloc, uint etf_flags=0)
Set location of function return value.
Definition typeinf.hpp:4547
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.
Definition typeinf.hpp:4052
int calc_purged_bytes() const
BT_FUNC: Calculate number of purged bytes
Definition typeinf.hpp:3614
void set_volatile()
Definition typeinf.hpp:4015
void swap(tinfo_t &r)
Assign this = r and r = this.
Definition typeinf.hpp:3195
void clear()
Clear contents of this tinfo, and remove from the type system.
Definition typeinf.hpp:3193
bool is_partial() const
is_type_partial(get_realtype())
Definition typeinf.hpp:3476
bool get_methods(udtmembervec_t *methods) const
BT_COMPLEX: get a list of member functions declared in this udt.
Definition typeinf.hpp:3621
bool is_pvoid() const
Is "void *"?. This function does not check the pointer attributes and type modifiers.
Definition typeinf.hpp:3578
int get_udm_by_offset(udm_t *out, uint64 offset) const
Retrieve a structure/union member with the specified offset.
Definition typeinf.hpp:5897
bool is_ldouble() const
is_type_ldouble(get_realtype())
Definition typeinf.hpp:3500
bool parse(const char *decl, til_t *til=nullptr, int pt_flags=0)
Convenience function to parse a string with a type declaration.
Definition typeinf.hpp:3912
bool get_attr(const qstring &key, bytevec_t *bv, bool all_attrs=true) const
Get a type attribute.
Definition typeinf.hpp:3873
uint32 calc_score() const
Calculate the type score (the higher - the nicer is the type)
Definition typeinf.hpp:3843
tinfo_t get_array_element() const
BT_ARRAY: get type of array element. See also get_ptrarr_object()
Definition typeinf.hpp:3584
bool is_const() const
is_type_const(get_realtype())
Definition typeinf.hpp:3473
int get_enum_width() const
Get enum width.
Definition typeinf.hpp:3795
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.
Definition typeinf.hpp:3244
tinfo_code_t rename_type(const char *name, int ntf_flags=0)
Rename a type.
Definition typeinf.hpp:3365
DEFINE_MEMORY_ALLOCATION_FUNCS() inline bool get_named_type(const til_t *til
Create a tinfo_t object for an existing named type.
bool is_sse_type() const
Is a SSE vector type?
Definition typeinf.hpp:3755
THREAD_SAFE bool is_decl_uint64() const
is_type_uint64(get_decltype())
Definition typeinf.hpp:3461
bool is_double() const
is_type_double(get_realtype())
Definition typeinf.hpp:3501
bool is_func() const
is_type_func(get_realtype())
Definition typeinf.hpp:3480
bool get_next_type_name(qstring *out) const
Use In the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3...TYPEn).
Definition typeinf.hpp:3375
bool is_uint64() const
is_type_uint64(get_realtype())
Definition typeinf.hpp:3498
bool is_ptr() const
is_type_ptr(get_realtype())
Definition typeinf.hpp:3478
bool get_type_by_tid(tid_t tid)
Definition typeinf.hpp:3942
bool requires_qualifier(qstring *out, const char *name, uint64 offset) const
Requires full qualifier?
Definition typeinf.hpp:3740
int find_udm(udm_t *udm, int strmem_flags) const
BTF_STRUCT,BTF_UNION: Find a udt member.
Definition typeinf.hpp:3635
bool get_bitfield_details(bitfield_type_data_t *bi) const
Get the bitfield specific info.
Definition typeinf.hpp:3534
tinfo_code_t get_enum_repr(value_repr_t *repr) const
Set the representation of enum members.
Definition typeinf.hpp:3790
ssize_t get_edm(edm_t *out, const char *name) const
Get enum member by its name.
Definition typeinf.hpp:3802
bool set_attr(const type_attr_t &ta, bool may_overwrite=true)
Set a type attribute. If necessary, a new typid will be created.
Definition typeinf.hpp:3881
bool is_struct() const
is_type_struct(get_realtype())
Definition typeinf.hpp:3482
size_t get_size(uint32 *p_effalign=nullptr, int gts_code=0) const
Get the type size in bytes.
Definition typeinf.hpp:3317
bool is_purging_cc() const
is_purging_cc(get_cc())
Definition typeinf.hpp:3611
THREAD_SAFE bool is_decl_paf() const
is_type_paf(get_decltype())
Definition typeinf.hpp:3469
bool is_complex() const
is_type_complex(get_realtype())
Definition typeinf.hpp:3481
tinfo_code_t set_edm_cmt(size_t idx, const char *cmt, uint etf_flags=0)
Set a comment for an enum member.
Definition typeinf.hpp:4458
bool get_type_rptcmt(qstring *out) const
Get type comment only if it is repeatable.
Definition typeinf.hpp:3432
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.
Definition typeinf.hpp:3546
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.
Definition typeinf.hpp:5926
bool is_paf() const
is_type_paf(get_realtype())
Definition typeinf.hpp:3505
bool is_punknown() const
Is "_UNKNOWN *"?. This function does not check the pointer attributes and type modifiers.
Definition typeinf.hpp:3581
THREAD_SAFE bool is_decl_bitfield() const
is_type_bitfld(get_decltype())
Definition typeinf.hpp:3450
tinfo_code_t set_tuple(bool on=true)
Declare struct as a tuple.
Definition typeinf.hpp:4290
bool is_signed() const
Is this a signed type?
Definition typeinf.hpp:3336
THREAD_SAFE bool is_decl_int16() const
is_type_int16(get_decltype())
Definition typeinf.hpp:3454
tid_t get_edm_tid(size_t idx) const
Get enum member TID.
Definition typeinf.hpp:3822
tinfo_code_t rename_edm(size_t idx, const char *name, uint etf_flags=0)
Rename a enum member.
Definition typeinf.hpp:4448
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.
Definition typeinf.hpp:4215
tinfo_code_t del_edm(size_t idx, uint etf_flags=0)
Definition typeinf.hpp:4424
THREAD_SAFE bool is_decl_partial() const
is_type_partial(get_decltype())
Definition typeinf.hpp:3437
bool is_uint32() const
is_type_uint32(get_realtype())
Definition typeinf.hpp:3497
bool is_unknown() const
is_type_unknown(get_realtype())
Definition typeinf.hpp:3477
THREAD_SAFE bool is_decl_bool() const
is_type_bool(get_decltype())
Definition typeinf.hpp:3468
const char type_t bool resolve
Definition typeinf.hpp:3213
int get_enum_radix() const
Get enum constant radix.
Definition typeinf.hpp:3786
THREAD_SAFE bool is_decl_typedef() const
is_type_typedef(get_decltype())
Definition typeinf.hpp:3444
bool is_union() const
is_type_union(get_realtype())
Definition typeinf.hpp:3483
tinfo_code_t set_funcarg_loc(size_t index, const argloc_t &argloc, uint etf_flags=0)
Set location of a function argument.
Definition typeinf.hpp:4538
THREAD_SAFE type_t get_decltype() const
Get declared type (without resolving type references; they are returned as is).
Definition typeinf.hpp:3305
bool is_vftable() const
Is a vftable type?
Definition typeinf.hpp:3727
bool compare_with(const tinfo_t &r, int tcflags=0) const
Compare two types, based on given flags (see tinfo_t comparison flags)
Definition typeinf.hpp:4573
void clr_decl_const_volatile()
Definition typeinf.hpp:4017
~tinfo_t()
Destructor.
Definition typeinf.hpp:3191
callcnv_t get_cc() const
BT_FUNC or BT_PTR BT_FUNC: Get calling convention
Definition typeinf.hpp:3608
bool is_castable_to(const tinfo_t &target) const
Definition typeinf.hpp:4575
bool is_udt() const
is_type_struni(get_realtype())
Definition typeinf.hpp:3484
bool is_void() const
is_type_void(get_realtype())
Definition typeinf.hpp:3475
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())
Definition typeinf.hpp:3593
THREAD_SAFE bool is_typeref() const
Is this type a type reference?.
Definition typeinf.hpp:3345
tinfo_code_t set_udt_pack(int pack, uint etf_flags=0)
Set structure packing.
Definition typeinf.hpp:4090
bool is_uint16() const
is_type_uint16(get_realtype())
Definition typeinf.hpp:3496
uint64 calc_enum_mask() const
Definition typeinf.hpp:3796
Text representation of a data value (value string).
Definition typeinf.hpp:6408
qstring oneline
result if printed on one line in UTF-8 encoding
Definition typeinf.hpp:6410
bool append_char(char c, int max_length)
bool flatten(const flatten_args_t &flargs, int level)
void set_oneline(const char *line, int len)
Definition typeinf.hpp:6431
bool convert_to_one_line(int ptvf, int max_length)
~valstr_t()
Definition typeinf.hpp:6450
struct valstrs_t * members
strings for members, each member separately
Definition typeinf.hpp:6412
void consume_oneline(const qstring &line)
Definition typeinf.hpp:6436
void update_length(int ptvf)
int props
temporary properties, used internally
Definition typeinf.hpp:6414
valinfo_t * info
additional info
Definition typeinf.hpp:6413
valstr_t()
Definition typeinf.hpp:6417
friend struct() private valstr_sink_t
Definition typeinf.hpp:6419
size_t length
length if printed on one line
Definition typeinf.hpp:6411
idaman callcnv_t ida_export find_custom_callcnv(const char *name)
Find a calling convention by its name.
idaman size_t ida_export get_custom_callcnvs(qstrvec_t *names, callcnvs_t *codes)
Get all custom calling conventions.
argreg_policy_t
Function argument passing: how GP & FP registers cooperate with each other.
Definition typeinf.hpp:1714
idaman int ida_export verify_argloc(const argloc_t &vloc, int size, const rangeset_t *gaps)
Verify argloc_t.
constexpr THREAD_SAFE bool is_purging_cc(callcnv_t cc)
Does the calling convention clean the stack arguments upon return?
Definition typeinf.hpp:1474
void helper_set_cc(cm_t *cm, callcnv_t *new_callcnv, callcnv_t cc)
Definition typeinf.hpp:1432
constexpr THREAD_SAFE bool is_vararg_cc(callcnv_t cc)
Does the calling convention use ellipsis?
Definition typeinf.hpp:1466
idaman const custom_callcnv_t *ida_export get_custom_callcnv(callcnv_t callcnv)
Retrieve custom calling convention details.
idaman int ida_export install_custom_argloc(const custloc_desc_t *custloc)
Save a custom argloc.
int idaapi for_all_const_arglocs(const_aloc_visitor_t &vv, const argloc_t &vloc, int size, int off=0)
See for_all_arglocs()
Definition typeinf.hpp:1399
const argloc_type_t ALOC_NONE
none
Definition typeinf.hpp:953
callcnv_t helper_get_cc(cm_t cm, callcnv_t new_callcnv)
Definition typeinf.hpp:1423
qvector< argpart_t > argpartvec_t
Definition typeinf.hpp:1339
const argloc_type_t ALOC_CUSTOM
custom argloc (7 or higher)
Definition typeinf.hpp:960
const argloc_type_t ALOC_RREL
register relative
Definition typeinf.hpp:958
const argloc_type_t ALOC_DIST
distributed (scattered)
Definition typeinf.hpp:955
const argloc_type_t ALOC_REG2
register pair
Definition typeinf.hpp:957
idaman bool ida_export unregister_custom_callcnv(callcnv_t callcnv)
Unregister a calling convention.
const argloc_type_t ALOC_STATIC
global address
Definition typeinf.hpp:959
idaman bool ida_export get_stkarg_area_info(stkarg_area_info_t *out, callcnv_t cc)
Some calling conventions foresee special areas on the stack for call arguments.
const argloc_type_t ALOC_REG1
one register (and offset within it)
Definition typeinf.hpp:956
idaman const custloc_desc_t *ida_export retrieve_custom_argloc(int idx)
Retrieve the custom argloc at the given index.
constexpr THREAD_SAFE bool is_user_cc(callcnv_t cc)
Does the calling convention specify argument locations explicitly?
Definition typeinf.hpp:1460
idaman size_t ida_export print_argloc(char *buf, size_t bufsize, const argloc_t &vloc, int size=0, int vflags=0)
Convert an argloc to human readable form.
constexpr bool is_swift_cc(callcnv_t cc)
Swift calling convention (arguments and return values in registers)?
Definition typeinf.hpp:1503
idaman int ida_export for_all_arglocs(aloc_visitor_t &vv, argloc_t &vloc, int size, int off=0)
Compress larger argloc types and initiate the aloc visitor.
constexpr bool is_golang_cc(callcnv_t cc)
GO language calling convention (return value in stack)?
Definition typeinf.hpp:1486
void set_cc(callcnv_t cc)
Definition typeinf.hpp:1448
qvector< argloc_t > arglocs_t
vector of argument locations
Definition typeinf.hpp:1309
idaman callcnv_t ida_export register_custom_callcnv(const custom_callcnv_t &ccinf)
Register a calling convention.
idaman bool ida_export optimize_argloc(argloc_t *vloc, int size, const rangeset_t *gaps)
Verify and optimize scattered argloc into simple form.
idaman bool ida_export remove_custom_argloc(int idx)
Delete the custom argloc at the given index.
const argloc_type_t ALOC_STACK
stack offset
Definition typeinf.hpp:954
callcnv_t get_cc() const
Definition typeinf.hpp:1447
bool is_custom_callcnv(callcnv_t cc)
Is custom calling convention?
Definition typeinf.hpp:1492
callcnv_t get_effective_cc(callcnv_t cc)
Get effective calling convention (with respect to default CC)
Definition typeinf.hpp:1451
@ ARGREGS_GP_ONLY
GP registers used for all arguments.
Definition typeinf.hpp:1716
@ ARGREGS_POLICY_UNDEFINED
Definition typeinf.hpp:1715
@ ARGREGS_RISCV
Risc-V API FP arguments are passed in GP registers if FP registers are exhausted and GP ones are not.
Definition typeinf.hpp:1721
@ ARGREGS_FP_MASKS_GP
FP register also consumes one or more GP regs but not vice versa (aix ppc ABI)
Definition typeinf.hpp:1719
@ ARGREGS_BY_SLOTS
fixed FP/GP register per each slot (like vc64)
Definition typeinf.hpp:1718
@ ARGREGS_MIPS_O32
MIPS ABI o32.
Definition typeinf.hpp:1720
@ ARGREGS_INDEPENDENT
FP/GP registers used separately (like gcc64)
Definition typeinf.hpp:1717
const type_t BFA_STATIC
static
Definition typeinf.hpp:925
const type_t BFA_FUNC_EXT_FORMAT
This is NOT a real attribute (used internally as marker for extended format)
Definition typeinf.hpp:929
const type_t BFA_NORET
__noreturn
Definition typeinf.hpp:922
const cm_t BFA_FUNC_MARKER
This is NOT a cc! (used internally as a marker)
Definition typeinf.hpp:928
const type_t BFA_VIRTUAL
virtual
Definition typeinf.hpp:926
const type_t BFA_HIGH
high level prototype (with possibly hidden args)
Definition typeinf.hpp:924
const type_t BFA_PURE
__pure
Definition typeinf.hpp:923
const cm_t C_PC_FLAT
Definition typeinf.hpp:1417
const cm_t C_PC_SMALL
Definition typeinf.hpp:1412
const cm_t C_PC_MEDIUM
Definition typeinf.hpp:1414
const cm_t C_PC_LARGE
Definition typeinf.hpp:1415
const cm_t C_PC_TINY
Definition typeinf.hpp:1411
const cm_t C_PC_HUGE
Definition typeinf.hpp:1416
const cm_t C_PC_COMPACT
Definition typeinf.hpp:1413
bool is_gcc()
Is the target compiler COMP_GNU?
Definition typeinf.hpp:1923
bool idaapi set_abi_name(const char *abiname, bool user_level=false)
Set abi name (see Compiler IDs)
Definition typeinf.hpp:1974
idaman void ida_export get_compilers(compvec_t *ids, qstrvec_t *names, qstrvec_t *abbrs)
Get names of all built-in compilers.
idaman bool ida_export set_compiler_string(const char *compstr, bool user_level)
bool use_golang_cc()
is GOLANG calling convention used by default?
Definition typeinf.hpp:2003
THREAD_SAFE comp_t get_comp(comp_t comp)
Get compiler bits.
Definition typeinf.hpp:1890
bool is_gcc32()
Is the target compiler 32 bit gcc?
Definition typeinf.hpp:1928
idaman bool ida_export set_compiler(const compiler_info_t &cc, int flags, const char *abiname=nullptr)
Change current compiler.
bool gcc_layout()
Should use the struct/union layout as done by gcc?
Definition typeinf.hpp:1938
idaman ssize_t ida_export get_abi_name(qstring *out)
Get ABI name.
comp_t default_compiler()
Get compiler specified by inf.cc.
Definition typeinf.hpp:1918
idaman bool ida_export remove_abi_opts(const char *abi_opts, bool user_level=false)
THREAD_SAFE comp_t is_comp_unsure(comp_t comp)
See COMP_UNSURE.
Definition typeinf.hpp:1913
idaman const char *ida_export get_compiler_name(comp_t id)
Get full compiler name.
qvector< comp_t > compvec_t
Collection of compiler descriptions.
Definition typeinf.hpp:1903
idaman bool ida_export append_abi_opts(const char *abi_opts, bool user_level=false)
Add/remove/check ABI option General form of full abi name: abiname-opt1-opt2-... or -opt1-opt2-....
void switch_to_golang()
switch to GOLANG calling convention (to be used as default CC)
Definition typeinf.hpp:2010
bool idaapi set_compiler_id(comp_t id, const char *abiname=nullptr)
Set the compiler id (see Compiler IDs)
Definition typeinf.hpp:1965
bool is_gcc64()
Is the target compiler 64 bit gcc?
Definition typeinf.hpp:1933
idaman const char *ida_export get_compiler_abbr(comp_t id)
Get abbreviated compiler name.
const callcnv_t CM_CC_PASCAL
stack, purged, reverse order of args
Definition typeinf.hpp:886
const callcnv_t CM_CC_SWIFT
(Swift) arguments and return values in registers (compiler-dependent)
Definition typeinf.hpp:889
const callcnv_t CM_CC_RESERVE3
reserved; used for internal needs
Definition typeinf.hpp:895
const callcnv_t CM_CC_CDECL
stack
Definition typeinf.hpp:883
const callcnv_t CM_CC_INVALID
this value is invalid
Definition typeinf.hpp:878
const callcnv_t CM_CC_SPECIALP
Equal to CM_CC_SPECIAL, but with purged stack.
Definition typeinf.hpp:897
const callcnv_t CM_CC_GOLANG
(Go) arguments and return value reg/stack depending on version
Definition typeinf.hpp:894
const callcnv_t CM_CC_FASTCALL
stack, purged (x86), first args are in regs (compiler-dependent)
Definition typeinf.hpp:887
const callcnv_t CM_CC_STDCALL
stack, purged
Definition typeinf.hpp:885
const callcnv_t CM_CC_SPECIAL
usercall: locations of all arguments and the return value are explicitly specified
Definition typeinf.hpp:898
const callcnv_t CM_CC_THISCALL
stack, purged (x86), first arg is in reg (compiler-dependent)
Definition typeinf.hpp:888
const callcnv_t CM_CC_VOIDARG
function without arguments if has other cc and argnum == 0, represent as f() - unknown list
Definition typeinf.hpp:880
const callcnv_t CM_CC_GOSTK
(Go) arguments and return value in stack
Definition typeinf.hpp:902
const callcnv_t CM_CC_SPOILED
This is NOT a cc!
Definition typeinf.hpp:890
const callcnv_t CM_CC_MASK
Definition typeinf.hpp:877
const callcnv_t CM_CC_LAST_USERCALL
Definition typeinf.hpp:900
const callcnv_t CM_CC_UNKNOWN
unknown calling convention
Definition typeinf.hpp:879
const callcnv_t CM_CC_FIRST_PLAIN_CUSTOM
Definition typeinf.hpp:904
const callcnv_t CM_CC_ELLIPSIS
cdecl + ellipsis
Definition typeinf.hpp:884
const callcnv_t CM_CC_SPECIALE
CM_CC_SPECIAL with ellipsis
Definition typeinf.hpp:896
const cm_t CM_M_MASK
Definition typeinf.hpp:863
THREAD_SAFE bool is_code_far(cm_t cm)
Does the given model specify far code?.
Definition typeinf.hpp:870
THREAD_SAFE bool is_data_far(cm_t cm)
Does the given model specify far data?.
Definition typeinf.hpp:872
const cm_t CM_M_NN
small: code=near, data=near (or unknown if CM_UNKNOWN)
Definition typeinf.hpp:864
const cm_t CM_M_FN
medium: code=far, data=near
Definition typeinf.hpp:867
const cm_t CM_M_FF
large: code=far, data=far
Definition typeinf.hpp:865
const cm_t CM_M_NF
compact: code=near, data=far
Definition typeinf.hpp:866
const cm_t CM_N32_F48
near 4 bytes, far 6 bytes
Definition typeinf.hpp:859
const cm_t CM_N16_F32
near 2 bytes, far 4 bytes
Definition typeinf.hpp:858
const cm_t CM_UNKNOWN
unknown
Definition typeinf.hpp:855
const cm_t CM_N8_F16
if sizeof(int)<=2: near 1 byte, far 2 bytes
Definition typeinf.hpp:856
const cm_t CM_MASK
Definition typeinf.hpp:854
const cm_t CM_N64
if sizeof(int)>2: near 8 bytes, far 8 bytes
Definition typeinf.hpp:857
const comp_t COMP_BP
Delphi.
Definition typeinf.hpp:1879
const comp_t COMP_WATCOM
Watcom C++.
Definition typeinf.hpp:1874
const comp_t COMP_MASK
Definition typeinf.hpp:1870
const comp_t COMP_UNK
Unknown.
Definition typeinf.hpp:1871
const comp_t COMP_BC
Borland C++.
Definition typeinf.hpp:1873
const comp_t COMP_GNU
GNU C++.
Definition typeinf.hpp:1877
const comp_t COMP_MS
Visual C++.
Definition typeinf.hpp:1872
const comp_t COMP_UNSURE
uncertain compiler id
Definition typeinf.hpp:1881
const comp_t COMP_VISAGE
Visual Age C++.
Definition typeinf.hpp:1878
etf_flag_t
Definition typeinf.hpp:2913
@ ETF_NO_LAYOUT
don't calc type layout before editing
Definition typeinf.hpp:2918
@ ETF_FUNCARG
udm - member is a function argument (cannot create arrays)
Definition typeinf.hpp:2921
@ ETF_AUTONAME
udm - generate a member name if was not specified (add_udm, set_udm_type)
Definition typeinf.hpp:2923
@ ETF_NO_ARRAY
add_udm, set_udm_type - do not convert type to an array on the size mismatch
Definition typeinf.hpp:2925
@ ETF_FORCENAME
anyway use name, see below for more usage description
Definition typeinf.hpp:2922
@ ETF_NO_SAVE
don't save to til (normally typerefs are saved to til) A call with ETF_NO_SAVE must be followed by a ...
Definition typeinf.hpp:2914
@ ETF_COMPATIBLE
new type must be compatible with the old
Definition typeinf.hpp:2920
@ ETF_MAY_DESTROY
may destroy other members
Definition typeinf.hpp:2919
@ ETF_BYTIL
udm - new type was created by the type subsystem
Definition typeinf.hpp:2924
idaman bool ida_export decorate_name(qstring *out, const char *name, bool should_decorate, callcnv_t cc=CM_CC_UNKNOWN, const tinfo_t *type=nullptr)
Decorate/undecorate a C symbol name.
idaman ssize_t ida_export calc_c_cpp_name(qstring *out, const char *name, const tinfo_t *type, int ccn_flags)
Get C or C++ form of the name.
idaman bool ida_export del_named_type(til_t *ti, const char *name, int ntf_flags)
Delete information about a symbol.
idaman const char *ida_export next_named_type(const til_t *ti, const char *name, int ntf_flags)
Enumerate types.
idaman bool ida_export gen_decorate_name(qstring *out, const char *name, bool should_decorate, callcnv_t cc, const tinfo_t *type)
Generic function for decorate_name() (may be used in IDP modules)
idaman const char *ida_export first_named_type(const til_t *ti, int ntf_flags)
Enumerate types.
tinfo_code_t
Error codes various tinfo functions:
Definition typeinf.hpp:2318
virtual bool decorate_name(qstring *outbuf, const char *name, bool should_decorate, callcnv_t cc, const tinfo_t &type) const
Decorate a function name.
Definition typeinf.hpp:2429
idaman const char *ida_export tinfo_errstr(tinfo_code_t code)
Helper function to convert an error code into a printable string.
int idaapi get_named_type64(const til_t *ti, const char *name, int ntf_flags, const type_t **type=nullptr, const p_list **fields=nullptr, const char **cmt=nullptr, const p_list **fieldcmts=nullptr, sclass_t *sclass=nullptr, uint64 *value=nullptr)
See get_named_type() above.
Definition typeinf.hpp:2300
idaman int ida_export get_named_type(const til_t *ti, const char *name, int ntf_flags, const type_t **type=nullptr, const p_list **fields=nullptr, const char **cmt=nullptr, const p_list **fieldcmts=nullptr, sclass_t *sclass=nullptr, uint32 *value=nullptr)
Get named typeinfo.
idaman uint32 ida_export copy_named_type(til_t *dsttil, const til_t *srctil, const char *name)
Copy a named type from one til to another.
@ TERR_ENUM_SIZE
bad enum size
Definition typeinf.hpp:2352
@ TERR_NOT_COMPAT
the new type is not compatible with the old type
Definition typeinf.hpp:2346
@ TERR_NOT_IMPL
not implemented
Definition typeinf.hpp:2353
@ TERR_NOT_FOUND
member not found
Definition typeinf.hpp:2357
@ TERR_BAD_OFFSET
bad member offset s
Definition typeinf.hpp:2329
@ TERR_BAD_ARG
bad argument
Definition typeinf.hpp:2323
@ TERR_BAD_GROUPS
bad group sizes for bitmask enum
Definition typeinf.hpp:2348
@ TERR_STRUCT_SIZE
bad fixed structure size
Definition typeinf.hpp:2356
@ TERR_BAD_NAME
name s is not acceptable
Definition typeinf.hpp:2322
@ TERR_BAD_FX_SIZE
cannot extend struct beyond fixed size
Definition typeinf.hpp:2355
@ TERR_BAD_GAP
bad gap
Definition typeinf.hpp:2344
@ TERR_BAD_VARLAST
variable sized member must be the last member in the structure
Definition typeinf.hpp:2331
@ TERR_BAD_BF
bitfields are forbidden as function arguments
Definition typeinf.hpp:2328
@ TERR_BAD_BMASK
Bad enum member mask 0xI64X. The specified mask should not intersect with any existing mask in the en...
Definition typeinf.hpp:2336
@ TERR_BAD_BASE
bad base class
Definition typeinf.hpp:2343
@ TERR_STOCK
stock type info cannot be modified
Definition typeinf.hpp:2351
@ TERR_BAD_TAH
bad bits in the type attributes (TAH bits)
Definition typeinf.hpp:2342
@ TERR_BAD_REPR
bad or incompatible field representation
Definition typeinf.hpp:2338
@ TERR_UNION_BF
unions cannot have bitfields
Definition typeinf.hpp:2341
@ TERR_BAD_MSKVAL
bad bmask and value combination (value=0xI64X; bitmask 0xI64X)
Definition typeinf.hpp:2337
@ TERR_GRP_NOEMPTY
could not delete group mask for not empty group 0xI64X
Definition typeinf.hpp:2339
@ TERR_SERIALIZE
failed to serialize
Definition typeinf.hpp:2321
@ TERR_BAD_TYPE
bad type
Definition typeinf.hpp:2324
@ TERR_BAD_ARRAY
arrays are forbidden as function arguments
Definition typeinf.hpp:2327
@ TERR_TYPE_WORSE
the new type is worse than the old type
Definition typeinf.hpp:2354
@ TERR_NO_BMASK
bitmask 0xI64X is not found
Definition typeinf.hpp:2335
@ TERR_OVERLAP
the member overlaps with other members that cannot be deleted
Definition typeinf.hpp:2332
@ TERR_ALIEN_NAME
enum member name is used in another enum
Definition typeinf.hpp:2350
@ TERR_COUNT
Definition typeinf.hpp:2358
@ TERR_DUPNAME
duplicate name s
Definition typeinf.hpp:2340
@ TERR_BAD_SERIAL
enum value has too many serials
Definition typeinf.hpp:2349
@ TERR_BAD_UNIVAR
unions cannot have variable sized members
Definition typeinf.hpp:2330
@ TERR_BAD_LAYOUT
failed to calculate the structure/union layout
Definition typeinf.hpp:2347
@ TERR_BAD_SUBTYPE
recursive structure nesting is forbidden
Definition typeinf.hpp:2333
@ TERR_BAD_SIZE
bad size d
Definition typeinf.hpp:2325
@ TERR_OK
ok
Definition typeinf.hpp:2319
@ TERR_BAD_VALUE
value 0xI64X is not acceptable
Definition typeinf.hpp:2334
@ TERR_BAD_INDEX
bad index d
Definition typeinf.hpp:2326
@ TERR_NESTED
recursive structure nesting is forbidden
Definition typeinf.hpp:2345
@ TERR_SAVE_ERROR
failed to save
Definition typeinf.hpp:2320
idaman bool ida_export is_ordinal_name(const char *name, uint32 *ord=nullptr)
Check if the name is an ordinal name.
idaman bool ida_export is_type_choosable(const til_t *ti, uint32 ordinal)
Check if a struct/union type is choosable.
idaman uint32 ida_export alloc_type_ordinals(til_t *ti, int qty)
Allocate a range of ordinal numbers for new types.
idaman uint32 ida_export get_ordinal_limit(const til_t *ti=nullptr)
Get number of allocated ordinals + 1.
idaman int32 ida_export get_type_ordinal(const til_t *ti, const char *name)
Get type ordinal by its name.
uint32 alloc_type_ordinal(til_t *ti)
alloc_type_ordinals(ti, 1)
Definition typeinf.hpp:2496
idaman const char *ida_export get_numbered_type_name(const til_t *ti, uint32 ordinal)
Get type name (if exists) by its ordinal.
idaman void ida_export build_anon_type_name(qstring *buf, const type_t *type, const p_list *fields)
Generate a name like $hex_numbers based on the field types and names.
idaman void ida_export set_type_choosable(til_t *ti, uint32 ordinal, bool value)
Enable/disable 'choosability' flag for a struct/union type.
idaman bool ida_export del_numbered_type(til_t *ti, uint32 ordinal)
Delete a numbered type.
idaman bool ida_export get_numbered_type(const til_t *ti, uint32 ordinal, const type_t **type=nullptr, const p_list **fields=nullptr, const char **cmt=nullptr, const p_list **fieldcmts=nullptr, sclass_t *sclass=nullptr)
Retrieve a type by its ordinal number.
idaman uint32 ida_export get_alias_target(const til_t *ti, uint32 ordinal)
Find the final alias destination.
idaman bool ida_export set_type_alias(til_t *ti, uint32 src_ordinal, uint32 dst_ordinal)
Create a type alias.
idaman bool ida_export enable_numbered_types(til_t *ti, bool enable)
Enable the use of numbered types in til.
idaman ssize_t ida_export create_numbered_type_name(qstring *buf, int32 ord)
Create anonymous name for numbered type.
uint32 get_ordinal_count(const til_t *ti=nullptr)
Get number of allocated ordinals.
Definition typeinf.hpp:2513
idaman int ida_export compact_numbered_types(til_t *ti, uint32 min_ord=0, intvec_t *p_ordmap=nullptr, int flags=0)
Compact numbered types to get rid of empty slots.
int idaapi h2ti_type_cb(const char *name, const tinfo_t &tif, const char *cmt, const uint64 *value, void *cb_data)
This callback will be called for each type/variable declaration.
Definition typeinf.hpp:2096
idaman bool ida_export print_type(qstring *out, ea_t ea, int prtype_flags)
Get type declaration for the specified address.
idaman int ida_export h2ti(til_t *ti, lexer_t *lx, const char *input, int flags=HTI_HIGH, h2ti_type_cb *type_cb=nullptr, h2ti_type_cb *var_cb=nullptr, printer_t *print_cb=nullptr, void *_cb_data=nullptr, abs_t _isabs=ABS_UNK)
Convert declarations to type_t*.
Definition typeinf.hpp:2122
idaman bool ida_export parse_decl(tinfo_t *out_tif, qstring *out_name, til_t *til, const char *decl, int pt_flags)
Parse ONE declaration.
typedef AS_PRINTF(1, 2) int printer_t(const char *format
Specify a printing callback when parsing types.
idaman int ida_export parse_decls(til_t *til, const char *input, printer_t *printer, int hti_flags)
Parse many declarations and store them in a til.
THREAD_SAFE int convert_pt_flags_to_hti(int pt_flags)
Convert Type parsing flags to Type formatting flags.
Definition typeinf.hpp:2138
idaman THREAD_SAFE const char * format
Definition fpro.h:78
int code
Definition fpro.h:88
idaman size_t n
Definition pro.h:997
const type_sign_t type_unsigned
unsigned type
Definition typeinf.hpp:675
qvector< type_attr_t > type_attrs_t
this vector must be sorted by keys
Definition typeinf.hpp:669
int type_sign_t
type signedness
Definition typeinf.hpp:671
const type_sign_t no_sign
no sign, or unknown
Definition typeinf.hpp:673
const type_sign_t type_signed
signed type
Definition typeinf.hpp:674
DECLARE_TYPE_AS_MOVABLE(type_attr_t)
const type_t BTMT_NONBASED
Definition typeinf.hpp:233
const type_t BTMT_ARRESERV
reserved bit
Definition typeinf.hpp:241
const type_t BT_ARRAY
array
Definition typeinf.hpp:232
const type_t BT_BOOL
bool
Definition typeinf.hpp:181
const type_t BTMT_BOOL8
size 8bytes - inf_is_64bit()
Definition typeinf.hpp:185
const type_t BTMT_BOOL2
size 2bytes - !inf_is_64bit()
Definition typeinf.hpp:184
const type_t BTMT_BOOL4
size 4bytes
Definition typeinf.hpp:186
const type_t BTMT_DEFBOOL
size is model specific or unknown(?)
Definition typeinf.hpp:182
const type_t BTMT_BOOL1
size 1byte
Definition typeinf.hpp:183
const type_t BTMT_BFLDI16
__int16
Definition typeinf.hpp:327
const type_t BT_BITFIELD
bitfield (only in struct) ['bitmasked' enum see below] next byte is dt ((size in bits << 1) | (unsign...
Definition typeinf.hpp:322
const type_t BTMT_BFLDI32
__int32
Definition typeinf.hpp:328
const type_t BTMT_BFLDI64
__int64
Definition typeinf.hpp:329
const type_t BT_COMPLEX
struct/union/enum/typedef.
Definition typeinf.hpp:287
const type_t BTMT_ENUM
enum: next byte bte_t (see below) N records: de delta(s) OR blocks (see below)
Definition typeinf.hpp:314
const type_t BTMT_TYPEDEF
named reference always p_string name
Definition typeinf.hpp:319
const type_t BTMT_BFLDI8
__int8
Definition typeinf.hpp:326
const type_t BTMT_STRUCT
struct: MCNT records: type_t; [sdacl-typeattrs];
Definition typeinf.hpp:310
const type_t BTMT_UNION
union: MCNT records: type_t...
Definition typeinf.hpp:312
const type_t BT_SEGREG
segment register
Definition typeinf.hpp:373
const type_t BT_UNK_DWORD
4 bytes
Definition typeinf.hpp:380
const type_t BT_UNKNOWN
unknown size - for parameters
Definition typeinf.hpp:383
const type_t BT_UNK_BYTE
1 byte
Definition typeinf.hpp:378
const type_t BT_UNK_QWORD
8 bytes
Definition typeinf.hpp:381
const type_t BT_UNK_OWORD
16 bytes
Definition typeinf.hpp:382
const type_t BT_UNK_WORD
2 bytes
Definition typeinf.hpp:379
const bte_t BTE_HEX
hex
Definition typeinf.hpp:364
const bte_t BTE_UDEC
unsigned decimal
Definition typeinf.hpp:367
const bte_t BTE_RESERVED
must be 0, in order to distinguish from a tah-byte
Definition typeinf.hpp:353
uchar bte_t
Enum type flags.
Definition typeinf.hpp:347
const bte_t BTE_BITMASK
'subarrays'.
Definition typeinf.hpp:355
const bte_t BTE_CHAR
char or hex
Definition typeinf.hpp:365
const bte_t BTE_SDEC
signed decimal
Definition typeinf.hpp:366
const bte_t BTE_ALWAYS
this bit MUST be present
Definition typeinf.hpp:368
const bte_t BTE_SIZE_MASK
storage size.
Definition typeinf.hpp:349
const bte_t BTE_OUT_MASK
output style mask
Definition typeinf.hpp:363
const type_t BTMT_SPECFLT
float (variable size).
Definition typeinf.hpp:195
const type_t BTMT_LNGDBL
long double (compiler specific)
Definition typeinf.hpp:194
const type_t BT_FLOAT
float
Definition typeinf.hpp:191
const type_t BTMT_FLOAT
float (4 bytes)
Definition typeinf.hpp:192
const type_t BTMT_DOUBLE
double (8 bytes)
Definition typeinf.hpp:193
const type_t BTMT_FARCALL
function returns by retf
Definition typeinf.hpp:280
const type_t BTMT_DEFCALL
call method - default for model or unknown
Definition typeinf.hpp:278
const type_t BT_FUNC
function.
Definition typeinf.hpp:249
const type_t BTMT_NEARCALL
function returns by retn
Definition typeinf.hpp:279
const type_t BTMT_INTCALL
function returns by iret in this case cc MUST be 'unknown'
Definition typeinf.hpp:281
const type_t BT_INT
natural int. (size provided by idp module)
Definition typeinf.hpp:168
const type_t BT_INT16
__int16
Definition typeinf.hpp:164
const type_t BTMT_UNKSIGN
unknown signedness
Definition typeinf.hpp:169
const type_t BT_INT64
__int64
Definition typeinf.hpp:166
const type_t BT_INT128
__int128 (for alpha & future use)
Definition typeinf.hpp:167
const type_t BTMT_CHAR
specify char or segment register
Definition typeinf.hpp:173
const type_t BT_INT32
__int32
Definition typeinf.hpp:165
const type_t BTMT_UNSIGNED
Definition typeinf.hpp:172
const type_t BT_INT8
__int8
Definition typeinf.hpp:163
const type_t BTMT_USIGNED
unsigned
Definition typeinf.hpp:171
const type_t BTMT_SIGNED
signed
Definition typeinf.hpp:170
const type_t _BT_LAST_BASIC
the last basic type, all basic types may be followed by [tah-typeattrs]
Definition typeinf.hpp:202
const type_t TYPE_FULL_MASK
basic type with type flags
Definition typeinf.hpp:136
const type_t TYPE_FLAGS_MASK
type flags - they have different meaning depending on the basic type
Definition typeinf.hpp:130
const type_t TYPE_BASE_MASK
the low 4 bits define the basic type
Definition typeinf.hpp:129
const type_t TYPE_MODIF_MASK
modifiers.
Definition typeinf.hpp:132
const type_t BTM_CONST
const
Definition typeinf.hpp:340
const type_t BTM_VOLATILE
volatile
Definition typeinf.hpp:341
const type_t BTMT_CLOSURE
closure.
Definition typeinf.hpp:217
const type_t BT_PTR
pointer.
Definition typeinf.hpp:211
const type_t BTMT_NEAR
near
Definition typeinf.hpp:215
const type_t BTMT_DEFPTR
default for model
Definition typeinf.hpp:214
const type_t BTMT_FAR
far
Definition typeinf.hpp:216
const type_t BTF_INT64
signed long
Definition typeinf.hpp:404
const type_t BTF_UNION
union
Definition typeinf.hpp:422
const type_t BTF_UINT16
unsigned short
Definition typeinf.hpp:399
const type_t BTF_DOUBLE
double
Definition typeinf.hpp:417
const type_t BTF_UNK
unknown
Definition typeinf.hpp:390
const type_t BTF_UINT128
unsigned 128-bit value
Definition typeinf.hpp:408
const type_t BTF_INT16
signed short
Definition typeinf.hpp:398
const type_t BTF_UINT64
unsigned long
Definition typeinf.hpp:405
const type_t BTF_BYTE
byte
Definition typeinf.hpp:389
const type_t BTF_UINT
unsigned int
Definition typeinf.hpp:411
const type_t BTF_UINT32
unsigned int
Definition typeinf.hpp:402
const type_t BTF_ENUM
enum
Definition typeinf.hpp:423
const type_t BTF_TYPEDEF
typedef
Definition typeinf.hpp:424
const type_t BTF_UCHAR
unsigned char
Definition typeinf.hpp:395
const type_t BTF_STRUCT
struct
Definition typeinf.hpp:421
const type_t BTF_VOID
void
Definition typeinf.hpp:391
const type_t BTF_CHAR
signed char
Definition typeinf.hpp:394
const type_t BTF_LDOUBLE
long double
Definition typeinf.hpp:418
const type_t BTF_TBYTE
see BTMT_SPECFLT
Definition typeinf.hpp:419
const type_t BTF_INT8
signed byte
Definition typeinf.hpp:393
const type_t BTF_INT
int, unknown signedness
Definition typeinf.hpp:410
const type_t BTF_INT128
signed 128-bit value
Definition typeinf.hpp:407
const type_t BTF_INT32
signed int
Definition typeinf.hpp:401
const type_t BTF_FLOAT
float
Definition typeinf.hpp:416
const type_t BTF_UINT8
unsigned byte
Definition typeinf.hpp:396
const type_t BTF_SINT
singed int
Definition typeinf.hpp:412
const type_t BTF_BOOL
boolean
Definition typeinf.hpp:414
const type_t BTMT_SIZE12
size = 1 byte if BT_VOID; 2 if BT_UNK
Definition typeinf.hpp:155
const type_t BT_UNK
unknown
Definition typeinf.hpp:152
const type_t BTMT_SIZE48
size = 4 bytes if BT_VOID; 8 if BT_UNK
Definition typeinf.hpp:156
const type_t BTMT_SIZE128
size = 16 bytes if BT_VOID; unknown if BT_UNK (IN struct alignment - see below)
Definition typeinf.hpp:157
const type_t BTMT_SIZE0
BT_VOID - normal void; BT_UNK - don't use
Definition typeinf.hpp:154
const type_t BT_VOID
void
Definition typeinf.hpp:153
const type_t BT_RESERVED
RESERVED.
Definition typeinf.hpp:332
idaman uint32 ida_export get_tid_ordinal(tid_t tid)
Get type ordinal number for TID.
idaman bool ida_export get_idainfo_by_udm(flags64_t *flags, opinfo_t *ti, const udm_t &udm, ea_t refinfo_ea=BADADDR)
Calculate IDA info from udt member.
tid_t get_tid() const
Definition typeinf.hpp:6263
idaman tid_t ida_export get_named_type_tid(const char *name)
Get named local type TID.
idaman ssize_t ida_export get_udm_by_fullname(udm_t *udm, const char *fullname)
Get udt member by full name.
idaman bool ida_export get_tid_name(qstring *out, tid_t tid)
Get a type name for the specified TID.
tid_t create_enum_type(const char *enum_name, enum_type_data_t &ei, int enum_width, type_sign_t sign, bool convert_to_bitmask, const char *enum_cmt=nullptr)
Create type enum.
Definition typeinf.hpp:6310
bool del_vftable_ea(uint32 ordinal)
Delete the address of a vftable instance for a vftable type.
Definition typeinf.hpp:2630
idaman uint32 ida_export get_vftable_ordinal(ea_t vftable_ea)
Get ordinal number of the virtual function table.
idaman bool ida_export set_vftable_ea(uint32 ordinal, ea_t vftable_ea)
Set the address of a vftable instance for a vftable type.
idaman ea_t ida_export get_vftable_ea(uint32 ordinal)
Get address of a virtual function table.
cexpr_t * e
Definition hexrays.hpp:7308
const tinfo_t & type
Definition hexrays.hpp:7301
@ INF_H_PATH
C header path.
Definition ida.hpp:513
@ INF_C_MACROS
C predefined macros.
Definition ida.hpp:514
bool inf_big_arg_align(void)
Definition ida.hpp:966
uchar inf_get_cc_defalign()
Definition ida.hpp:1010
uint32 inf_get_abibits()
Definition ida.hpp:960
uchar inf_get_cc_size_e()
Definition ida.hpp:1007
qvector< callcnv_t > callcnvs_t
Definition ida.hpp:75
uchar cm_t
calling convention and memory model
Definition ida.hpp:73
callcnv_t inf_get_callcnv()
Definition ida.hpp:998
uint32 callcnv_t
Definition ida.hpp:74
bool inf_is_64bit(void)
Definition ida.hpp:631
idaman ssize_t ida_export getinf_str(qstring *buf, inftag_t tag)
Get program specific information (a non-scalar value)
idaman bool ida_export setinf_buf(inftag_t tag, const void *buf, size_t bufsize=0)
Set program specific information.
uchar comp_t
target compiler id
Definition ida.hpp:72
bool inf_huge_arg_align(void)
Definition ida.hpp:980
bool inf_set_callcnv(callcnv_t _v)
Definition ida.hpp:999
bool inf_pack_stkargs(void)
Definition ida.hpp:964
comp_t inf_get_cc_id()
Definition ida.hpp:992
Contains definition of the interface to IDP modules.
qvector< reg_info_t > reginfovec_t
vector of register info objects
Definition idp.hpp:2718
int nbytes
Definition kernwin.hpp:2861
bool ok
Definition kernwin.hpp:7006
uval_t uval_t
Definition kernwin.hpp:1878
ssize_t rc
Definition kernwin.hpp:7101
idaman size_t len
Definition kernwin.hpp:1356
asize_t size
Definition kernwin.hpp:6339
uint64 tif_cursor_t
A location in a tinfo_t.
Definition kernwin.hpp:1882
void(idaapi *range_marker)(ea_t ea
Pointer to range marker function (for idaviews and hexviews) This pointer is initialized by setup_ran...
bool result
Definition kernwin.hpp:7890
cast_t token_t * ct
Definition lex.hpp:172
unsigned __int64 uint64
Definition llong.hpp:13
idaman bool ida_export get_tinfo(tinfo_t *tif, ea_t ea)
uchar type_t
In serialized form, a type is represented by a byte sequence.
Definition nalt.hpp:1317
flags_t aflags_t
Definition nalt.hpp:289
uchar p_list
several p_string's
Definition nalt.hpp:1318
Functions that deal with names.
idaman size_t const char time_t t
Definition pro.h:602
unsigned short uint16
unsigned 16 bit value
Definition pro.h:346
int bool
Definition pro.h:329
unsigned int uint32
unsigned 32 bit value
Definition pro.h:348
qvector< int > intvec_t
vector of integers
Definition pro.h:2765
uint64 asize_t
Definition pro.h:423
constexpr T make_mask(int count)
Make a mask of 'count' bits.
Definition pro.h:1521
T align_up(T val, int elsize)
Align element up to nearest boundary.
Definition pro.h:4628
adiff_t sval_t
signed value used by the processor.
Definition pro.h:446
short int16
signed 16 bit value
Definition pro.h:345
int64 adiff_t
Definition pro.h:424
uint64 ea_t
Definition pro.h:421
int int32
signed 32 bit value
Definition pro.h:347
unsigned char uchar
unsigned 8 bit value
Definition pro.h:337
THREAD_SAFE void qswap(T &a, T &b)
Swap 2 objects of the same type using memory copies.
Definition pro.h:1715
idaman size_t bufsize
Definition pro.h:600
_qstring< uchar > qtype
type string
Definition pro.h:3695
unsigned int uint
unsigned 32 bit value
Definition pro.h:339
int error_t
Error code (errno)
Definition pro.h:458
qvector< ea_t > eavec_t
vector of addresses
Definition pro.h:2764
uint64 flags64_t
64-bit flags for each address
Definition pro.h:5009
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:381
unsigned short ushort
unsigned 16 bit value
Definition pro.h:338
T align_down(T val, int elsize)
Align element down to nearest boundary.
Definition pro.h:4638
void idaapi setflag(T &where, U bit, bool cnd)
Set a 'bit' in 'where' if 'value' if not zero.
Definition pro.h:1527
ea_t tid_t
type id (for enums, structs, etc)
Definition pro.h:5010
constexpr bool is_pow2(T val)
is power of 2? (or zero)
Definition pro.h:1432
_qstring< char > qstring
regular string
Definition pro.h:3694
idaman int ida_export log2ceil(uint64 d64)
calculate ceil(log2(d64)) or floor(log2(d64)), it returns 0 if d64 == 0
int compare(const T &a, const T &b)
Definition pro.h:4514
qvector< qstring > qstrvec_t
vector of strings
Definition pro.h:3697
Visit all argument locations.
Definition typeinf.hpp:1383
virtual ~aloc_visitor_t()
Definition typeinf.hpp:1385
virtual int idaapi visit_location(argloc_t &v, int off, int size)=0
Subsection of an argument location.
Definition typeinf.hpp:1313
bool operator<(const argpart_t &r) const
Compare two argparts, based on their offset.
Definition typeinf.hpp:1328
DEFINE_MEMORY_ALLOCATION_FUNCS() argpart_t(const argloc_t &a)
Constructor.
Definition typeinf.hpp:1316
argpart_t()
Constructor.
Definition typeinf.hpp:1318
ushort size
the number of bytes
Definition typeinf.hpp:1315
void swap(argpart_t &r)
Assign this = r and r = this.
Definition typeinf.hpp:1331
ushort off
offset from the beginning of the argument
Definition typeinf.hpp:1314
bool bad_size() const
Does this argpart have a valid size?
Definition typeinf.hpp:1325
bool bad_offset() const
Does this argpart have a valid offset?
Definition typeinf.hpp:1322
argpart_t & copy_from(const argloc_t &a)
Definition typeinf.hpp:1319
Definition typeinf.hpp:6106
virtual bool idaapi set_op_tinfo(const insn_t &insn, const op_t &x, const tinfo_t &tif, const char *name)=0
Set the operand type as specified.
virtual bool idaapi has_delay_slot(ea_t)
The call instruction with a delay slot?.
Definition typeinf.hpp:6126
size_t reserved
Definition typeinf.hpp:6107
virtual ~argtinfo_helper_t()
Definition typeinf.hpp:6109
void use_arg_tinfos(ea_t caller, func_type_data_t *fti, funcargvec_t *rargs)
This function is to be called by the processor module in response to ev_use_arg_types.
Definition typeinf.hpp:6140
virtual bool idaapi is_stkarg_load(const insn_t &insn, int *src, int *dst)=0
Is the current insn a stkarg load?
int32 flags
Definition nalt.hpp:683
Array type information (see tinfo_t::get_array_details())
Definition typeinf.hpp:4670
DEFINE_MEMORY_ALLOCATION_FUNCS() void swap(array_type_data_t &r)
set this = r and r = this
Definition typeinf.hpp:4675
uint32 nelems
number of elements
Definition typeinf.hpp:4673
tinfo_t elem_type
element type
Definition typeinf.hpp:4671
array_type_data_t(size_t b=0, size_t n=0)
Constructor.
Definition typeinf.hpp:4674
uint32 base
array base
Definition typeinf.hpp:4672
Bitfield type information (see tinfo_t::get_bitfield_details())
Definition typeinf.hpp:5581
void swap(bitfield_type_data_t &r)
Definition typeinf.hpp:5608
uchar nbytes
enclosing type size (1,2,4,8 bytes)
Definition typeinf.hpp:5582
uchar width
number of bits
Definition typeinf.hpp:5583
bool is_unsigned
is bitfield unsigned?
Definition typeinf.hpp:5584
DECLARE_COMPARISONS(bitfield_type_data_t)
Definition typeinf.hpp:5590
bool serialize(qtype *type, type_t mods) const
bool is_valid_bitfield() const
Definition typeinf.hpp:5609
bitfield_type_data_t(uchar _nbytes=0, uchar _width=0, bool _is_unsigned=false)
Definition typeinf.hpp:5585
Information about the target compiler.
Definition ida.hpp:79
comp_t id
compiler id (see Compiler IDs)
Definition ida.hpp:80
cm_t cm
memory model and calling convention (see CM) see also get_cc/set_cc
Definition ida.hpp:81
callcnv_t _new_callcnv
Definition ida.hpp:91
Same as aloc_visitor_t, but may not modify the argloc.
Definition typeinf.hpp:1393
virtual ~const_aloc_visitor_t()
Definition typeinf.hpp:1395
virtual int idaapi visit_location(const argloc_t &v, int off, int size)=0
Description of a custom argloc.
Definition typeinf.hpp:975
tinfo_t * elem_tif
Definition typeinf.hpp:1057
bool(idaapi *get_tinfo)(tinfo_t *out
Retrieve type of the object at 'loc'.
const char * name
name of the custom argloc type. must be unique
Definition typeinf.hpp:977
bool(idaapi *deref_array)(argloc_t *out
Dereference the array pointed by 'arrloc': take member number 'n' (element size is 'elsize'),...
tinfo_t const argloc_t const tinfo_t asize_t n
Definition typeinf.hpp:1020
size_t const argloc_t & loc
Definition typeinf.hpp:999
tinfo_t const argloc_t const tinfo_t size_t len
Definition typeinf.hpp:1060
const idc_value_t const value_union_t int qstring * errbuf
Definition typeinf.hpp:1046
tinfo_t const argloc_t const tinfo_t & array_tif
Definition typeinf.hpp:1019
int const rangeset_t * gaps
Definition typeinf.hpp:989
asize_t(idaapi *guess_array_size)(const argloc_t &loc
Retrieve size of array at 'loc' (number of elements)
tinfo_t const argloc_t & strloc
Definition typeinf.hpp:1008
size_t(idaapi *print_ptr_value)(char *buf
Get string containing a printable representation of the pointer at 'loc'.
const idc_value_t & idcv
Definition typeinf.hpp:1043
const argloc_t & src
Definition typeinf.hpp:980
bool(idaapi *deref_field)(argloc_t *out
Dereference the struct/union pointed by 'strloc': take member at offset 'off' (or use the field name)...
size_t bool * is_valid_ptr
Definition typeinf.hpp:1082
tinfo_t const argloc_t & ptrloc
Definition typeinf.hpp:1028
void(idaapi *cleanup)(argloc_t *loc)
Clear contents of loc before it is modified (may be nullptr)
void(idaapi *copy)(argloc_t *empty_dst
Copy src into empty_dst.
tinfo_t * tif
Definition typeinf.hpp:1007
bool(idaapi *verify)(const argloc_t &loc
May be nullptr.
tinfo_t const argloc_t const tinfo_t asize_t off
Definition typeinf.hpp:1010
const tinfo_t & string_tif
Definition typeinf.hpp:1051
int size
Definition typeinf.hpp:988
size_t bufsize
Definition typeinf.hpp:998
asize_t(idaapi *calc_string_length)(const argloc_t &loc
Calc max natural string length at 'loc' in the debugged process memory.
bool(idaapi *write_value)(const argloc_t &loc
Update value at 'loc'.
size_t cbsize
size of this structure
Definition typeinf.hpp:976
size_t const argloc_t asize_t int praloc_flags
Definition typeinf.hpp:1001
int(idaapi *calc_number_of_children)(const argloc_t &loc
Calculate the number of children for the given location.
bool(idaapi *read_value)(value_union_t *value
Read the pointer at 'loc': retrieve value of a simple object.
bool(idaapi *get_string)(qstring *out
Retrieve string at 'loc' from the debugged process memory, returns quoted string value.
int const rangeset_t bool part_of_scattered
Definition typeinf.hpp:990
tinfo_t const argloc_t & arrloc
Definition typeinf.hpp:1018
tinfo_t const argloc_t const tinfo_t & struct_tif
Definition typeinf.hpp:1009
const idc_value_t const value_union_t & scalar_value
Definition typeinf.hpp:1044
const argloc_t & b
Definition typeinf.hpp:993
size_t(idaapi *print)(char *buf
Get textual description of the location (not the value at the location!)
tinfo_t const argloc_t const tinfo_t asize_t asize_t elsize
Definition typeinf.hpp:1021
bool(idaapi *deref_ptr)(argloc_t *out
Dereference the pointer at 'loc': retrieve location of the pointed object, improve 'tif' of the point...
int(idaapi *compare)(const argloc_t &a
Lexical comparison of two arglocs.
Description of a custom calling convention.
Definition typeinf.hpp:1543
virtual ssize_t find_varargs(func_type_data_t *fti, ea_t call_ea, class mblock_t *blk) const
Discover variadic arguments.
Definition typeinf.hpp:1592
virtual bool calc_retloc(func_type_data_t *fti) const =0
Calculate the location of the return value.
uint32 abibits
abibits to be used for the calling convention
Definition typeinf.hpp:1550
int cbsize
Definition typeinf.hpp:1544
bool is_purging() const
Definition typeinf.hpp:1553
virtual bool calc_arglocs(func_type_data_t *fti) const =0
Calculate the argument locations.
DECLARE_COMPARISONS(custom_callcnv_t)
custom_callcnv_t(const char *_name, uint64 f, uint32 _abibits)
Definition typeinf.hpp:1672
uint64 flags
Definition typeinf.hpp:1545
bool is_vararg() const
Definition typeinf.hpp:1552
virtual bool get_cc_regs(callregs_t *out) const
Retrieve generic information about call registers.
Definition typeinf.hpp:1625
virtual int lower_func_type(func_type_data_t *fti) const
Lower a function type.
Definition typeinf.hpp:1665
virtual int calc_purged_bytes(const func_type_data_t &fti, ea_t call_ea=BADADDR) const
Calculate the number of purged bytes.
Definition typeinf.hpp:1641
virtual bool calc_varglocs(func_type_data_t *fti, regobjs_t *regs, relobj_t *stkargs, int nfixed) const
Calculate the argument locations for a variadic function.
Definition typeinf.hpp:1611
qstring name
the name is used as a keyword in the function prototype
Definition typeinf.hpp:1549
custom_callcnv_t()=default
virtual bool validate_func(const func_type_data_t &fti, qstring *reterr) const
Validate a function prototype.
Definition typeinf.hpp:1562
virtual bool get_stkarg_area_info(stkarg_area_info_t *out) const
Retrieve generic information about stack arguments.
Definition typeinf.hpp:1632
virtual ~custom_callcnv_t()
Definition typeinf.hpp:1675
bool is_usercall() const
Definition typeinf.hpp:1554
Definition typeinf.hpp:5195
int16 fid
data format ids
Definition typeinf.hpp:5197
int16 dtid
data type id
Definition typeinf.hpp:5196
This structure describes an enum value.
Definition typeinf.hpp:4849
qstring name
Definition typeinf.hpp:4850
edm_t(const char *_name, uint64 _value, const char *_cmt=nullptr)
Create an enumeration value with the specified name and value.
Definition typeinf.hpp:4861
bool empty() const
Definition typeinf.hpp:4865
uint64 value
Definition typeinf.hpp:4852
void swap(edm_t &r)
Definition typeinf.hpp:4874
qstring cmt
Definition typeinf.hpp:4851
bool operator==(const edm_t &r) const
Definition typeinf.hpp:4867
bool operator!=(const edm_t &r) const
Definition typeinf.hpp:4873
Enum type information (see tinfo_t::get_enum_details())
Definition typeinf.hpp:4889
enum_type_data_t(bte_t _bte=BTE_ALWAYS|BTE_HEX)
Definition typeinf.hpp:4895
bool is_bin() const
Definition typeinf.hpp:4944
bool is_soct() const
Definition typeinf.hpp:4947
int for_all_groups(std::function< int(size_t grp_start, int grp_size)> v, bool skip_trivial=false) const
visit all enum groups, for bitmask enum only
Definition typeinf.hpp:5135
bool has_lzero() const
Definition typeinf.hpp:4950
bool is_sbin() const
Definition typeinf.hpp:4948
bool is_bf() const
is bitmask or ordinary enum?
Definition typeinf.hpp:4957
bte_t bte
enum member sizes (shift amount) and style.
Definition typeinf.hpp:4893
bool is_udec() const
Definition typeinf.hpp:4945
void add_constant(const char *name, uint64 value, const char *cmt=nullptr)
add constant for regular enum
Definition typeinf.hpp:5067
uchar get_serial(size_t index) const
returns serial for the constant
Definition typeinf.hpp:5084
bool is_char() const
Definition typeinf.hpp:4940
bool is_oct() const
Definition typeinf.hpp:4943
bool get_constant_group(size_t *group_start_index, size_t *group_size, size_t idx) const
get group parameters for the constant, valid for bitmask enum
Definition typeinf.hpp:4982
void set_lzero(bool on)
Definition typeinf.hpp:4951
bool set_nbytes(int nbytes)
set enum width (nbytes)
Definition typeinf.hpp:4966
intvec_t group_sizes
if present, specifies bitmask group sizes each non-trivial group starts with a mask member
Definition typeinf.hpp:4890
bool is_group_mask_at(size_t idx) const
is the enum member at IDX a non-trivial group mask?
Definition typeinf.hpp:5008
DEFINE_MEMORY_ALLOCATION_FUNCS() int get_enum_radix() const
Get enum constant radix.
Definition typeinf.hpp:4896
int for_all_constants(std::function< int(size_t idx, size_t grp_start, int grp_size)> v) const
visit all enum constants not bmasks
Definition typeinf.hpp:5102
bool is_shex() const
Definition typeinf.hpp:4946
tinfo_code_t set_value_repr(const value_repr_t &repr)
set enum radix and other representation info
Definition typeinf.hpp:5081
ssize_t find_member(uint64 value, uchar serial, size_t from=0, size_t to=size_t(-1), uint64 vmask=uint64(-1)) const
find member (constant or bmask) by value
Definition typeinf.hpp:5047
bool is_valid_group_sizes() const
is valid group sizes
Definition typeinf.hpp:5017
bool is_dec() const
Definition typeinf.hpp:4941
bool store_64bit_values() const
Definition typeinf.hpp:4954
void set_enum_radix(int radix, bool sign)
Set radix to display constants.
Definition typeinf.hpp:4927
bool is_number_signed() const
Definition typeinf.hpp:4919
int calc_nbytes() const
get the width of enum in bytes
Definition typeinf.hpp:4960
uint32 taenum_bits
Type attributes for enums
Definition typeinf.hpp:4892
bool is_hex() const
Definition typeinf.hpp:4942
tinfo_code_t get_value_repr(value_repr_t *repr) const
get enum radix and other representation info
Definition typeinf.hpp:5077
ssize_t find_member(const char *name, size_t from=0, size_t to=size_t(-1)) const
find member (constant or bmask) by name
Definition typeinf.hpp:5034
uint64 calc_mask() const
Definition typeinf.hpp:4953
void swap(enum_type_data_t &r)
swap two instances
Definition typeinf.hpp:5064
uchar get_max_serial(uint64 value) const
return the maximum serial for the value
Definition typeinf.hpp:5098
Function type information (see tinfo_t::get_func_details())
Definition typeinf.hpp:4753
bool is_noret() const
Definition typeinf.hpp:4790
bool is_pure() const
Definition typeinf.hpp:4791
bool is_vararg_cc() const
Definition typeinf.hpp:4798
callcnv_t _new_callcnv
Definition typeinf.hpp:4777
bool is_ctor() const
Definition typeinf.hpp:4795
uval_t stkargs
size of stack arguments (not used in build_func_type)
Definition typeinf.hpp:4780
void set_cc(callcnv_t cc)
Definition typeinf.hpp:4787
bool is_high() const
Definition typeinf.hpp:4789
callcnv_t get_cc() const
Definition typeinf.hpp:4786
bool is_user_cc() const
Definition typeinf.hpp:4801
int flags
Function type data property bits
Definition typeinf.hpp:4754
bool is_static() const
Definition typeinf.hpp:4792
bool is_virtual() const
Definition typeinf.hpp:4793
callcnv_t guess_cc(int purged, int cc_flags) const
Guess function calling convention use the following info: argument locations and 'stkargs'.
Definition typeinf.hpp:4805
ssize_t find_argument(const char *name, size_t from=0, size_t to=size_t(-1)) const
find argument by name
Definition typeinf.hpp:4822
int get_call_method() const
Definition typeinf.hpp:4797
bool is_swift_cc() const
Definition typeinf.hpp:4800
reginfovec_t spoiled
spoiled register information.
Definition typeinf.hpp:4781
argloc_t retloc
return location
Definition typeinf.hpp:4779
bool is_const() const
Definition typeinf.hpp:4794
bool is_dtor() const
Definition typeinf.hpp:4796
cm_t _old_cc
Definition typeinf.hpp:4784
void swap(func_type_data_t &r)
Definition typeinf.hpp:4788
bool dump(qstring *out, int praloc_bits=PRALOC_STKOFF) const
Dump information that is not always visible in the function prototype.
Definition typeinf.hpp:4816
bool is_golang_cc() const
Definition typeinf.hpp:4799
tinfo_t rettype
return type
Definition typeinf.hpp:4778
callcnv_t get_explicit_cc() const
Definition typeinf.hpp:4785
Information about a single function argument.
Definition typeinf.hpp:4683
tinfo_t type
argument type
Definition typeinf.hpp:4687
argloc_t argloc
argument location
Definition typeinf.hpp:4684
qstring cmt
argument comment (may be empty)
Definition typeinf.hpp:4686
bool operator!=(const funcarg_t &r) const
Definition typeinf.hpp:4745
qstring name
argument name (may be empty)
Definition typeinf.hpp:4685
funcarg_t(const char *_name, const char *_type, const argloc_t &_argloc=argloc_t())
Create a function argument, with the specified name and type.
Definition typeinf.hpp:4732
uint32 flags
Function argument property bits
Definition typeinf.hpp:4688
funcarg_t(const char *_name, const tinfo_t &_type, const argloc_t &_argloc=argloc_t())
Create a function argument, with the specified name and arbitrary type.
Definition typeinf.hpp:4708
bool operator==(const funcarg_t &r) const
Definition typeinf.hpp:4738
funcarg_t(const char *_name, const type_t _type, const argloc_t &_argloc=argloc_t())
Create a function argument, with the specified name and simple type.
Definition typeinf.hpp:4719
Helper class for choose_named_type().
Definition typeinf.hpp:6574
virtual bool idaapi should_display(const til_t *til, const char *name, const type_t *type, const p_list *fields)=0
virtual ~predicate_t()
Definition typeinf.hpp:6580
@ ev_decorate_name
Decorate/undecorate a C symbol name.
Definition idp.hpp:1732
@ ev_equal_reglocs
Are 2 register arglocs the same?
Definition idp.hpp:1689
static ssize_t equal_reglocs(const argloc_t &a1, const argloc_t &a2)
Definition typeinf.hpp:6673
static ssize_t notify(event_t event_code,...)
Definition idp.hpp:1766
static ssize_t get_cc_regs(callregs_t *regs, callcnv_t cc)
Definition idp.hpp:2611
static ssize_t _decorate_name(qstring *outbuf, const char *name, bool mangle, callcnv_t cc, const tinfo_t &type)
Definition typeinf.hpp:6682
Pointer type information (see tinfo_t::get_ptr_details())
Definition typeinf.hpp:4640
bool operator!=(const ptr_type_data_t &r) const
Definition typeinf.hpp:4661
uchar based_ptr_size
Definition typeinf.hpp:4645
int32 delta
Offset from the beginning of the parent struct.
Definition typeinf.hpp:4644
bool operator==(const ptr_type_data_t &r) const
Definition typeinf.hpp:4655
bool is_shifted() const
Definition typeinf.hpp:4663
uchar taptr_bits
TAH bits.
Definition typeinf.hpp:4646
tinfo_t obj_type
pointed object type
Definition typeinf.hpp:4641
DEFINE_MEMORY_ALLOCATION_FUNCS() void swap(ptr_type_data_t &r)
Set this = r and r = this.
Definition typeinf.hpp:4653
tinfo_t closure
cannot have both closure and based_ptr_size
Definition typeinf.hpp:4642
ptr_type_data_t(tinfo_t c=tinfo_t(), uchar bps=0, tinfo_t p=tinfo_t(), int32 d=0)
Definition typeinf.hpp:4647
tinfo_t parent
Parent struct.
Definition typeinf.hpp:4643
bool is_code_ptr() const
Are we pointing to code?
Definition typeinf.hpp:4662
Information about a reference.
Definition nalt.hpp:1010
Object that represents a register.
Definition typeinf.hpp:6035
bytevec_t value
Definition typeinf.hpp:6038
size_t size() const
Definition typeinf.hpp:6039
int regidx
index into dbg->registers
Definition typeinf.hpp:6036
int relocate
0-plain num, 1-must relocate
Definition typeinf.hpp:6037
Definition typeinf.hpp:6044
Relocatable object.
Definition pro.h:4026
Register-relative argument location.
Definition typeinf.hpp:965
sval_t off
displacement from the address pointed by the register
Definition typeinf.hpp:966
int reg
register index (into ph.reg_names)
Definition typeinf.hpp:967
SIMD type info.
Definition typeinf.hpp:4584
uint16 size
SIMD type size in bytes (0-undefined)
Definition typeinf.hpp:4587
type_t memtype
member type BTF_INT8/16/32/64/128, BTF_UINT8/16/32/64/128 BTF_INT - integrals of any size/sign BTF_FL...
Definition typeinf.hpp:4588
const char * name
name of SIMD type (nullptr-undefined)
Definition typeinf.hpp:4585
tinfo_t tif
SIMD type (empty-undefined)
Definition typeinf.hpp:4586
bool match_pattern(const simd_info_t *pattern)
Definition typeinf.hpp:4599
simd_info_t(const char *nm=nullptr, uint16 sz=0, type_t memt=BTF_UNK)
Definition typeinf.hpp:4596
Definition typeinf.hpp:1518
size_t cb
Definition typeinf.hpp:1519
bool get_info(callcnv_t cc)
Definition typeinf.hpp:1537
sval_t shadow_size
Size of the shadow area.
Definition typeinf.hpp:1528
sval_t linkage_area
Size of the linkage area.
Definition typeinf.hpp:1533
sval_t stkarg_offset
Offset from the SP to the first stack argument (can include linkage area) examples: pc: 0,...
Definition typeinf.hpp:1523
stkarg_area_info_t()=default
stkarg_area_info_t(callcnv_t cc)
Definition typeinf.hpp:1536
Flush formatted text.
Definition typeinf.hpp:6475
virtual int idaapi print(const char *str)=0
virtual ~text_sink_t()
Definition typeinf.hpp:6476
A symbol in a type library.
Definition typeinf.hpp:6562
const til_t * til
pointer to til
Definition typeinf.hpp:6564
til_symbol_t(const char *n=nullptr, const til_t *t=nullptr)
Definition typeinf.hpp:6565
const char * name
symbol name
Definition typeinf.hpp:6563
Type Information Library.
Definition typeinf.hpp:725
uint32 flags
Type info library property bits
Definition typeinf.hpp:730
char * desc
human readable til description
Definition typeinf.hpp:727
compiler_info_t cc
information about the target compiler
Definition typeinf.hpp:764
til_stream_t ** streams
symbol stream storage
Definition typeinf.hpp:770
void set_dirty()
Mark the til as modified (TIL_MOD)
Definition typeinf.hpp:748
til_t * find_base(const char *n)
Find the base til with the provided name.
Definition typeinf.hpp:753
til_bucket_t * types
types
Definition typeinf.hpp:766
bool is_dirty() const
Has the til been modified? (TIL_MOD)
Definition typeinf.hpp:746
til_t ** base
tils that our til is based on
Definition typeinf.hpp:729
til_bucket_t * macros
macros
Definition typeinf.hpp:767
int nstreams
number of extra streams
Definition typeinf.hpp:769
char * name
short file name (without path and extension)
Definition typeinf.hpp:726
int nbases
number of base tils
Definition typeinf.hpp:728
til_bucket_t * syms
symbols
Definition typeinf.hpp:765
int nrefs
number of references to the til
Definition typeinf.hpp:768
Definition typeinf.hpp:6710
bool is_writable
Definition typeinf.hpp:6715
tif_cursor_t cursor
Definition typeinf.hpp:6713
bool is_detached
Definition typeinf.hpp:6716
udm_t udm
BTF_STRUCT or BTF_UNION: the current member.
Definition typeinf.hpp:6723
uint32 ordinal
Definition typeinf.hpp:6714
bool is_func() const
Definition typeinf.hpp:6745
size_t unpadded_size
Definition typeinf.hpp:6725
const funcarg_t * fa
BT_FUNC: the current argument, nullptr - ellipsis.
Definition typeinf.hpp:6737
bool is_enum() const
Definition typeinf.hpp:6744
type_t kind
Definition typeinf.hpp:6718
size_t total_size
Definition typeinf.hpp:6724
uint64 last_udm_offset
Definition typeinf.hpp:6726
bool is_forward
Definition typeinf.hpp:6717
bool is_union() const
Definition typeinf.hpp:6743
uint64 bucket_start
Definition typeinf.hpp:6727
uint64 offset
Definition typeinf.hpp:6729
void clear()
Definition typeinf.hpp:6739
int bf_bitoff
Definition typeinf.hpp:6728
tinfo_t tif
Definition typeinf.hpp:6712
bool on_member() const
Definition typeinf.hpp:6740
bool is_udt() const
Definition typeinf.hpp:6746
size_t cb
Definition typeinf.hpp:6711
bool is_struct() const
Definition typeinf.hpp:6742
size_t nmembers
Definition typeinf.hpp:6720
ssize_t memidx
Definition typeinf.hpp:6719
edm_t edm
BTF_ENUM: the current enum member.
Definition typeinf.hpp:6734
bool is_typedef() const
Definition typeinf.hpp:6741
virtual ~tinfo_visitor_t()
Definition typeinf.hpp:6005
virtual int idaapi visit_type(type_mods_t *out, const tinfo_t &tif, const char *name, const char *cmt)=0
Visit a subtype.
tinfo_visitor_t(int s=0)
Definition typeinf.hpp:6003
int apply_to(const tinfo_t &tif, type_mods_t *out=nullptr, const char *name=nullptr, const char *cmt=nullptr)
Call this function to initiate the traversal.
Definition typeinf.hpp:6023
int state
tinfo visitor states
Definition typeinf.hpp:5994
int level
Definition typeinf.hpp:6002
void prune_now()
To refuse to visit children of the current type, use this:
Definition typeinf.hpp:6020
Definition typeinf.hpp:651
qstring key
one symbol keys are reserved to be used by the kernel the ones starting with an underscore are reserv...
Definition typeinf.hpp:652
bytevec_t value
attribute bytes
Definition typeinf.hpp:662
bool operator>=(const type_attr_t &r) const
Definition typeinf.hpp:664
bool operator<(const type_attr_t &r) const
Definition typeinf.hpp:663
Information about how to modify the current type, used by tinfo_visitor_t.
Definition typeinf.hpp:5957
bool has_name() const
Definition typeinf.hpp:5985
bool is_rptcmt() const
Definition typeinf.hpp:5987
bool has_type() const
Definition typeinf.hpp:5984
bool has_info() const
Definition typeinf.hpp:5988
qstring name
current type name
Definition typeinf.hpp:5959
tinfo_t type
current type
Definition typeinf.hpp:5958
int flags
Type modification bits
Definition typeinf.hpp:5961
bool has_cmt() const
Definition typeinf.hpp:5986
void set_new_cmt(const qstring &c, bool rptcmt)
Definition typeinf.hpp:5977
qstring cmt
comment for current type
Definition typeinf.hpp:5960
void clear()
Definition typeinf.hpp:5970
void set_new_name(const qstring &n)
Definition typeinf.hpp:5976
void set_new_type(const tinfo_t &t)
The visit_type() function may optionally save the modified type info.
Definition typeinf.hpp:5975
Type information for typedefs.
Definition typeinf.hpp:5165
bool resolve
should resolve immediately?
Definition typeinf.hpp:5173
DEFINE_MEMORY_ALLOCATION_FUNCS() void swap(typedef_type_data_t &r)
Definition typeinf.hpp:5187
uint32 ordinal
is_ordref=true: type ordinal number
Definition typeinf.hpp:5170
typedef_type_data_t(const til_t *_til, const char *_name, bool _resolve=false)
Definition typeinf.hpp:5174
const char * name
is_ordref=false: target type name. we do not own this pointer!
Definition typeinf.hpp:5169
typedef_type_data_t(const til_t *_til, uint32 ord, bool _resolve=false)
Definition typeinf.hpp:5180
bool is_ordref
is reference by ordinal?
Definition typeinf.hpp:5172
const til_t * til
type library to use when resolving
Definition typeinf.hpp:5166
An object to represent struct or union members.
Definition typeinf.hpp:5300
void set_unaligned(bool on=true)
Definition typeinf.hpp:5381
bool is_zero_bitfield() const
Definition typeinf.hpp:5368
bool is_method() const
Definition typeinf.hpp:5373
void clr_virtbase()
Definition typeinf.hpp:5392
bool is_gap() const
Definition typeinf.hpp:5374
qstring cmt
member comment
Definition typeinf.hpp:5304
bool operator==(const udm_t &r) const
Definition typeinf.hpp:5401
bool is_retaddr() const
Definition typeinf.hpp:5376
bool is_unaligned() const
Definition typeinf.hpp:5369
void clr_unaligned()
Definition typeinf.hpp:5390
void set_savregs(bool on=true)
Definition typeinf.hpp:5388
void clr_vftable()
Definition typeinf.hpp:5393
bool compare_with(const udm_t &r, int tcflags) const
Definition typeinf.hpp:5405
udm_t(const char *_name, const type_t _type, uint64 _offset=0)
Create a structure/union member, with the specified name and simple type.
Definition typeinf.hpp:5338
uint32 tafld_bits
TAH bits.
Definition typeinf.hpp:5308
bool operator!=(const udm_t &r) const
Definition typeinf.hpp:5416
void clr_baseclass()
Definition typeinf.hpp:5391
uint64 end() const
Definition typeinf.hpp:5396
bool can_rename() const
Definition typeinf.hpp:5431
bool is_savregs() const
Definition typeinf.hpp:5377
bool operator<(const udm_t &r) const
Definition typeinf.hpp:5397
uint64 begin() const
Definition typeinf.hpp:5395
void set_vftable(bool on=true)
Definition typeinf.hpp:5384
bool is_vftable() const
Definition typeinf.hpp:5372
void set_retaddr(bool on=true)
Definition typeinf.hpp:5387
bool is_baseclass() const
Definition typeinf.hpp:5370
int effalign
effective field alignment (in bytes)
Definition typeinf.hpp:5307
uint64 offset
member offset in bits
Definition typeinf.hpp:5301
void set_baseclass(bool on=true)
Definition typeinf.hpp:5382
bool can_be_dtor() const
Definition typeinf.hpp:5430
bool is_by_til() const
Definition typeinf.hpp:5379
uint64 size
size in bits
Definition typeinf.hpp:5302
bool is_special_member() const
Definition typeinf.hpp:5378
udm_t(const char *_name, const tinfo_t &_type, uint64 _offset=0)
Create a structure/union member, with the specified name and arbitrary type.
Definition typeinf.hpp:5322
bool is_anonymous_udm() const
Definition typeinf.hpp:5424
uchar fda
field alignment (shift amount)
Definition typeinf.hpp:5309
void set_method(bool on=true)
Definition typeinf.hpp:5385
void clr_method()
Definition typeinf.hpp:5394
DEFINE_MEMORY_ALLOCATION_FUNCS() void swap(udm_t &r)
Definition typeinf.hpp:5418
value_repr_t repr
radix, refinfo, strpath, custom_id, strtype
Definition typeinf.hpp:5306
bool is_regcmt() const
Definition typeinf.hpp:5375
qstring name
member name
Definition typeinf.hpp:5303
void set_virtbase(bool on=true)
Definition typeinf.hpp:5383
tinfo_t type
member type
Definition typeinf.hpp:5305
void set_value_repr(const value_repr_t &r)
Definition typeinf.hpp:5429
void set_by_til(bool on=true)
Definition typeinf.hpp:5389
udm_t(const char *_name, const char *_type, uint64 _offset=0)
Create a structure/union member, with the specified name and type.
Definition typeinf.hpp:5357
void set_regcmt(bool on=true)
Definition typeinf.hpp:5386
bool empty() const
Definition typeinf.hpp:5365
bool is_bitfield() const
Definition typeinf.hpp:5367
bool is_virtbase() const
Definition typeinf.hpp:5371
Definition typeinf.hpp:5549
virtual int idaapi visit_udm(tid_t tid, const tinfo_t *tif, const udt_type_data_t *udt, ssize_t idx)=0
virtual ~udm_visitor_t()
Definition typeinf.hpp:5559
Definition typeinf.hpp:5441
ssize_t find_member(const char *name) const
Definition typeinf.hpp:5494
bool is_vftable() const
Definition typeinf.hpp:5457
void swap(udt_type_data_t &r)
Definition typeinf.hpp:5452
uchar pack
pragma pack() alignment (shift amount)
Definition typeinf.hpp:5449
bool is_tuple() const
Definition typeinf.hpp:5459
ssize_t get_best_fit_member(asize_t disp) const
Get the member that is most likely referenced by the specified offset.
Definition typeinf.hpp:5510
uchar sda
declared structure alignment (shift amount+1). 0 - unspecified
Definition typeinf.hpp:5448
ssize_t find_member(udm_t *pattern_udm, int strmem_flags) const
tinfo_t::find_udm
Definition typeinf.hpp:5492
static constexpr int VERSION
Definition typeinf.hpp:5442
udm_t & add_member(const char *_name, const tinfo_t &_type, uint64 _offset=0)
Add a new member to a structure or union.
Definition typeinf.hpp:5479
uint32 taudt_bits
TA... and TAUDT... bits.
Definition typeinf.hpp:5446
bool is_union
is union or struct?
Definition typeinf.hpp:5450
bool is_last_baseclass(size_t idx)
Definition typeinf.hpp:5465
bool is_cppobj() const
Definition typeinf.hpp:5456
bool is_fixed() const
Definition typeinf.hpp:5458
uint32 effalign
effective structure alignment (in bytes)
Definition typeinf.hpp:5445
void set_fixed(bool on=true)
Definition typeinf.hpp:5462
void set_tuple(bool on=true)
Definition typeinf.hpp:5463
bool is_msstruct() const
Definition typeinf.hpp:5455
DEFINE_MEMORY_ALLOCATION_FUNCS() bool is_unaligned() const
Definition typeinf.hpp:5453
void set_vftable(bool on=true)
Definition typeinf.hpp:5461
uchar version
version of udt_type_data_t
Definition typeinf.hpp:5447
size_t unpadded_size
unpadded structure size in bytes
Definition typeinf.hpp:5444
size_t total_size
total structure size in bytes
Definition typeinf.hpp:5443
ssize_t find_member(uint64 bit_offset) const
Definition typeinf.hpp:5501
vector of udt member objects
Definition typeinf.hpp:5438
Additional information about the output lines.
Definition typeinf.hpp:6387
void swap(valinfo_t &r)
Definition typeinf.hpp:6393
qstring label
Definition typeinf.hpp:6389
argloc_t loc
Definition typeinf.hpp:6388
tinfo_t type
Definition typeinf.hpp:6390
valinfo_t(argloc_t l=argloc_t(), const char *name=nullptr, const tinfo_t &tif=tinfo_t())
Definition typeinf.hpp:6391
Collection of value strings.
Definition typeinf.hpp:6448
Visual representation of a member of a complex type (struct/union/enum)
Definition typeinf.hpp:5202
bool is_offset() const
Definition typeinf.hpp:5247
void set_lzeroes(bool on)
Definition typeinf.hpp:5260
bool is_custom() const
Definition typeinf.hpp:5249
uint64 bits
Definition typeinf.hpp:5203
refinfo_t ri
FRB_OFFSET.
Definition typeinf.hpp:5227
bool is_enum() const
Definition typeinf.hpp:5246
uint32 type_ordinal
FRB_STROFF, FRB_ENUM.
Definition typeinf.hpp:5232
bool empty() const
Definition typeinf.hpp:5245
DEFINE_MEMORY_ALLOCATION_FUNCS() void clear()
Definition typeinf.hpp:5241
array_parameters_t ap
FRB_TABFORM, AP_SIGNED is ignored, use FRB_SIGNED instead.
Definition typeinf.hpp:5236
void swap(value_repr_t &r)
Definition typeinf.hpp:5240
bool is_typref() const
Definition typeinf.hpp:5251
uint64 get_vtype() const
Definition typeinf.hpp:5256
bool parse_value_repr(const qstring &attr, type_t target_type=BTF_STRUCT)
Definition typeinf.hpp:5287
DECLARE_COMPARISONS(value_repr_t)
adiff_t delta
FRB_STROFF.
Definition typeinf.hpp:5231
bool has_tabform() const
Definition typeinf.hpp:5253
bool from_opinfo(flags64_t flags, aflags_t afl, const opinfo_t *opinfo, const array_parameters_t *_ap)
Definition typeinf.hpp:5279
void init_ap(array_parameters_t *_ap) const
Definition typeinf.hpp:5269
void set_vtype(uint64 vt)
Definition typeinf.hpp:5257
int32 strtype
FRB_STRLIT.
Definition typeinf.hpp:5228
custom_data_type_info_t cd
FRB_CUSTOM.
Definition typeinf.hpp:5234
size_t print(qstring *result, bool colored=false) const
Definition typeinf.hpp:5283
bool is_signed() const
Definition typeinf.hpp:5252
bool has_lzeroes() const
Definition typeinf.hpp:5254
bool is_stroff() const
Definition typeinf.hpp:5250
bool is_strlit() const
Definition typeinf.hpp:5248
void set_tabform(bool on)
Definition typeinf.hpp:5259
void set_ap(const array_parameters_t &_ap)
Definition typeinf.hpp:5262
void set_signed(bool on)
Definition typeinf.hpp:5258
THREAD_SAFE bool is_type_uint32(type_t t)
See BTF_UINT32.
Definition typeinf.hpp:525
THREAD_SAFE bool is_type_ext_arithmetic(type_t t)
Is the type an extended arithmetic type? (arithmetic or enum)
Definition typeinf.hpp:520
THREAD_SAFE type_t get_base_type(type_t t)
Get get basic type bits (TYPE_BASE_MASK)
Definition typeinf.hpp:435
idaman int ida_export calc_number_of_children(const argloc_t &loc, const tinfo_t &tif, bool dont_deref_ptr=false)
Calculate max number of lines of a formatted c data, when expanded (PTV_EXPAND).
idaman bool ida_export extract_argloc(argloc_t *vloc, const type_t **ptype, bool forbid_stkoff)
Deserialize an argument location.
THREAD_SAFE type_t get_full_type(type_t t)
Get basic type bits + type flags (TYPE_FULL_MASK)
Definition typeinf.hpp:437
idaman bool ida_export apply_named_type(ea_t ea, const char *name)
Apply the specified named type to the address.
idaman bool ida_export get_idainfo_by_type(size_t *out_size, flags64_t *out_flags, opinfo_t *out_mt, const tinfo_t &tif, size_t *out_alsize=nullptr)
Extract information from a tinfo_t.
THREAD_SAFE bool is_type_int16(type_t t)
Does the type specify a 16-bit value? (signed or unsigned, see Basic type: integer)
Definition typeinf.hpp:489
THREAD_SAFE bool is_type_func(type_t t)
See BT_FUNC.
Definition typeinf.hpp:451
idaman error_t ida_export pack_idcobj_to_idb(const idc_value_t *obj, const tinfo_t &tif, ea_t ea, int pio_flags=0)
Write a typed idc object to the database.
gts_code_t
Constants to be used with get_size()
Definition typeinf.hpp:2950
@ GTS_NESTED
nested type (embedded into a udt)
Definition typeinf.hpp:2951
@ GTS_BASECLASS
is baseclass of a udt
Definition typeinf.hpp:2952
idaman error_t ida_export unpack_idcobj_from_bv(idc_value_t *obj, const tinfo_t &tif, const bytevec_t &bytes, int pio_flags=0)
Read a typed idc object from the byte vector.
idaman int ida_export guess_tinfo(tinfo_t *out, tid_t id)
Generate a type information about the id from the disassembly.
THREAD_SAFE bool is_type_char(type_t t)
Does the type specify a char value? (signed or unsigned, see Basic type: integer)
Definition typeinf.hpp:496
THREAD_SAFE bool is_type_struct(type_t t)
See BTF_STRUCT.
Definition typeinf.hpp:456
idaman bool ida_export del_til(const char *name)
Unload a til file.
THREAD_SAFE bool is_type_double(type_t t)
See BTF_DOUBLE.
Definition typeinf.hpp:529
THREAD_SAFE bool is_type_typedef(type_t t)
See BTF_TYPEDEF.
Definition typeinf.hpp:454
const int TYPID_SHIFT
First type detail bit.
Definition typeinf.hpp:3041
ssize_t get_c_header_path(qstring *buf)
Get the include directory path of the target compiler.
Definition typeinf.hpp:2822
void set_c_header_path(const char *incdir)
Set include directory path the target compiler.
Definition typeinf.hpp:2819
bool is_restype_void(const til_t *til, const type_t *type)
Definition typeinf.hpp:689
THREAD_SAFE bool is_type_ptr_or_array(type_t t)
Is the type a pointer or array type?
Definition typeinf.hpp:510
idaman type_t ida_export get_scalar_bt(int size)
qvector< regobj_t > regobjvec_t
Definition typeinf.hpp:6042
uint64 bmask64_t
unsigned value that describes a bitmask
Definition typeinf.hpp:103
idaman bool ida_export func_has_stkframe_hole(ea_t ea, const func_type_data_t &fti)
Looks for a hole at the beginning of the stack arguments.
idaman int ida_export lower_type(til_t *til, tinfo_t *tif, const char *name=nullptr, lowertype_helper_t *_helper=nullptr)
Lower type.
THREAD_SAFE bool is_type_uint16(type_t t)
See BTF_UINT16.
Definition typeinf.hpp:524
idaman bool ida_export calc_arglocs(func_type_data_t *fti)
THREAD_SAFE bool is_type_integral(type_t t)
Is the type an integral type (char/short/int/long/bool)?
Definition typeinf.hpp:514
THREAD_SAFE bool is_type_union(type_t t)
See BTF_UNION.
Definition typeinf.hpp:457
THREAD_SAFE bool is_tah_byte(type_t t)
The TAH byte (type attribute header byte) denotes the start of type attributes.
Definition typeinf.hpp:605
THREAD_SAFE bool is_type_bitfld(type_t t)
See BT_BITFIELD.
Definition typeinf.hpp:461
uchar p_string
Inside a type string, a pascal-like string: dt length, characters.
Definition typeinf.hpp:99
idaman error_t ida_export pack_idcobj_to_bv(const idc_value_t *obj, const tinfo_t &tif, relobj_t *bytes, void *objoff, int pio_flags=0)
Write a typed idc object to the byte vector.
stock_type_id_t
IDs for common types.
Definition typeinf.hpp:2874
@ STI_PINT
int *
Definition typeinf.hpp:2880
@ STI_PCVOID
const void *
Definition typeinf.hpp:2884
@ STI_AEABI_LCMP
int __fastcall __pure(int64 x, int64 y)
Definition typeinf.hpp:2892
@ STI_RTC_CHECK_8
int64 __fastcall(int64 x)
Definition typeinf.hpp:2902
@ STI_SSIZE_T
ssize_t
Definition typeinf.hpp:2896
@ STI_PUNKNOWN
_UNKNOWN *
Definition typeinf.hpp:2905
@ STI_AUCHAR
uint8[]
Definition typeinf.hpp:2886
@ STI_AEABI_MEMSET
void __fastcall(void *, size_t, int)
Definition typeinf.hpp:2898
@ STI_ACHAR
char[]
Definition typeinf.hpp:2885
@ STI_DONT_USE
unused stock type id; should not be used
Definition typeinf.hpp:2894
@ STI_COMPLEX128
struct complex128_t { double real, imag; }
Definition typeinf.hpp:2904
@ STI_PCCHAR
const char *
Definition typeinf.hpp:2877
@ STI_PUINT
unsigned int *
Definition typeinf.hpp:2881
@ STI_ACCHAR
const char[]
Definition typeinf.hpp:2887
@ STI_PCUCHAR
const uint8 *
Definition typeinf.hpp:2878
@ STI_COMPLEX64
struct complex64_t { float real, imag; }
Definition typeinf.hpp:2903
@ STI_RTC_CHECK_2
int16 __fastcall(int16 x)
Definition typeinf.hpp:2900
@ STI_RTC_CHECK_4
int32 __fastcall(int32 x)
Definition typeinf.hpp:2901
@ STI_AEABI_MEMCPY
void __fastcall(void *, const void *, size_t)
Definition typeinf.hpp:2897
@ STI_MSGSEND
void *(void *, const char *, ...)
Definition typeinf.hpp:2891
@ STI_LAST
Definition typeinf.hpp:2906
@ STI_FDELOP
void __cdecl(void *)
Definition typeinf.hpp:2890
@ STI_PVOID
void *
Definition typeinf.hpp:2882
@ STI_PPVOID
void **
Definition typeinf.hpp:2883
@ STI_AEABI_ULCMP
int __fastcall __pure(uint64 x, uint64 y)
Definition typeinf.hpp:2893
@ STI_AEABI_MEMCLR
void __fastcall(void *, size_t)
Definition typeinf.hpp:2899
@ STI_FPURGING
void __userpurge(int)
Definition typeinf.hpp:2889
@ STI_PCHAR
char *
Definition typeinf.hpp:2875
@ STI_PUCHAR
uint8 *
Definition typeinf.hpp:2876
@ STI_ACUCHAR
const uint8[]
Definition typeinf.hpp:2888
@ STI_PBYTE
_BYTE *
Definition typeinf.hpp:2879
@ STI_SIZE_T
size_t
Definition typeinf.hpp:2895
THREAD_SAFE bool is_type_int32(type_t t)
Does the type specify a 32-bit value? (signed or unsigned, see Basic type: integer)
Definition typeinf.hpp:482
THREAD_SAFE bool is_type_uchar(type_t t)
See BTF_UCHAR.
Definition typeinf.hpp:523
THREAD_SAFE bool is_type_floating(type_t t)
Is the type a floating point type?
Definition typeinf.hpp:512
THREAD_SAFE bool is_type_uint(type_t t)
See BTF_UINT.
Definition typeinf.hpp:522
THREAD_SAFE bool is_type_partial(type_t t)
Identifies an unknown or void type with a known size (see Basic type: unknown & void)
Definition typeinf.hpp:444
idaman int ida_export visit_stroff_udms(udm_visitor_t &sfv, const tid_t *path, int plen, adiff_t *disp, bool appzero)
Visit structure fields in a stroff expression or in a reference to a struct data variable.
bool stroff_as_size(int plen, const tinfo_t &tif, asize_t value)
Should display a structure offset expression as the structure size?
Definition typeinf.hpp:5539
qvector< tinfo_t > tinfovec_t
vector of tinfo objects
Definition typeinf.hpp:4579
tinfo_t remove_pointer(const tinfo_t &tif)
BT_PTR: If the current type is a pointer, return the pointed object.
Definition typeinf.hpp:5948
idaman bool ida_export dump_func_type_data(qstring *out, const func_type_data_t &fti, int praloc_bits)
Use func_type_data_t::dump()
const uchar MAX_ENUM_SERIAL
Max number of identical constants allowed for one enum type.
Definition typeinf.hpp:5160
idaman uint32 ida_export choose_local_tinfo_and_delta(int32 *delta, const til_t *ti, const char *title, local_tinfo_predicate_t *func=nullptr, uint32 def_ord=0, void *ud=nullptr)
Choose a type from the local type library and specify the pointer shift value.
idaman bool ida_export apply_tinfo_to_stkarg(const insn_t &insn, const op_t &x, uval_t v, const tinfo_t &tif, const char *name)
Helper function for the processor modules.
format_functype_t
Function index for the 'format' attribute.
Definition typeinf.hpp:4839
@ FMTFUNC_SCANF
Definition typeinf.hpp:4841
@ FMTFUNC_STRFTIME
Definition typeinf.hpp:4842
@ FMTFUNC_STRFMON
Definition typeinf.hpp:4843
@ FMTFUNC_PRINTF
Definition typeinf.hpp:4840
THREAD_SAFE bool is_type_int(type_t bt)
Does the type_t specify one of the basic types in Basic type: integer?
Definition typeinf.hpp:465
THREAD_SAFE bool is_type_arithmetic(type_t t)
Is the type an arithmetic type? (floating or integral)
Definition typeinf.hpp:518
idaman bool ida_export choose_named_type(til_symbol_t *out_sym, const til_t *root_til, const char *title, int ntf_flags, predicate_t *predicate=nullptr)
Choose a type from a type library.
idaman bool ida_export apply_cdecl(til_t *til, ea_t ea, const char *decl, int flags=0)
Apply the specified type to the address.
const int TYPID_ISREF
Identifies that a type that is a typeref.
Definition typeinf.hpp:3040
THREAD_SAFE bool is_type_const(type_t t)
See BTM_CONST.
Definition typeinf.hpp:432
bool is_restype_struni(const til_t *til, const type_t *type)
Definition typeinf.hpp:701
idaman bool ida_export apply_tinfo(ea_t ea, const tinfo_t &tif, uint32 flags)
Apply the specified type to the specified address.
idaman int ida_export add_base_tils(qstring *errbuf, til_t *ti, const char *tildir, const char *bases, bool gen_events)
Add multiple base tils.
gtd_udt_t
Constants to be used with get_udt_details()
Definition typeinf.hpp:2931
@ GTD_CALC_LAYOUT
calculate udt layout
Definition typeinf.hpp:2932
@ GTD_NO_LAYOUT
don't calculate udt layout please note that udt layout may have been calculated earlier
Definition typeinf.hpp:2933
@ GTD_DEL_BITFLDS
delete udt bitfields
Definition typeinf.hpp:2936
THREAD_SAFE bool is_type_enum(type_t t)
See BTF_ENUM.
Definition typeinf.hpp:459
idaman int ida_export add_til(const char *name, int flags)
Load a til file and add it the database type libraries list.
qvector< funcarg_t > funcargvec_t
vector of function argument objects
Definition typeinf.hpp:4749
THREAD_SAFE bool is_type_complex(type_t t)
See BT_COMPLEX.
Definition typeinf.hpp:450
THREAD_SAFE bool is_type_array(type_t t)
See BT_ARRAY.
Definition typeinf.hpp:452
idaman til_t *ida_export load_til(const char *name, qstring *errbuf, const char *tildir=nullptr)
Load til from a file without adding it to the database list (see also add_til).
qvector< uint32 > ordvec_t
Definition typeinf.hpp:6505
THREAD_SAFE void align_size(size_t &cur_tot_size, size_t elem_size, size_t algn)
Get alignment delta for the a structure field.
Definition typeinf.hpp:2650
ssize_t get_c_macros(qstring *buf)
Get predefined macros for the target compiler.
Definition typeinf.hpp:2828
idaman void ida_export gen_use_arg_tinfos(struct argtinfo_helper_t *_this, ea_t caller, func_type_data_t *fti, funcargvec_t *rargs)
Do not call this function directly, use argtinfo_helper_t.
uint64 typid_t
Definition typeinf.hpp:2975
idaman til_t *ida_export load_til_header(const char *tildir, const char *name, qstring *errbuf)
Get human-readable til description.
idaman bool ida_export deref_ptr(ea_t *ptr_ea, const tinfo_t &tif, ea_t *closure_obj=nullptr)
Dereference a pointer.
idaman bool ida_export get_enum_member_expr(qstring *buf, const tinfo_t &tif, int serial, uint64 value)
Return a C expression that can be used to represent an enum member.
abs_t
abstractness of declaration (see h2ti())
Definition typeinf.hpp:2027
@ ABS_YES
Definition typeinf.hpp:2030
@ ABS_NO
Definition typeinf.hpp:2029
@ ABS_UNK
Definition typeinf.hpp:2028
THREAD_SAFE bool is_type_void(type_t t)
See BTF_VOID.
Definition typeinf.hpp:446
update_type_t
See begin_type_updating()
Definition typeinf.hpp:6238
@ UTP_STRUCT
Definition typeinf.hpp:6240
@ UTP_ENUM
Definition typeinf.hpp:6239
THREAD_SAFE bool is_type_ldouble(type_t t)
See BTF_LDOUBLE.
Definition typeinf.hpp:528
idaman bool ida_export get_arg_addrs(eavec_t *out, ea_t caller)
Retrieve argument initialization addresses.
idaman void ida_export free_til(til_t *ti)
Free memory allocated by til.
THREAD_SAFE bool is_type_bool(type_t t)
See BTF_BOOL.
Definition typeinf.hpp:532
idaman bool ida_export compact_til(til_t *ti)
Collect garbage in til.
idaman bool ida_export store_til(til_t *ti, const char *tildir, const char *name)
Store til to a file.
THREAD_SAFE bool is_one_bit_mask(uval_t mask)
Is bitmask one bit?
Definition typeinf.hpp:5637
const size_t BADSIZE
bad type size
Definition typeinf.hpp:2021
sval_t align_stkarg_up(sval_t spoff, int type_align, int slotsize, callcnv_t cc=CM_CC_UNKNOWN)
Definition typeinf.hpp:5684
THREAD_SAFE bool is_type_struni(type_t t)
Is the type a struct or union?
Definition typeinf.hpp:458
size_t get_default_align()
Get default alignment for structure fields.
Definition typeinf.hpp:2641
THREAD_SAFE bool is_type_ext_integral(type_t t)
Is the type an extended integral type? (integral or enum)
Definition typeinf.hpp:516
bool is_restype_struct(const til_t *til, const type_t *type)
Definition typeinf.hpp:707
idaman uint32 ida_export choose_local_tinfo(const til_t *ti, const char *title, local_tinfo_predicate_t *func=nullptr, uint32 def_ord=0, void *ud=nullptr)
Choose a type from the local type library.
sclass_t
< storage class
Definition typeinf.hpp:2033
@ SC_EXT
extern
Definition typeinf.hpp:2036
@ SC_FRIEND
friend
Definition typeinf.hpp:2040
@ SC_VIRT
virtual
Definition typeinf.hpp:2041
@ SC_UNK
unknown
Definition typeinf.hpp:2034
@ SC_AUTO
auto
Definition typeinf.hpp:2039
@ SC_TYPE
typedef
Definition typeinf.hpp:2035
@ SC_REG
register
Definition typeinf.hpp:2038
@ SC_STAT
static
Definition typeinf.hpp:2037
THREAD_SAFE bool is_sdacl_byte(type_t t)
Identify an sdacl byte.
Definition typeinf.hpp:620
qvector< valstr_t > valstrvec_t
Definition typeinf.hpp:6446
THREAD_SAFE bool is_type_uint64(type_t t)
See BTF_UINT64.
Definition typeinf.hpp:526
THREAD_SAFE type_t get_type_flags(type_t t)
Get type flags (TYPE_FLAGS_MASK)
Definition typeinf.hpp:436
idaman void ida_export begin_type_updating(update_type_t utp)
Mark the beginning of a large update operation on the types.
THREAD_SAFE bool is_type_paf(type_t t)
Is the type a pointer, array, or function type?
Definition typeinf.hpp:503
THREAD_SAFE bool is_type_tbyte(type_t t)
See BTF_FLOAT.
Definition typeinf.hpp:531
idaman til_t *ida_export get_idati()
Pointer to the local type library - this til is private for each IDB file Functions that accept til_t...
THREAD_SAFE bool operator<(const bytevec_t &v1, const bytevec_t &v2)
Compare two bytevecs with '<'.
Definition typeinf.hpp:631
idaman bool ida_export sort_til(til_t *ti)
Sort til (use after modifying it).
bool is_restype_enum(const til_t *til, const type_t *type)
Definition typeinf.hpp:695
std::function< ssize_t(const struct enum_type_data_t &ei, size_t idx, uint64 value, uint64 bmask)> enum_type_visitor_t
Callback for visit_edms.
Definition typeinf.hpp:6647
THREAD_SAFE bool is_type_uint128(type_t t)
See BTF_UINT128.
Definition typeinf.hpp:527
idaman bool ida_export remove_tinfo_pointer(tinfo_t *tif, const char **pname, const til_t *til=nullptr)
Remove pointer of a type.
int idaapi local_tinfo_predicate_t(uint32 ord, const tinfo_t &type, void *ud)
Controls which types are displayed/selected when choosing local types.
Definition typeinf.hpp:6604
gtd_func_t
Constants to be used with get_func_details()
Definition typeinf.hpp:2941
@ GTD_NO_ARGLOCS
don't calculate func arg locations please note that the locations may have been calculated earlier
Definition typeinf.hpp:2943
@ GTD_CALC_ARGLOCS
calculate func arg locations
Definition typeinf.hpp:2942
void set_c_macros(const char *macros)
Set predefined macros for the target compiler.
Definition typeinf.hpp:2825
THREAD_SAFE bool is_type_unknown(type_t t)
See BT_UNKNOWN.
Definition typeinf.hpp:447
idaman void ida_export end_type_updating(update_type_t utp)
Mark the end of a large update operation on the types (see begin_type_updating())
qvector< simd_info_t > simd_info_vec_t
Definition typeinf.hpp:4616
idaman bool ida_export apply_once_tinfo_and_name(ea_t dea, const tinfo_t &tif, const char *name)
Apply the specified type and name to the address.
idaman int ida_export print_decls(text_sink_t &printer, const til_t *til, const ordvec_t *ordinals, uint32 pdf_flags)
Print types (and possibly their dependencies) in a format suitable for using in a header file.
idaman bool ida_export calc_retloc(func_type_data_t *fti)
THREAD_SAFE bool is_type_float(type_t t)
See BTF_FLOAT.
Definition typeinf.hpp:530
idaman bool ida_export apply_callee_tinfo(ea_t caller, const tinfo_t &tif)
Apply the type of the called function to the calling instruction.
THREAD_SAFE bool is_type_ptr(type_t t)
See BT_PTR.
Definition typeinf.hpp:449
idaman int ida_export print_cdata(text_sink_t &printer, const idc_value_t &idc_value, const tinfo_t *tif, const format_data_info_t *fdi=nullptr)
The same as format_cdata(), but instead of returning the answer in a vector, print it.
idaman int ida_export replace_ordinal_typerefs(til_t *til, tinfo_t *tif)
Replace references to ordinal types by name references.
int get_arg_align(int type_align, int slotsize, callcnv_t cc=CM_CC_UNKNOWN)
Definition typeinf.hpp:5662
idaman bool ida_export append_argloc(qtype *out, const argloc_t &vloc)
Serialize argument location.
THREAD_SAFE bool is_type_volatile(type_t t)
See BTM_VOLATILE.
Definition typeinf.hpp:433
idaman til_t *ida_export new_til(const char *name, const char *desc)
Initialize a til.
THREAD_SAFE bool is_typeid_last(type_t t)
Is the type_t the last byte of type declaration?
Definition typeinf.hpp:441
idaman bool ida_export format_cdata(qstrvec_t *outvec, const idc_value_t &idc_value, const tinfo_t *tif, valstr_t *vtree=nullptr, const format_data_info_t *fdi=nullptr)
Format a data value as a C initializer.
THREAD_SAFE bool is_type_sue(type_t t)
Is the type a struct/union/enum?
Definition typeinf.hpp:455
idaman bool ida_export calc_varglocs(func_type_data_t *fti, regobjs_t *regs, relobj_t *stkargs, int nfixed)
idaman ssize_t ida_export visit_edms(const tinfo_t &tif, uint64 value, int nbytes, uchar serial, const enum_type_visitor_t &visitor)
Visit enum members having the specified value.
qvector< edm_t > edmvec_t
vector of enum values.
Definition typeinf.hpp:4885
THREAD_SAFE bool is_type_int64(type_t t)
Does the type specify a 64-bit value? (signed or unsigned, see Basic type: integer)
Definition typeinf.hpp:475
THREAD_SAFE bool is_type_int128(type_t t)
Does the type specify a 128-bit value? (signed or unsigned, see Basic type: integer)
Definition typeinf.hpp:468
idaman error_t ida_export unpack_idcobj_from_idb(idc_value_t *obj, const tinfo_t &tif, ea_t ea, const bytevec_t *off0, int pio_flags=0)
Collection of register objects.
idaman const type_t *ida_export resolve_typedef(const til_t *til, const type_t *type)
idaman bool ida_export get_tinfo_by_flags(tinfo_t *out, flags64_t flags)
Get tinfo object that corresponds to data flags.
idaman callcnv_t ida_export guess_func_cc(const func_type_data_t &fti, int npurged, int cc_flags)
Use func_type_data_t::guess_cc()
Additional information about an operand type.
Definition nalt.hpp:1244
This union is used to pass byte values to various helper functions.
Definition ua.hpp:580