IDA C++ SDK 9.2
Loading...
Searching...
No Matches
ida.hpp
Go to the documentation of this file.
1/*
2 * Interactive disassembler (IDA).
3 * Copyright (c) 1990-2026 Hex-Rays
4 * ALL RIGHTS RESERVED.
5 *
6 */
7
8#ifndef _IDA_HPP
9#define _IDA_HPP
10
11#include <pro.h>
12#include <range.hpp>
13
14class plugin_t;
15struct plugmod_t;
16struct dbctx_t;
17
32
33//--------------------------------------------------------------------------
66
69{ return ft == f_BIN || ft == f_HEX || ft == f_MEX || ft == f_SREC; }
70
71//--------------------------------------------------------------------------
72
73typedef uchar comp_t;
74typedef uchar cm_t;
77
80{
81 comp_t id = 0;
82 cm_t cm = 0;
92 callcnv_t _new_callcnv = 0; // do not access directly; use get_cc/set_cc
93 inline callcnv_t get_cc() const;
94 inline void set_cc(callcnv_t cc);
95};
96
97//--------------------------------------------------------------------------
100{
101 STT_CUR = -1,
102 STT_VA = 0,
103 STT_MM = 1,
105};
106
108#ifdef __EA64__
109#define EA64_ALIGN(n) uint32 n;
110#else
111#define EA64_ALIGN(n)
112#endif
113
114//--------------------------------------------------------------------------
118#define IDAINFO_TAG_SIZE 3
119#define IDAINFO_PROCNAME_SIZE 16
120#define IDAINFO_STRLIT_PREF_SIZE 16
122{
123 char tag[IDAINFO_TAG_SIZE];
124 char zero;
126 char procname[IDAINFO_PROCNAME_SIZE];
127
132#define INFFL_AUTO 0x01
133#define INFFL_ALLASM 0x02
135#define INFFL_LOADIDC 0x04
136#define INFFL_NOUSER 0x08
137#define INFFL_READONLY 0x10
138#define INFFL_CHKOPS 0x20
139#define INFFL_NMOPS 0x40
140#define INFFL_GRAPH_VIEW 0x80
142
147#define LFLG_PC_FPP 0x00000001
148#define LFLG_PC_FLAT 0x00000002
149#define LFLG_64BIT 0x00000004
150#define LFLG_IS_DLL 0x00000008
151#define LFLG_FLAT_OFF32 0x00000010
152#define LFLG_MSF 0x00000020
153#define LFLG_WIDE_HBF 0x00000040
155#define LFLG_DBG_NOPATH 0x00000080
156#define LFLG_SNAPSHOT 0x00000100
157#define LFLG_PACK 0x00000200
158#define LFLG_COMPRESS 0x00000400
159#define LFLG_KERNMODE 0x00000800
160#define LFLG_ILP32 0x00001000
163#define LFLG_IS_EXE_DLL 0x00002000
165
169#define IDB_UNPACKED 0
170#define IDB_PACKED 1
171#define IDB_COMPRESSED 2
173
176
178
181
184
186
191
196#define AF_CODE 0x00000001
197#define AF_MARKCODE 0x00000002
198#define AF_JUMPTBL 0x00000004
199#define AF_PURDAT 0x00000008
200#define AF_USED 0x00000010
201#define AF_UNK 0x00000020
202
203#define AF_PROCPTR 0x00000040
204#define AF_PROC 0x00000080
205#define AF_FTAIL 0x00000100
206#define AF_LVAR 0x00000200
207#define AF_STKARG 0x00000400
208#define AF_REGARG 0x00000800
209#define AF_TRACE 0x00001000
210#define AF_VERSP 0x00002000
211#define AF_ANORET 0x00004000
212#define AF_MEMFUNC 0x00008000
213#define AF_TRFUNC 0x00010000
214
215#define AF_STRLIT 0x00020000
216#define AF_CHKUNI 0x00040000
217#define AF_FIXUP 0x00080000
218#define AF_DREFOFF 0x00100000
219#define AF_IMMOFF 0x00200000
220#define AF_DATOFF 0x00400000
221
222#define AF_FLIRT 0x00800000
223#define AF_SIGCMT 0x01000000
224#define AF_SIGMLT 0x02000000
225#define AF_HFLIRT 0x04000000
226
227#define AF_JFUNC 0x08000000
228#define AF_NULLSUB 0x10000000
229
230#define AF_DODATA 0x20000000
231#define AF_DOCODE 0x40000000
232#define AF_FINAL 0x80000000
238#define AF2_DOEH 0x00000001
239#define AF2_DORTTI 0x00000002
240#define AF2_MACRO 0x00000004
242#define AF2_MERGESTR 0x00000008
243#define AF2_HFOUTLINE 0x00000010
259
264
266
271
288#define SW_SEGXRF 0x01
289#define SW_XRFMRK 0x02
290#define SW_XRFFNC 0x04
291#define SW_XRFVAL 0x08
293
296 char nametype;
300#define NM_REL_OFF 0
301#define NM_PTR_OFF 1
302#define NM_NAM_OFF 2
303#define NM_REL_EA 3
304#define NM_PTR_EA 4
305#define NM_NAM_EA 5
306#define NM_EA 6
307#define NM_EA4 7
308#define NM_EA8 8
309#define NM_SHORT 9
310#define NM_SERIAL 10
312
320#define DEMNAM_MASK 3
321#define DEMNAM_CMNT 0
322#define DEMNAM_NAME 1
323#define DEMNAM_NONE 2
324#define DEMNAM_GCC3 4
325#define DEMNAM_FIRST 8
327
332#define LN_NORMAL 0x01
333#define LN_PUBLIC 0x02
334#define LN_AUTO 0x04
335#define LN_WEAK 0x08
337
347#define OFLG_SHOW_VOID 0x002
348#define OFLG_SHOW_AUTO 0x004
349#define OFLG_GEN_NULL 0x010
350#define OFLG_SHOW_PREF 0x020
351#define OFLG_PREF_SEG 0x040
352#define OFLG_LZERO 0x080
353#define OFLG_GEN_ORG 0x100
354#define OFLG_GEN_ASSUME 0x200
355#define OFLG_GEN_TRYBLKS 0x400
357
362#define SCF_RPTCMT 0x01
363#define SCF_ALLCMT 0x02
364#define SCF_NOCMT 0x04
365#define SCF_LINNUM 0x08
366#define SCF_TESTMODE 0x10
367#define SCF_SHHID_ITEM 0x20
368#define SCF_SHHID_FUNC 0x40
369#define SCF_SHHID_SEGM 0x80
371
376#define LMT_THIN 0x01
377#define LMT_THICK 0x02
378#define LMT_EMPTY 0x04
380
386#define PREF_SEGADR 0x01
387#define PREF_FNCOFF 0x02
388#define PREF_STACK 0x04
389#define PREF_PFXTRUNC 0x08
391
397#define STRF_GEN 0x01
398#define STRF_AUTO 0x02
399#define STRF_SERIAL 0x04
400#define STRF_UNICODE 0x08
401#define STRF_COMMENT 0x10
402#define STRF_SAVECASE 0x20
408 char strlit_pref[IDAINFO_STRLIT_PREF_SIZE];
410
411 // DATA ITEMS
413
418
422#define ABI_8ALIGN4 0x00000001
423#define ABI_PACK_STKARGS 0x00000002
424#define ABI_BIGARG_ALIGN 0x00000004
426#define ABI_STACK_LDBL 0x00000008
427#define ABI_STACK_VARARGS 0x00000010
428#define ABI_HARD_FLOAT 0x00000020
429#define ABI_SET_BY_USER 0x00000040
430#define ABI_GCC_LAYOUT 0x00000080
431#define ABI_MAP_STKARGS 0x00000100
432#define ABI_HUGEARG_ALIGN 0x00000200
438
440 EA64_ALIGN(padding);
441
442 friend struct idainfo_internal_t;
443};
444
446{
457 INF_AF = 10,
516
517 // root node fields
525 INF_MD5 = 76,
533
548
549 // more inf fields
552 INF_LAST = 100,
553};
554
558idaman size_t ida_export getinf(inftag_t tag);
559
565idaman ssize_t ida_export getinf_buf(inftag_t tag, void *buf, size_t bufsize);
566
571idaman ssize_t ida_export getinf_str(qstring *buf, inftag_t tag);
572
577idaman bool ida_export getinf_flag(inftag_t tag, uint32 flag);
578
583idaman bool ida_export setinf(inftag_t tag, ssize_t value);
584
590idaman bool ida_export setinf_buf(inftag_t tag, const void *buf, size_t bufsize=0);
591
597idaman bool ida_export setinf_flag(inftag_t tag, uint32 flag, bool value=true);
598
602idaman bool ida_export delinf(inftag_t tag);
603
604
605// <INF_ACCESSORS>
607inline bool inf_set_version(ushort _v) { return setinf(INF_VERSION, ssize_t(_v)); }
608
610inline bool inf_set_genflags(ushort _v) { return setinf(INF_GENFLAGS, ssize_t(_v)); }
611inline bool inf_is_auto_enabled(void) { return getinf_flag(INF_GENFLAGS, INFFL_AUTO); }
612inline bool inf_set_auto_enabled(bool _v=true) { return setinf_flag(INF_GENFLAGS, INFFL_AUTO, _v); }
613inline bool inf_use_allasm(void) { return getinf_flag(INF_GENFLAGS, INFFL_ALLASM); }
614inline bool inf_set_use_allasm(bool _v=true) { return setinf_flag(INF_GENFLAGS, INFFL_ALLASM, _v); }
615inline bool inf_loading_idc(void) { return getinf_flag(INF_GENFLAGS, INFFL_LOADIDC); }
616inline bool inf_set_loading_idc(bool _v=true) { return setinf_flag(INF_GENFLAGS, INFFL_LOADIDC, _v); }
617inline bool inf_no_store_user_info(void) { return getinf_flag(INF_GENFLAGS, INFFL_NOUSER); }
618inline bool inf_set_no_store_user_info(bool _v=true) { return setinf_flag(INF_GENFLAGS, INFFL_NOUSER, _v); }
619inline bool inf_readonly_idb(void) { return getinf_flag(INF_GENFLAGS, INFFL_READONLY); }
620inline bool inf_set_readonly_idb(bool _v=true) { return setinf_flag(INF_GENFLAGS, INFFL_READONLY, _v); }
621inline bool inf_check_manual_ops(void) { return getinf_flag(INF_GENFLAGS, INFFL_CHKOPS); }
622inline bool inf_set_check_manual_ops(bool _v=true) { return setinf_flag(INF_GENFLAGS, INFFL_CHKOPS, _v); }
623inline bool inf_allow_non_matched_ops(void) { return getinf_flag(INF_GENFLAGS, INFFL_NMOPS); }
624inline bool inf_set_allow_non_matched_ops(bool _v=true) { return setinf_flag(INF_GENFLAGS, INFFL_NMOPS, _v); }
625inline bool inf_is_graph_view(void) { return getinf_flag(INF_GENFLAGS, INFFL_GRAPH_VIEW); }
626inline bool inf_set_graph_view(bool _v=true) { return setinf_flag(INF_GENFLAGS, INFFL_GRAPH_VIEW, _v); }
627
629inline bool inf_set_lflags(uint32 _v) { return setinf(INF_LFLAGS, ssize_t(_v)); }
630inline bool inf_decode_fpp(void) { return getinf_flag(INF_LFLAGS, LFLG_PC_FPP); }
631inline bool inf_set_decode_fpp(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_PC_FPP, _v); }
632// unfortunately the name inf_is_32bit was used in the past to mean inf_is_32bit_or_higher.
633// it was misleading, this is why we have more explicit names now.
634inline bool inf_is_32bit_or_higher(void) { return getinf_flag(INF_LFLAGS, LFLG_PC_FLAT); }
635inline bool inf_is_32bit_exactly(void) { return (getinf(INF_LFLAGS) & (LFLG_PC_FLAT|LFLG_64BIT)) == LFLG_PC_FLAT; }
636inline bool inf_set_32bit(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_PC_FLAT, _v); }
637inline bool inf_is_16bit(void) { return !inf_is_32bit_or_higher(); }
638inline bool inf_is_64bit(void) { return getinf_flag(INF_LFLAGS, LFLG_64BIT); }
639inline bool inf_set_64bit(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_64BIT, _v); }
640inline bool inf_is_ilp32() { return (getinf(INF_LFLAGS) & (LFLG_PC_FLAT|LFLG_64BIT|LFLG_ILP32)) == (LFLG_PC_FLAT|LFLG_ILP32); }
641inline bool inf_set_ilp32(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_ILP32, _v); }
642inline bool inf_is_dll(void) { return getinf_flag(INF_LFLAGS, LFLG_IS_DLL); }
643inline bool inf_set_dll(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_IS_DLL, _v); }
644inline bool inf_is_exe_dll(void) { return getinf_flag(INF_LFLAGS, LFLG_IS_EXE_DLL); }
645inline bool inf_set_exe_dll(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_IS_EXE_DLL, _v); }
646inline bool inf_is_flat_off32(void) { return getinf_flag(INF_LFLAGS, LFLG_FLAT_OFF32); }
647inline bool inf_set_flat_off32(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_FLAT_OFF32, _v); }
648inline bool inf_is_be(void) { return getinf_flag(INF_LFLAGS, LFLG_MSF); }
649inline bool inf_set_be(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_MSF, _v); }
650inline bool inf_is_wide_high_byte_first(void) { return getinf_flag(INF_LFLAGS, LFLG_WIDE_HBF); }
651inline bool inf_set_wide_high_byte_first(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_WIDE_HBF, _v); }
652inline bool inf_dbg_no_store_path(void) { return getinf_flag(INF_LFLAGS, LFLG_DBG_NOPATH); }
653inline bool inf_set_dbg_no_store_path(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_DBG_NOPATH, _v); }
654inline bool inf_is_snapshot(void) { return getinf_flag(INF_LFLAGS, LFLG_SNAPSHOT); }
655inline bool inf_set_snapshot(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_SNAPSHOT, _v); }
656inline bool inf_pack_idb(void) { return getinf_flag(INF_LFLAGS, LFLG_PACK); }
657inline bool inf_set_pack_idb(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_PACK, _v); }
658inline bool inf_compress_idb(void) { return getinf_flag(INF_LFLAGS, LFLG_COMPRESS); }
659inline bool inf_set_compress_idb(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_COMPRESS, _v); }
660inline bool inf_is_kernel_mode(void) { return getinf_flag(INF_LFLAGS, LFLG_KERNMODE); }
661inline bool inf_set_kernel_mode(bool _v=true) { return setinf_flag(INF_LFLAGS, LFLG_KERNMODE, _v); }
662
663inline uint inf_get_app_bitness(void) // return 16, 32, or 64
664{
665#ifdef __EA64__
666 uint32 f = getinf(INF_LFLAGS) & (LFLG_PC_FLAT|LFLG_64BIT);
667 return f == 0 ? 16 : f == LFLG_PC_FLAT ? 32 : 64;
668#else
669 return inf_is_32bit_or_higher() ? 32 : 16;
670#endif
671}
672
673inline void inf_set_app_bitness(uint bitness) // bitness: 16, 32, or 64
674{
675 switch ( bitness )
676 {
677#ifdef __EA64__
678 case 64: inf_set_64bit(); break;
679#endif
680 case 32: inf_set_64bit(false); inf_set_32bit(); break;
681 case 16: inf_set_32bit(false); break;
682 default: INTERR(2781);
683 }
684}
685
687{
688 return inf_is_64bit() ? 8 : inf_is_16bit() ? 2 : 4;
689}
690
693
695inline bool inf_set_filetype(filetype_t _v) { return setinf(INF_FILETYPE, ssize_t(_v)); }
696
698inline bool inf_set_ostype(ushort _v) { return setinf(INF_OSTYPE, ssize_t(_v)); }
699
701inline bool inf_set_apptype(ushort _v) { return setinf(INF_APPTYPE, ssize_t(_v)); }
702
704inline bool inf_set_asmtype(uchar _v) { return setinf(INF_ASMTYPE, ssize_t(_v)); }
705
707inline bool inf_set_specsegs(uchar _v) { return setinf(INF_SPECSEGS, ssize_t(_v)); }
708
709inline uint32 inf_get_af() { return uint32(getinf(INF_AF)); }
710inline bool inf_set_af(uint32 _v) { return setinf(INF_AF, ssize_t(_v)); }
711inline bool inf_trace_flow(void) { return getinf_flag(INF_AF, AF_CODE); }
712inline bool inf_set_trace_flow(bool _v=true) { return setinf_flag(INF_AF, AF_CODE, _v); }
713inline bool inf_mark_code(void) { return getinf_flag(INF_AF, AF_MARKCODE); }
714inline bool inf_set_mark_code(bool _v=true) { return setinf_flag(INF_AF, AF_MARKCODE, _v); }
715inline bool inf_create_jump_tables(void) { return getinf_flag(INF_AF, AF_JUMPTBL); }
716inline bool inf_set_create_jump_tables(bool _v=true) { return setinf_flag(INF_AF, AF_JUMPTBL, _v); }
717inline bool inf_noflow_to_data(void) { return getinf_flag(INF_AF, AF_PURDAT); }
718inline bool inf_set_noflow_to_data(bool _v=true) { return setinf_flag(INF_AF, AF_PURDAT, _v); }
719inline bool inf_create_all_xrefs(void) { return getinf_flag(INF_AF, AF_USED); }
720inline bool inf_set_create_all_xrefs(bool _v=true) { return setinf_flag(INF_AF, AF_USED, _v); }
721inline bool inf_del_no_xref_insns(void) { return getinf_flag(INF_AF, AF_UNK); }
722inline bool inf_set_del_no_xref_insns(bool _v=true) { return setinf_flag(INF_AF, AF_UNK, _v); }
723inline bool inf_create_func_from_ptr(void) { return getinf_flag(INF_AF, AF_PROCPTR); }
724inline bool inf_set_create_func_from_ptr(bool _v=true) { return setinf_flag(INF_AF, AF_PROCPTR, _v); }
725inline bool inf_create_func_from_call(void) { return getinf_flag(INF_AF, AF_PROC); }
726inline bool inf_set_create_func_from_call(bool _v=true) { return setinf_flag(INF_AF, AF_PROC, _v); }
727inline bool inf_create_func_tails(void) { return getinf_flag(INF_AF, AF_FTAIL); }
728inline bool inf_set_create_func_tails(bool _v=true) { return setinf_flag(INF_AF, AF_FTAIL, _v); }
729inline bool inf_should_create_stkvars(void) { return getinf_flag(INF_AF, AF_LVAR); }
730inline bool inf_set_should_create_stkvars(bool _v=true) { return setinf_flag(INF_AF, AF_LVAR, _v); }
731inline bool inf_propagate_stkargs(void) { return getinf_flag(INF_AF, AF_STKARG); }
732inline bool inf_set_propagate_stkargs(bool _v=true) { return setinf_flag(INF_AF, AF_STKARG, _v); }
733inline bool inf_propagate_regargs(void) { return getinf_flag(INF_AF, AF_REGARG); }
734inline bool inf_set_propagate_regargs(bool _v=true) { return setinf_flag(INF_AF, AF_REGARG, _v); }
735inline bool inf_should_trace_sp(void) { return getinf_flag(INF_AF, AF_TRACE); }
736inline bool inf_set_should_trace_sp(bool _v=true) { return setinf_flag(INF_AF, AF_TRACE, _v); }
737inline bool inf_full_sp_ana(void) { return getinf_flag(INF_AF, AF_VERSP); }
738inline bool inf_set_full_sp_ana(bool _v=true) { return setinf_flag(INF_AF, AF_VERSP, _v); }
739inline bool inf_noret_ana(void) { return getinf_flag(INF_AF, AF_ANORET); }
740inline bool inf_set_noret_ana(bool _v=true) { return setinf_flag(INF_AF, AF_ANORET, _v); }
741inline bool inf_guess_func_type(void) { return getinf_flag(INF_AF, AF_MEMFUNC); }
742inline bool inf_set_guess_func_type(bool _v=true) { return setinf_flag(INF_AF, AF_MEMFUNC, _v); }
743inline bool inf_truncate_on_del(void) { return getinf_flag(INF_AF, AF_TRFUNC); }
744inline bool inf_set_truncate_on_del(bool _v=true) { return setinf_flag(INF_AF, AF_TRFUNC, _v); }
745inline bool inf_create_strlit_on_xref(void) { return getinf_flag(INF_AF, AF_STRLIT); }
746inline bool inf_set_create_strlit_on_xref(bool _v=true) { return setinf_flag(INF_AF, AF_STRLIT, _v); }
747inline bool inf_check_unicode_strlits(void) { return getinf_flag(INF_AF, AF_CHKUNI); }
748inline bool inf_set_check_unicode_strlits(bool _v=true) { return setinf_flag(INF_AF, AF_CHKUNI, _v); }
749inline bool inf_create_off_using_fixup(void) { return getinf_flag(INF_AF, AF_FIXUP); }
750inline bool inf_set_create_off_using_fixup(bool _v=true) { return setinf_flag(INF_AF, AF_FIXUP, _v); }
751inline bool inf_create_off_on_dref(void) { return getinf_flag(INF_AF, AF_DREFOFF); }
752inline bool inf_set_create_off_on_dref(bool _v=true) { return setinf_flag(INF_AF, AF_DREFOFF, _v); }
753inline bool inf_op_offset(void) { return getinf_flag(INF_AF, AF_IMMOFF); }
754inline bool inf_set_op_offset(bool _v=true) { return setinf_flag(INF_AF, AF_IMMOFF, _v); }
755inline bool inf_data_offset(void) { return getinf_flag(INF_AF, AF_DATOFF); }
756inline bool inf_set_data_offset(bool _v=true) { return setinf_flag(INF_AF, AF_DATOFF, _v); }
757inline bool inf_use_flirt(void) { return getinf_flag(INF_AF, AF_FLIRT); }
758inline bool inf_set_use_flirt(bool _v=true) { return setinf_flag(INF_AF, AF_FLIRT, _v); }
759inline bool inf_append_sigcmt(void) { return getinf_flag(INF_AF, AF_SIGCMT); }
760inline bool inf_set_append_sigcmt(bool _v=true) { return setinf_flag(INF_AF, AF_SIGCMT, _v); }
761inline bool inf_allow_sigmulti(void) { return getinf_flag(INF_AF, AF_SIGMLT); }
762inline bool inf_set_allow_sigmulti(bool _v=true) { return setinf_flag(INF_AF, AF_SIGMLT, _v); }
763inline bool inf_hide_libfuncs(void) { return getinf_flag(INF_AF, AF_HFLIRT); }
764inline bool inf_set_hide_libfuncs(bool _v=true) { return setinf_flag(INF_AF, AF_HFLIRT, _v); }
765inline bool inf_rename_jumpfunc(void) { return getinf_flag(INF_AF, AF_JFUNC); }
766inline bool inf_set_rename_jumpfunc(bool _v=true) { return setinf_flag(INF_AF, AF_JFUNC, _v); }
767inline bool inf_rename_nullsub(void) { return getinf_flag(INF_AF, AF_NULLSUB); }
768inline bool inf_set_rename_nullsub(bool _v=true) { return setinf_flag(INF_AF, AF_NULLSUB, _v); }
769inline bool inf_coagulate_data(void) { return getinf_flag(INF_AF, AF_DODATA); }
770inline bool inf_set_coagulate_data(bool _v=true) { return setinf_flag(INF_AF, AF_DODATA, _v); }
771inline bool inf_coagulate_code(void) { return getinf_flag(INF_AF, AF_DOCODE); }
772inline bool inf_set_coagulate_code(bool _v=true) { return setinf_flag(INF_AF, AF_DOCODE, _v); }
773inline bool inf_final_pass(void) { return getinf_flag(INF_AF, AF_FINAL); }
774inline bool inf_set_final_pass(bool _v=true) { return setinf_flag(INF_AF, AF_FINAL, _v); }
775
776inline uint32 inf_get_af2() { return uint32(getinf(INF_AF2)); }
777inline bool inf_set_af2(uint32 _v) { return setinf(INF_AF2, ssize_t(_v)); }
778inline bool inf_handle_eh(void) { return getinf_flag(INF_AF2, AF2_DOEH); }
779inline bool inf_set_handle_eh(bool _v=true) { return setinf_flag(INF_AF2, AF2_DOEH, _v); }
780inline bool inf_handle_rtti(void) { return getinf_flag(INF_AF2, AF2_DORTTI); }
781inline bool inf_set_handle_rtti(bool _v=true) { return setinf_flag(INF_AF2, AF2_DORTTI, _v); }
782inline bool inf_macros_enabled(void) { return getinf_flag(INF_AF2, AF2_MACRO); }
783inline bool inf_set_macros_enabled(bool _v=true) { return setinf_flag(INF_AF2, AF2_MACRO, _v); }
784inline bool inf_merge_strlits(void) { return getinf_flag(INF_AF2, AF2_MERGESTR); }
785inline bool inf_set_merge_strlits(bool _v=true) { return setinf_flag(INF_AF2, AF2_MERGESTR, _v); }
786inline bool inf_hide_outlined(void) { return getinf_flag(INF_AF2, AF2_HFOUTLINE); }
787inline bool inf_set_hide_outlined(bool _v=true) { return setinf_flag(INF_AF2, AF2_HFOUTLINE, _v); }
788
790inline bool inf_set_baseaddr(uval_t _v) { return setinf(INF_BASEADDR, ssize_t(_v)); }
791
793inline bool inf_set_start_ss(sel_t _v) { return setinf(INF_START_SS, ssize_t(_v)); }
794
796inline bool inf_set_start_cs(sel_t _v) { return setinf(INF_START_CS, ssize_t(_v)); }
797
799inline bool inf_set_start_ip(ea_t _v) { return setinf(INF_START_IP, ssize_t(_v)); }
800
802inline bool inf_set_start_ea(ea_t _v) { return setinf(INF_START_EA, ssize_t(_v)); }
803
805inline bool inf_set_start_sp(ea_t _v) { return setinf(INF_START_SP, ssize_t(_v)); }
806
807inline ea_t inf_get_main() { return ea_t(getinf(INF_MAIN)); }
808inline bool inf_set_main(ea_t _v) { return setinf(INF_MAIN, ssize_t(_v)); }
809
811inline bool inf_set_min_ea(ea_t _v) { return setinf(INF_MIN_EA, ssize_t(_v)); }
812
814inline bool inf_set_max_ea(ea_t _v) { return setinf(INF_MAX_EA, ssize_t(_v)); }
815
817inline bool inf_set_omin_ea(ea_t _v) { return setinf(INF_OMIN_EA, ssize_t(_v)); }
818
820inline bool inf_set_omax_ea(ea_t _v) { return setinf(INF_OMAX_EA, ssize_t(_v)); }
821
823inline bool inf_set_lowoff(ea_t _v) { return setinf(INF_LOWOFF, ssize_t(_v)); }
824
826inline bool inf_set_highoff(ea_t _v) { return setinf(INF_HIGHOFF, ssize_t(_v)); }
827
829inline bool inf_set_maxref(uval_t _v) { return setinf(INF_MAXREF, ssize_t(_v)); }
830
832inline bool inf_set_netdelta(sval_t _v) { return setinf(INF_NETDELTA, ssize_t(_v)); }
833
835inline bool inf_set_xrefnum(uchar _v) { return setinf(INF_XREFNUM, ssize_t(_v)); }
836
839
841inline bool inf_set_refcmtnum(uchar _v) { return setinf(INF_REFCMTNUM, ssize_t(_v)); }
842
844inline bool inf_set_xrefflag(uchar _v) { return setinf(INF_XREFFLAG, ssize_t(_v)); }
845inline bool inf_show_xref_seg(void) { return getinf_flag(INF_XREFFLAG, SW_SEGXRF); }
846inline bool inf_set_show_xref_seg(bool _v=true) { return setinf_flag(INF_XREFFLAG, SW_SEGXRF, _v); }
847inline bool inf_show_xref_tmarks(void) { return getinf_flag(INF_XREFFLAG, SW_XRFMRK); }
848inline bool inf_set_show_xref_tmarks(bool _v=true) { return setinf_flag(INF_XREFFLAG, SW_XRFMRK, _v); }
849inline bool inf_show_xref_fncoff(void) { return getinf_flag(INF_XREFFLAG, SW_XRFFNC); }
850inline bool inf_set_show_xref_fncoff(bool _v=true) { return setinf_flag(INF_XREFFLAG, SW_XRFFNC, _v); }
851inline bool inf_show_xref_val(void) { return getinf_flag(INF_XREFFLAG, SW_XRFVAL); }
852inline bool inf_set_show_xref_val(bool _v=true) { return setinf_flag(INF_XREFFLAG, SW_XRFVAL, _v); }
853
856
857inline char inf_get_nametype() { return char(getinf(INF_NAMETYPE)); }
858inline bool inf_set_nametype(char _v) { return setinf(INF_NAMETYPE, ssize_t(_v)); }
859
862
865
867inline bool inf_set_demnames(uchar _v) { return setinf(INF_DEMNAMES, ssize_t(_v)); }
868
870inline bool inf_set_listnames(uchar _v) { return setinf(INF_LISTNAMES, ssize_t(_v)); }
871
873inline bool inf_set_indent(uchar _v) { return setinf(INF_INDENT, ssize_t(_v)); }
874
876inline bool inf_set_cmt_indent(uchar _v) { return setinf(INF_CMT_INDENT, ssize_t(_v)); }
877
879inline bool inf_set_margin(ushort _v) { return setinf(INF_MARGIN, ssize_t(_v)); }
880
882inline bool inf_set_lenxref(ushort _v) { return setinf(INF_LENXREF, ssize_t(_v)); }
883
885inline bool inf_set_outflags(uint32 _v) { return setinf(INF_OUTFLAGS, ssize_t(_v)); }
886inline bool inf_show_void(void) { return getinf_flag(INF_OUTFLAGS, OFLG_SHOW_VOID); }
887inline bool inf_set_show_void(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_SHOW_VOID, _v); }
888inline bool inf_show_auto(void) { return getinf_flag(INF_OUTFLAGS, OFLG_SHOW_AUTO); }
889inline bool inf_set_show_auto(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_SHOW_AUTO, _v); }
890inline bool inf_gen_null(void) { return getinf_flag(INF_OUTFLAGS, OFLG_GEN_NULL); }
891inline bool inf_set_gen_null(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_GEN_NULL, _v); }
892inline bool inf_show_line_pref(void) { return getinf_flag(INF_OUTFLAGS, OFLG_SHOW_PREF); }
893inline bool inf_set_show_line_pref(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_SHOW_PREF, _v); }
894inline bool inf_line_pref_with_seg(void) { return getinf_flag(INF_OUTFLAGS, OFLG_PREF_SEG); }
895inline bool inf_set_line_pref_with_seg(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_PREF_SEG, _v); }
896inline bool inf_gen_lzero(void) { return getinf_flag(INF_OUTFLAGS, OFLG_LZERO); }
897inline bool inf_set_gen_lzero(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_LZERO, _v); }
898inline bool inf_gen_org(void) { return getinf_flag(INF_OUTFLAGS, OFLG_GEN_ORG); }
899inline bool inf_set_gen_org(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_GEN_ORG, _v); }
900inline bool inf_gen_assume(void) { return getinf_flag(INF_OUTFLAGS, OFLG_GEN_ASSUME); }
901inline bool inf_set_gen_assume(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_GEN_ASSUME, _v); }
902inline bool inf_gen_tryblks(void) { return getinf_flag(INF_OUTFLAGS, OFLG_GEN_TRYBLKS); }
903inline bool inf_set_gen_tryblks(bool _v=true) { return setinf_flag(INF_OUTFLAGS, OFLG_GEN_TRYBLKS, _v); }
904
906inline bool inf_set_cmtflg(uchar _v) { return setinf(INF_CMTFLG, ssize_t(_v)); }
907inline bool inf_show_repeatables(void) { return getinf_flag(INF_CMTFLG, SCF_RPTCMT); }
908inline bool inf_set_show_repeatables(bool _v=true) { return setinf_flag(INF_CMTFLG, SCF_RPTCMT, _v); }
909inline bool inf_show_all_comments(void) { return getinf_flag(INF_CMTFLG, SCF_ALLCMT); }
910inline bool inf_set_show_all_comments(bool _v=true) { return setinf_flag(INF_CMTFLG, SCF_ALLCMT, _v); }
911inline bool inf_hide_comments(void) { return getinf_flag(INF_CMTFLG, SCF_NOCMT); }
912inline bool inf_set_hide_comments(bool _v=true) { return setinf_flag(INF_CMTFLG, SCF_NOCMT, _v); }
913inline bool inf_show_src_linnum(void) { return getinf_flag(INF_CMTFLG, SCF_LINNUM); }
914inline bool inf_set_show_src_linnum(bool _v=true) { return setinf_flag(INF_CMTFLG, SCF_LINNUM, _v); }
915inline bool inf_test_mode(void) { return getinf_flag(INF_CMTFLG, SCF_TESTMODE); }
916inline bool inf_show_hidden_insns(void) { return getinf_flag(INF_CMTFLG, SCF_SHHID_ITEM); }
917inline bool inf_set_show_hidden_insns(bool _v=true) { return setinf_flag(INF_CMTFLG, SCF_SHHID_ITEM, _v); }
918inline bool inf_show_hidden_funcs(void) { return getinf_flag(INF_CMTFLG, SCF_SHHID_FUNC); }
919inline bool inf_set_show_hidden_funcs(bool _v=true) { return setinf_flag(INF_CMTFLG, SCF_SHHID_FUNC, _v); }
920inline bool inf_show_hidden_segms(void) { return getinf_flag(INF_CMTFLG, SCF_SHHID_SEGM); }
921inline bool inf_set_show_hidden_segms(bool _v=true) { return setinf_flag(INF_CMTFLG, SCF_SHHID_SEGM, _v); }
922
924inline bool inf_set_limiter(uchar _v) { return setinf(INF_LIMITER, ssize_t(_v)); }
925inline bool inf_is_limiter_thin(void) { return getinf_flag(INF_LIMITER, LMT_THIN); }
926inline bool inf_set_limiter_thin(bool _v=true) { return setinf_flag(INF_LIMITER, LMT_THIN, _v); }
927inline bool inf_is_limiter_thick(void) { return getinf_flag(INF_LIMITER, LMT_THICK); }
928inline bool inf_set_limiter_thick(bool _v=true) { return setinf_flag(INF_LIMITER, LMT_THICK, _v); }
929inline bool inf_is_limiter_empty(void) { return getinf_flag(INF_LIMITER, LMT_EMPTY); }
930inline bool inf_set_limiter_empty(bool _v=true) { return setinf_flag(INF_LIMITER, LMT_EMPTY, _v); }
931
932inline short inf_get_bin_prefix_size() { return short(getinf(INF_BIN_PREFIX_SIZE)); }
933inline bool inf_set_bin_prefix_size(short _v) { return setinf(INF_BIN_PREFIX_SIZE, ssize_t(_v)); }
934
936inline bool inf_set_prefflag(uchar _v) { return setinf(INF_PREFFLAG, ssize_t(_v)); }
937inline bool inf_prefix_show_segaddr(void) { return getinf_flag(INF_PREFFLAG, PREF_SEGADR); }
938inline bool inf_set_prefix_show_segaddr(bool _v=true) { return setinf_flag(INF_PREFFLAG, PREF_SEGADR, _v); }
939inline bool inf_prefix_show_funcoff(void) { return getinf_flag(INF_PREFFLAG, PREF_FNCOFF); }
940inline bool inf_set_prefix_show_funcoff(bool _v=true) { return setinf_flag(INF_PREFFLAG, PREF_FNCOFF, _v); }
941inline bool inf_prefix_show_stack(void) { return getinf_flag(INF_PREFFLAG, PREF_STACK); }
942inline bool inf_set_prefix_show_stack(bool _v=true) { return setinf_flag(INF_PREFFLAG, PREF_STACK, _v); }
943inline bool inf_prefix_truncate_opcode_bytes(void) { return getinf_flag(INF_PREFFLAG, PREF_PFXTRUNC); }
944inline bool inf_set_prefix_truncate_opcode_bytes(bool _v=true) { return setinf_flag(INF_PREFFLAG, PREF_PFXTRUNC, _v); }
945
948inline bool inf_strlit_names(void) { return getinf_flag(INF_STRLIT_FLAGS, STRF_GEN); }
949inline bool inf_set_strlit_names(bool _v=true) { return setinf_flag(INF_STRLIT_FLAGS, STRF_GEN, _v); }
950inline bool inf_strlit_name_bit(void) { return getinf_flag(INF_STRLIT_FLAGS, STRF_AUTO); }
951inline bool inf_set_strlit_name_bit(bool _v=true) { return setinf_flag(INF_STRLIT_FLAGS, STRF_AUTO, _v); }
952inline bool inf_strlit_serial_names(void) { return getinf_flag(INF_STRLIT_FLAGS, STRF_SERIAL); }
953inline bool inf_set_strlit_serial_names(bool _v=true) { return setinf_flag(INF_STRLIT_FLAGS, STRF_SERIAL, _v); }
954inline bool inf_unicode_strlits(void) { return getinf_flag(INF_STRLIT_FLAGS, STRF_UNICODE); }
955inline bool inf_set_unicode_strlits(bool _v=true) { return setinf_flag(INF_STRLIT_FLAGS, STRF_UNICODE, _v); }
956inline bool inf_strlit_autocmt(void) { return getinf_flag(INF_STRLIT_FLAGS, STRF_COMMENT); }
957inline bool inf_set_strlit_autocmt(bool _v=true) { return setinf_flag(INF_STRLIT_FLAGS, STRF_COMMENT, _v); }
958inline bool inf_strlit_savecase(void) { return getinf_flag(INF_STRLIT_FLAGS, STRF_SAVECASE); }
959inline bool inf_set_strlit_savecase(bool _v=true) { return setinf_flag(INF_STRLIT_FLAGS, STRF_SAVECASE, _v); }
960
963
964inline char inf_get_strlit_zeroes() { return char(getinf(INF_STRLIT_ZEROES)); }
965inline bool inf_set_strlit_zeroes(char _v) { return setinf(INF_STRLIT_ZEROES, ssize_t(_v)); }
966
968inline bool inf_set_strtype(int32 _v) { return setinf(INF_STRTYPE, ssize_t(_v)); }
969
972
974inline bool inf_set_datatypes(uval_t _v) { return setinf(INF_DATATYPES, ssize_t(_v)); }
975
977inline bool inf_set_abibits(uint32 _v) { return setinf(INF_ABIBITS, ssize_t(_v)); }
978inline bool inf_is_mem_aligned4(void) { return getinf_flag(INF_ABIBITS, ABI_8ALIGN4); }
979inline bool inf_set_mem_aligned4(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_8ALIGN4, _v); }
980inline bool inf_pack_stkargs(void) { return getinf_flag(INF_ABIBITS, ABI_PACK_STKARGS); }
981inline bool inf_set_pack_stkargs(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_PACK_STKARGS, _v); }
982inline bool inf_big_arg_align(void) { return getinf_flag(INF_ABIBITS, ABI_BIGARG_ALIGN); }
983inline bool inf_set_big_arg_align(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_BIGARG_ALIGN, _v); }
984inline bool inf_stack_ldbl(void) { return getinf_flag(INF_ABIBITS, ABI_STACK_LDBL); }
985inline bool inf_set_stack_ldbl(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_STACK_LDBL, _v); }
986inline bool inf_stack_varargs(void) { return getinf_flag(INF_ABIBITS, ABI_STACK_VARARGS); }
987inline bool inf_set_stack_varargs(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_STACK_VARARGS, _v); }
988inline bool inf_is_hard_float(void) { return getinf_flag(INF_ABIBITS, ABI_HARD_FLOAT); }
989inline bool inf_set_hard_float(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_HARD_FLOAT, _v); }
990inline bool inf_abi_set_by_user(void) { return getinf_flag(INF_ABIBITS, ABI_SET_BY_USER); }
991inline bool inf_set_abi_set_by_user(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_SET_BY_USER, _v); }
992inline bool inf_use_gcc_layout(void) { return getinf_flag(INF_ABIBITS, ABI_GCC_LAYOUT); }
993inline bool inf_set_use_gcc_layout(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_GCC_LAYOUT, _v); }
994inline bool inf_map_stkargs(void) { return getinf_flag(INF_ABIBITS, ABI_MAP_STKARGS); }
995inline bool inf_set_map_stkargs(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_MAP_STKARGS, _v); }
996inline bool inf_huge_arg_align(void) { return getinf_flag(INF_ABIBITS, ABI_HUGEARG_ALIGN); }
997inline bool inf_set_huge_arg_align(bool _v=true) { return setinf_flag(INF_ABIBITS, ABI_HUGEARG_ALIGN, _v); }
998
1001
1004
1007
1009inline bool inf_set_cc_id(comp_t _v) { return setinf(INF_CC_ID, ssize_t(_v)); }
1010
1012inline bool inf_set_cc_cm(cm_t _v) { return setinf(INF_CC_CM, ssize_t(_v)); }
1013
1015inline bool inf_set_callcnv(callcnv_t _v) { return setinf(INF_CALLCNV, ssize_t(_v)); }
1016
1018inline bool inf_set_cc_size_i(uchar _v) { return setinf(INF_CC_SIZE_I, ssize_t(_v)); }
1019
1021inline bool inf_set_cc_size_b(uchar _v) { return setinf(INF_CC_SIZE_B, ssize_t(_v)); }
1022
1024inline bool inf_set_cc_size_e(uchar _v) { return setinf(INF_CC_SIZE_E, ssize_t(_v)); }
1025
1027inline bool inf_set_cc_defalign(uchar _v) { return setinf(INF_CC_DEFALIGN, ssize_t(_v)); }
1028
1030inline bool inf_set_cc_size_s(uchar _v) { return setinf(INF_CC_SIZE_S, ssize_t(_v)); }
1031
1033inline bool inf_set_cc_size_l(uchar _v) { return setinf(INF_CC_SIZE_L, ssize_t(_v)); }
1034
1036inline bool inf_set_cc_size_ll(uchar _v) { return setinf(INF_CC_SIZE_LL, ssize_t(_v)); }
1037
1040
1041inline bool inf_get_procname(char *buf, size_t bufsize=IDAINFO_PROCNAME_SIZE)
1042{
1043 return getinf_buf(INF_PROCNAME, buf, bufsize) > 0;
1044}
1046{
1047 char buf[IDAINFO_PROCNAME_SIZE];
1048 if ( !getinf_buf(INF_PROCNAME, buf, sizeof(buf)) )
1049 buf[0] = '\0';
1050 return qstring(buf);
1051}
1052inline bool inf_set_procname(const char *_v, size_t len=size_t(-1))
1053{
1054 if ( _v == nullptr )
1055 return false;
1056 if ( len == size_t(-1) )
1057 len = ::qstrlen(_v);
1058 return setinf_buf(INF_PROCNAME, _v, qmin(len, IDAINFO_PROCNAME_SIZE));
1059}
1060
1061inline bool inf_get_strlit_pref(char *buf, size_t bufsize=IDAINFO_STRLIT_PREF_SIZE)
1062{
1063 return getinf_buf(INF_STRLIT_PREF, buf, bufsize) > 0;
1064}
1066{
1067 char buf[IDAINFO_STRLIT_PREF_SIZE];
1068 if ( !getinf_buf(INF_STRLIT_PREF, buf, sizeof(buf)) )
1069 buf[0] = '\0';
1070 return qstring(buf);
1071}
1072inline bool inf_set_strlit_pref(const char *_v, size_t len=size_t(-1))
1073{
1074 if ( _v == nullptr )
1075 return false;
1076 if ( len == size_t(-1) )
1077 len = ::qstrlen(_v);
1078 return setinf_buf(INF_STRLIT_PREF, _v, qmin(len, IDAINFO_STRLIT_PREF_SIZE));
1079}
1080
1081inline bool inf_get_cc(compiler_info_t *out) { return getinf_buf(INF_COMPILER_INFO, out, sizeof(*out)) > 0; }
1082inline bool inf_set_cc(const compiler_info_t &_v) { return setinf_buf(INF_COMPILER_INFO, &_v, sizeof(_v)); }
1083
1084inline bool inf_get_privrange(range_t *out) { return getinf_buf(INF_PRIVRANGE, out, sizeof(*out)) > 0; }
1085inline bool inf_set_privrange(const range_t &_v) { return setinf_buf(INF_PRIVRANGE, &_v, sizeof(_v)); }
1086
1087// </INF_ACCESSORS>
1088
1090
1092inline ushort inf_get_af_low() { return inf_get_af() & 0xffff; }
1093inline void inf_set_af_low(ushort saf) { uint32 af = (inf_get_af() & 0xffff0000) | saf; inf_set_af(af); }
1094inline ushort inf_get_af_high() { return (inf_get_af() >> 16) & 0xffff; }
1095inline void inf_set_af_high(ushort saf2) { uint32 af = (inf_get_af() & 0xffff) | (saf2 << 16); inf_set_af(af); }
1097inline ushort inf_get_af2_low() { return inf_get_af2() & 0xffff; }
1098inline void inf_set_af2_low(ushort saf) { uint32 af2 = (inf_get_af2() & 0xffff0000) | saf; inf_set_af2(af2); }
1099
1101{
1102 uint32 lflags = inf_get_lflags();
1103 return (lflags & LFLG_COMPRESS) != 0 ? IDB_COMPRESSED
1104 : (lflags & LFLG_PACK) != 0 ? IDB_PACKED
1105 : IDB_UNPACKED;
1106}
1107
1108inline int inf_set_pack_mode(int pack_mode)
1109{
1110 int old = inf_get_pack_mode();
1111 uint32 lflags = inf_get_lflags();
1112 setflag(lflags, LFLG_COMPRESS, pack_mode == IDB_COMPRESSED);
1113 setflag(lflags, LFLG_PACK, pack_mode == IDB_PACKED);
1114 inf_set_lflags(lflags);
1115 return old;
1116}
1117
1120
1122inline uchar inf_get_demname_form(void) { return uchar(inf_get_demnames() & DEMNAM_MASK); }
1123
1125{
1127 inf_set_strlit_sernum(was + cnt);
1128 return was;
1129}
1130
1131inline bool inf_like_binary(void)
1133
1134
1135
1136//-------------------------------------------------------------------------
1138
1139#define UA_MAXOP 8
1140
1141
1143
1145{
1146 return 0;
1147}
1148
1149//-------------------------------------------------------------------------
1151
1152inline ea_t idaapi to_ea(sel_t reg_cs, uval_t reg_ip)
1153{
1154 return (reg_cs << 4) + reg_ip;
1155}
1156
1157//-------------------------------------------------------------------------
1162{
1163 const uval_t mask32 = 0xFFFFFFFF;
1164
1165#ifdef __EA64__
1166 const uval_t mask64 = 0xFFFFFFFFFFFFFFFFULL;
1167
1169 int ea_size = 8;
1170 bool enabled = true; // can be disabled for old databases
1171
1172 void setup(bool is_64bit)
1173 {
1174 if ( enabled )
1175 {
1176 mask = is_64bit ? mask64 : mask32;
1177 ea_size = is_64bit ? 8 : 4;
1178 }
1179 }
1180 void disable()
1181 {
1182 enabled = false;
1183 mask = mask64;
1184 ea_size = 8;
1185 }
1186
1187 bool is_enabled() const { return enabled; }
1188 sval_t ea2sval(uval_t v) const { return ea_size == 8 ? v : int32(v); }
1189 uval_t trunc_uval(uval_t v) const { return v & mask; }
1190 ea_t uval2ea(uval_t v) const { return v == mask ? BADADDR : v; }
1191 bool fits_ea_space(ea_t ea) const { return ea <= mask; }
1192 bool fits_ea_space(const range_t &r) const
1193 {
1195 }
1197 {
1198#ifdef TESTABLE_BUILD
1199 QASSERT(2762, ea != BADADDR); // do not permit to truncate BADADDR
1200#endif
1201 return ea & mask;
1202 }
1204 {
1205 // 0x1'0000'0000 is the end of the 32-bit address space in ida64
1206 return ea_size == 8 ? BADADDR : ea_t(BADADDR32) + 1;
1207 }
1208 ea_t to_ea(sel_t cs, uval_t ip) const
1209 {
1210 ea_t ea = ::to_ea(cs, ip);
1211 if ( !like_badaddr(ea) )
1212 ea = trunc_ea(ea);
1213 return ea;
1214 }
1216 {
1217 return ea_size == 8 || inf_get_privrange().contains(ea)
1218 ? ea
1219 : uval2ea(trunc_uval(ea));
1220 }
1221 bool is_ea_add_ok(uval_t x, uval_t y) const
1222 {
1223 if ( x == BADADDR )
1224 return y == 0;
1225 if ( y == BADADDR )
1226 return x == 0;
1227#ifdef TESTABLE_BUILD
1228 QASSERT(2763, fits_ea_space(x) && fits_ea_space(y));
1229#endif
1230 return y <= mask - x;
1231 }
1232 sval_t sval_max() const { return ea_size == 8 ? SVAL_MAX : INT_MAX; }
1233 sval_t sval_min() const { return ea_size == 8 ? SVAL_MIN : INT_MIN; }
1234#else // __EA64__
1236 const int ea_size = sizeof(ea_t);
1237
1238 void setup(bool /*is_64bit*/) {}
1239 bool is_enabled() const { return false; }
1240 sval_t ea2sval(uval_t v) const { return v; }
1241 ea_t uval2ea(uval_t v) const { return v; }
1242 bool fits_ea_space(ea_t /*ea*/) const { return true; }
1243 bool fits_ea_space(const range_t &) const { return true; }
1244 ea_t trunc_ea(ea_t ea) const { return ea; }
1245 ea_t ea_space_end() const { return BADADDR; }
1246 uval_t trunc_uval(uval_t v) const { return v; }
1247 ea_t to_ea(sel_t cs, uval_t ip) const { return ::to_ea(cs, ip); }
1248 ea_t fix_ea_tid(ea_t ea) const { return ea; }
1249
1250 bool is_ea_add_ok(uval_t x, uval_t y) const { return is_add_ok<uval_t>(x, y); }
1251 sval_t sval_max() const { return SVAL_MAX; }
1252 sval_t sval_min() const { return SVAL_MIN; }
1253#endif
1254
1255 bool like_badaddr(ea_t ea) const { return uval2ea(ea) == BADADDR; }
1256 ea_t align_ea(ea_t ea, int size) const { return trunc_ea(align_up(ea, size)); }
1257 bool advance_ea(ea_t *ea, asize_t n) const
1258 {
1259 if ( !is_ea_add_ok(*ea, n) )
1260 return false;
1261 *ea += n;
1262 return true;
1263 }
1264};
1265
1266#ifndef SWIG
1267#define DEFINE_EA_HELPER_FUNCS(eh) \
1268 const ea_helper_t &eah() const { return (eh); }\
1269 bool fits_ea_space(ea_t _ea) const { return (eh).fits_ea_space(_ea); }\
1270 bool fits_ea_space(const range_t &r) const { return (eh).fits_ea_space(r); }\
1271 ea_t trunc_ea(ea_t _ea) const { return (eh).trunc_ea(_ea); }\
1272 uval_t trunc_uval(uval_t v) const { return (eh).trunc_uval(v); }\
1273 ea_t ea_space_end() const { return (eh).ea_space_end(); }\
1274 ea_t to_ea(sel_t cs, uval_t ip) const { return (eh).to_ea(cs, ip); }\
1275 sval_t ea2sval(ea_t _ea) const { return (eh).ea2sval(_ea); }\
1276 ea_t uval2ea(uval_t v) const { return (eh).uval2ea(v); }\
1277 bool like_badaddr(ea_t _ea) const { return (eh).like_badaddr(_ea); }\
1278 bool is_ea_add_ok(uval_t x, uval_t y) const { return (eh).is_ea_add_ok(x, y); }\
1279 sval_t sval_max() const { return (eh).sval_max(); }\
1280 ea_t align_ea(ea_t _ea, int size) const { return (eh).align_ea(_ea, size); }\
1281 bool advance_ea(ea_t *_ea, asize_t _n) const { return (eh).advance_ea(_ea, _n); }\
1282 ea_t fix_ea_tid(ea_t _ea) const { return (eh).fix_ea_tid(_ea); }
1283#else
1284#define DEFINE_EA_HELPER_FUNCS(eh)
1285#endif
1286
1290#define IDB_EXT32 "idb"
1291#define IDB_EXT64 "i64"
1292#ifdef __EA64__
1293#define IDB_EXT IDB_EXT64
1294#else
1295#define IDB_EXT IDB_EXT32
1296#endif
1297
1298//--------------------------------------------------------------------------
1332
1333
1334//--------------------------------------------------------------------------
1348
1349typedef ssize_t idaapi hook_cb_t(void *user_data, int notification_code, va_list va);
1350
1351
1353
1354idaman DEPRECATED bool ida_export hook_to_notification_point(
1355 hook_type_t hook_type,
1356 hook_cb_t *cb,
1357 void *user_data = nullptr);
1358
1359
1367
1368idaman DEPRECATED int ida_export unhook_from_notification_point(
1369 hook_type_t hook_type,
1370 hook_cb_t *cb,
1371 void *user_data = nullptr);
1372
1373
1379
1380idaman ssize_t ida_export invoke_callbacks(hook_type_t hook_type, int notification_code, va_list va);
1381
1382
1387
1389{
1397
1399 ssize_t code,
1400 int notification_code,
1401 va_list va) = 0;
1402
1404};
1405
1406
1416
1417idaman bool ida_export register_post_event_visitor(
1418 hook_type_t hook_type,
1419 post_event_visitor_t *visitor,
1420 const plugmod_t *owner);
1421
1422
1427
1428idaman bool ida_export unregister_post_event_visitor(
1429 hook_type_t hook_type,
1430 post_event_visitor_t *visitor);
1431
1432
1435idaman ssize_t ida_export get_dbctx_id();
1436
1439idaman size_t ida_export get_dbctx_qty();
1440
1444idaman struct dbctx_t *ida_export switch_dbctx(size_t idx);
1445
1448idaman bool ida_export is_database_busy();
1449
1453idaman size_t ida_export validate_idb(uint32 vld_flags=0);
1456#define VLD_AUTO_REPAIR 0x01
1457#define VLD_DIALOG 0x02
1458#define VLD_SILENT 0x04
1460
1464idaman bool ida_export move_privrange(ea_t new_privrange_start);
1465
1466
1467//--------------------------------------------------------------------------
1470{
1472 const char *valname;
1473};
1474
1475//--------------------------------------------------------------------------
1478{
1479 const char *name;
1481 uintptr_t offset;
1485 size_t width;
1489 const char *individual_node;
1491#define IDI_STRUCFLD 0
1492#define IDI_ALTVAL 0x00001
1493#define IDI_SUPVAL 0x00002
1494#define IDI_VALOBJ 0x00004
1495#define IDI_BLOB 0x00008
1496#define IDI_SCALAR 0
1497#define IDI_CSTR 0x00010
1498#define IDI_QSTRING 0x00020
1499#define IDI_BYTEARRAY 0x00040
1500#define IDI_EA_HEX 0
1501#define IDI_DEC 0x00080
1502#define IDI_HEX 0x00100
1503#define IDI_INC 0x00200
1504#define IDI_MAP_VAL 0x00400
1505#define IDI_HASH 0x00800
1506#define IDI_HLPSTRUC 0x01000
1507#define IDI_READONLY 0x02000
1508#define IDI_BITMAP 0x04000
1509#define IDI_ONOFF 0x08000
1510#define IDI_NOMERGE 0x10000
1511
1512#define IDI_NODEVAL (IDI_ALTVAL|IDI_SUPVAL|IDI_VALOBJ|IDI_BLOB)
1513#define IDI_BUFVAR (IDI_CSTR|IDI_BYTEARRAY|IDI_QSTRING|IDI_BITMAP)
1514
1516
1517 bool is_node_altval() const { return (idi_flags & IDI_ALTVAL) != 0; }
1518 bool is_node_supval() const { return (idi_flags & IDI_SUPVAL) != 0; }
1519 bool is_node_valobj() const { return (idi_flags & IDI_VALOBJ) != 0; }
1520 bool is_node_blob() const { return (idi_flags & IDI_BLOB) != 0; }
1521 bool is_node_var() const { return (idi_flags & IDI_NODEVAL) != 0; }
1522 bool is_struc_field() const { return !is_node_var(); }
1523 bool is_cstr() const { return (idi_flags & IDI_CSTR) != 0; }
1524 bool is_qstring() const { return (idi_flags & IDI_QSTRING) != 0; }
1525 bool is_bytearray() const { return (idi_flags & IDI_BYTEARRAY) != 0; }
1526 bool is_buf_var() const { return (idi_flags & IDI_BUFVAR) != 0; }
1527 bool is_decimal() const { return (idi_flags & IDI_DEC) != 0; }
1528 bool is_hexadecimal() const { return (idi_flags & IDI_HEX) != 0; }
1529 bool is_readonly_var() const { return (idi_flags & IDI_READONLY) != 0; }
1530 bool is_incremented() const { return (idi_flags & IDI_INC) != 0; }
1531 bool is_val_mapped() const { return (idi_flags & IDI_MAP_VAL) != 0; }
1532 bool is_hash() const { return (idi_flags & IDI_HASH) != 0; }
1533 bool use_hlpstruc() const { return (idi_flags & IDI_HLPSTRUC) != 0; }
1534 bool is_bitmap() const { return (idi_flags & IDI_BITMAP) != 0; }
1535 bool is_onoff() const { return (idi_flags & IDI_ONOFF) != 0; }
1536 bool is_scalar_var() const { return !is_buf_var(); }
1537 bool is_bitfield() const { return bitmask != 0 || is_bitmap(); }
1538 bool is_boolean() const
1539 {
1540 return is_bitmap() || (bitmask != 0 && is_pow2(bitmask));
1541 }
1542 bool has_individual_node() const { return individual_node != nullptr; }
1543
1544 const char *str_true() const { return is_onoff() ? "on" : "true"; }
1545 const char *str_false() const { return is_onoff() ? "off" : "false"; }
1546
1547 size_t ridx() const { QASSERT(1932, is_node_var()); return offset; }
1548 const char *hashname() const { QASSERT(2040, is_hash()); return (const char *)offset; }
1549 bool operator < (const idbattr_info_t &r) const
1550 {
1551 return strcmp(name, r.name) < 0;
1552 }
1553
1554};
1556
1557#endif // _IDA_HPP
A plugin is a module in the plugins subdirectory that can perform an action asked by the user.
Definition loader.hpp:578
Reimplementation of vector class from STL.
Definition pro.h:2262
void set_cc(callcnv_t cc)
Definition typeinf.hpp:1452
callcnv_t get_cc() const
Definition typeinf.hpp:1451
idaman THREAD_SAFE va_list va
See qsscanf()
Definition err.h:21
int code
Definition fpro.h:88
idaman size_t n
Definition pro.h:1000
bool inf_set_ostype(ushort _v)
Definition ida.hpp:698
range_t inf_get_privrange()
Definition ida.hpp:1089
bool inf_set_rename_jumpfunc(bool _v=true)
Definition ida.hpp:766
bool inf_set_database_change_count(uint32 _v)
Definition ida.hpp:692
uval_t inf_postinc_strlit_sernum(uval_t cnt=1)
Definition ida.hpp:1124
bool inf_set_lowoff(ea_t _v)
Definition ida.hpp:823
bool inf_create_off_using_fixup(void)
Definition ida.hpp:749
uint32 inf_get_appcall_options()
Definition ida.hpp:999
bool inf_final_pass(void)
Definition ida.hpp:773
int32 inf_get_strtype()
Definition ida.hpp:967
bool inf_set_append_sigcmt(bool _v=true)
Definition ida.hpp:760
int calc_default_idaplace_flags(void)
Get default disassembly line options.
Definition ida.hpp:1144
void inf_inc_database_change_count(int cnt=1)
Definition ida.hpp:1118
ea_t inf_get_lowoff()
Definition ida.hpp:822
bool inf_unicode_strlits(void)
Definition ida.hpp:954
ea_t inf_get_omax_ea()
Definition ida.hpp:819
bool inf_set_huge_arg_align(bool _v=true)
Definition ida.hpp:997
bool inf_compress_idb(void)
Definition ida.hpp:658
ea_t inf_get_start_ip()
Definition ida.hpp:798
bool inf_set_limiter_thin(bool _v=true)
Definition ida.hpp:926
inftag_t
Definition ida.hpp:446
@ INF_INCLUDE
assembler include file name
Definition ida.hpp:522
@ INF_PRIVRANGE
Definition ida.hpp:473
@ INF_LENXREF
Definition ida.hpp:490
@ INF_SELECTORS
2..63 are for selector_t blob (see init_selectors())
Definition ida.hpp:534
@ INF_LONG_DEMNAMES
Definition ida.hpp:484
@ INF_LISTNAMES
Definition ida.hpp:486
@ INF_MARGIN
Definition ida.hpp:489
@ INF_H_PATH
C header path.
Definition ida.hpp:520
@ INF_GENFLAGS
Definition ida.hpp:449
@ INF_CMT_INDENT
Definition ida.hpp:488
@ INF_INPUT_FILE_PATH
Definition ida.hpp:547
@ INF_SRCDBG_UNDESIRED
user-closed source files, occupies 20 indexes
Definition ida.hpp:537
@ INF_GROUPS
segment group information (see init_groups())
Definition ida.hpp:519
@ INF_ABIBITS
Definition ida.hpp:514
@ INF_MAXREF
Definition ida.hpp:472
@ INF_FILETYPE
Definition ida.hpp:452
@ INF_SHA256
SHA256 of the input file.
Definition ida.hpp:529
@ INF_START_IP
Definition ida.hpp:462
@ INF_MAIN
Definition ida.hpp:465
@ INF_LIMITER
Definition ida.hpp:493
@ INF_START_EA
Definition ida.hpp:463
@ INF_STR_ENCODINGS
a list of encodings for the program strings
Definition ida.hpp:527
@ INF_CC_SIZE_LL
Definition ida.hpp:512
@ INF_C_MACROS
C predefined macros.
Definition ida.hpp:521
@ INF_IMAGEBASE
image base
Definition ida.hpp:543
@ INF_LAST
Definition ida.hpp:552
@ INF_START_SP
Definition ida.hpp:464
@ INF_FILE_FORMAT_NAME
file format name for loader modules
Definition ida.hpp:518
@ INF_DATABASE_CHANGE_COUNT
Definition ida.hpp:451
@ INF_INDENT
Definition ida.hpp:487
@ INF_CTIME
database creation timestamp
Definition ida.hpp:539
@ INF_OSTYPE
Definition ida.hpp:453
@ INF_OUTFLAGS
Definition ida.hpp:491
@ INF_APPCALL_OPTIONS
Definition ida.hpp:515
@ INF_DEMNAMES
Definition ida.hpp:485
@ INF_START_SS
Definition ida.hpp:460
@ INF_NAMETYPE
Definition ida.hpp:482
@ INF_HIGHOFF
Definition ida.hpp:471
@ INF_ASMTYPE
Definition ida.hpp:455
@ INF_CC_SIZE_B
Definition ida.hpp:507
@ INF_START_CS
Definition ida.hpp:461
@ INF_LOWOFF
Definition ida.hpp:470
@ INF_DUALOP_TEXT
Text representation options.
Definition ida.hpp:524
@ INF_SRCDBG_PATHS
source debug paths, occupies 20 indexes
Definition ida.hpp:536
@ INF_MD5
MD5 of the input file.
Definition ida.hpp:525
@ INF_PROBLEMS
problem lists
Definition ida.hpp:532
@ INF_CC_CM
Definition ida.hpp:505
@ INF_MAX_AUTONAME_LEN
Definition ida.hpp:481
@ INF_FSIZE
input file size
Definition ida.hpp:545
@ INF_OMAX_EA
Definition ida.hpp:469
@ INF_PROCNAME
Definition ida.hpp:448
@ INF_STRLIT_FLAGS
Definition ida.hpp:496
@ INF_PRIVRANGE_END_EA
Definition ida.hpp:475
@ INF_ABINAME
ABI name (processor specific)
Definition ida.hpp:530
@ INF_IDA_VERSION
version of ida which created the database
Definition ida.hpp:526
@ INF_SPECSEGS
Definition ida.hpp:456
@ INF_APPTYPE
Definition ida.hpp:454
@ INF_PREFFLAG
Definition ida.hpp:495
@ INF_AF
Definition ida.hpp:457
@ INF_LFLAGS
Definition ida.hpp:450
@ INF_MIN_EA
Definition ida.hpp:466
@ INF_STRTYPE
Definition ida.hpp:499
@ INF_MAX_EA
Definition ida.hpp:467
@ INF_CC_SIZE_S
Definition ida.hpp:510
@ INF_OMIN_EA
Definition ida.hpp:468
@ INF_STRLIT_BREAK
Definition ida.hpp:497
@ INF_DATATYPES
Definition ida.hpp:502
@ INF_CC_SIZE_L
Definition ida.hpp:511
@ INF_INITIAL_VERSION
initial version of database
Definition ida.hpp:538
@ INF_XREFFLAG
Definition ida.hpp:480
@ INF_DUALOP_GRAPH
Graph text representation options.
Definition ida.hpp:523
@ INF_VERSION
Definition ida.hpp:447
@ INF_DBG_BINPATHS
unused (20 indexes)
Definition ida.hpp:528
@ INF_XREFNUM
Definition ida.hpp:477
@ INF_CC_DEFALIGN
Definition ida.hpp:509
@ INF_CC_SIZE_E
Definition ida.hpp:508
@ INF_AF2
Definition ida.hpp:458
@ INF_CC_ID
Definition ida.hpp:504
@ INF_STRLIT_ZEROES
Definition ida.hpp:498
@ INF_CC_SIZE_LDBL
Definition ida.hpp:513
@ INF_CMTFLG
Definition ida.hpp:492
@ INF_NOTEPAD
notepad blob, occupies 1000 indexes (1MB of text)
Definition ida.hpp:535
@ INF_STRLIT_SERNUM
Definition ida.hpp:501
@ INF_CALLCNV
Definition ida.hpp:551
@ INF_STRLIT_PREF
Definition ida.hpp:500
@ INF_BIN_PREFIX_SIZE
Definition ida.hpp:494
@ INF_NETDELTA
Definition ida.hpp:476
@ INF_TYPE_XREFNUM
Definition ida.hpp:478
@ INF_OUTFILEENC
output file encoding index
Definition ida.hpp:546
@ INF_COMPILER_INFO
Definition ida.hpp:550
@ INF_OBSOLETE_CC
Definition ida.hpp:503
@ INF_NOPENS
how many times the database is opened
Definition ida.hpp:541
@ INF_CRC32
input file crc32
Definition ida.hpp:542
@ INF_CC_SIZE_I
Definition ida.hpp:506
@ INF_SHORT_DEMNAMES
Definition ida.hpp:483
@ INF_REFCMTNUM
Definition ida.hpp:479
@ INF_ELAPSED
seconds database stayed open
Definition ida.hpp:540
@ INF_BASEADDR
Definition ida.hpp:459
@ INF_ARCHIVE_PATH
archive file path
Definition ida.hpp:531
@ INF_PRIVRANGE_START_EA
Definition ida.hpp:474
@ INF_IDSNODE
ids modnode id (for import_module)
Definition ida.hpp:544
bool inf_set_graph_view(bool _v=true)
Definition ida.hpp:626
bool inf_is_mem_aligned4(void)
Definition ida.hpp:978
bool inf_test_mode(void)
Definition ida.hpp:915
bool inf_propagate_regargs(void)
Definition ida.hpp:733
bool inf_set_pack_stkargs(bool _v=true)
Definition ida.hpp:981
char inf_get_nametype()
Definition ida.hpp:857
bool is_filetype_like_binary(filetype_t ft)
Is an unstructured input file?
Definition ida.hpp:68
bool inf_set_strlit_autocmt(bool _v=true)
Definition ida.hpp:957
bool inf_show_repeatables(void)
Definition ida.hpp:907
bool inf_show_all_comments(void)
Definition ida.hpp:909
bool inf_should_create_stkvars(void)
Definition ida.hpp:729
bool inf_set_create_all_xrefs(bool _v=true)
Definition ida.hpp:720
bool inf_set_strtype(int32 _v)
Definition ida.hpp:968
bool inf_set_strlit_sernum(uval_t _v)
Definition ida.hpp:971
cm_t inf_get_cc_cm()
Definition ida.hpp:1011
uchar inf_get_cc_size_s()
Definition ida.hpp:1029
ushort inf_get_max_autoname_len()
Definition ida.hpp:854
bool inf_big_arg_align(void)
Definition ida.hpp:982
bool inf_stack_ldbl(void)
Definition ida.hpp:984
bool inf_set_demnames(uchar _v)
Definition ida.hpp:867
bool inf_set_limiter(uchar _v)
Definition ida.hpp:924
ea_t inf_get_max_ea()
Definition ida.hpp:813
filetype_t inf_get_filetype()
Definition ida.hpp:694
bool inf_set_version(ushort _v)
Definition ida.hpp:607
bool inf_set_abi_set_by_user(bool _v=true)
Definition ida.hpp:991
bool inf_is_snapshot(void)
Definition ida.hpp:654
idaman size_t ida_export validate_idb(uint32 vld_flags=0)
Validate the database.
bool inf_show_xref_fncoff(void)
Definition ida.hpp:849
bool inf_is_exe_dll(void)
Definition ida.hpp:644
bool inf_set_short_demnames(uint32 _v)
Definition ida.hpp:861
bool inf_set_unicode_strlits(bool _v=true)
Definition ida.hpp:955
bool inf_set_cc_id(comp_t _v)
Definition ida.hpp:1009
idaman bool ida_export unregister_post_event_visitor(hook_type_t hook_type, post_event_visitor_t *visitor)
Unregister the post-event visitor.
bool inf_set_ilp32(bool _v=true)
Definition ida.hpp:641
bool inf_op_offset(void)
Definition ida.hpp:753
bool inf_is_graph_view(void)
Definition ida.hpp:625
bool inf_is_dll(void)
Definition ida.hpp:642
bool inf_create_off_on_dref(void)
Definition ida.hpp:751
bool inf_show_xref_val(void)
Definition ida.hpp:851
bool inf_set_listnames(uchar _v)
Definition ida.hpp:870
bool inf_set_nametype(char _v)
Definition ida.hpp:858
bool inf_gen_null(void)
Definition ida.hpp:890
bool inf_set_show_void(bool _v=true)
Definition ida.hpp:887
bool inf_set_hide_comments(bool _v=true)
Definition ida.hpp:912
ushort inf_get_genflags()
Definition ida.hpp:609
bool inf_set_should_trace_sp(bool _v=true)
Definition ida.hpp:736
idaman bool ida_export getinf_flag(inftag_t tag, uint32 flag)
Get a flag value.
bool inf_set_create_off_on_dref(bool _v=true)
Definition ida.hpp:752
ushort inf_get_version()
Definition ida.hpp:606
bool inf_set_exe_dll(bool _v=true)
Definition ida.hpp:645
bool inf_coagulate_data(void)
Definition ida.hpp:769
uval_t inf_get_baseaddr()
Definition ida.hpp:789
bool inf_show_void(void)
Definition ida.hpp:886
uchar inf_get_cc_defalign()
Definition ida.hpp:1026
uint32 inf_get_abibits()
Definition ida.hpp:976
ea_t inf_get_privrange_end_ea()
Definition ida.hpp:1005
uchar inf_get_cmt_indent()
Definition ida.hpp:875
bool inf_set_gen_org(bool _v=true)
Definition ida.hpp:899
uchar inf_get_cc_size_e()
Definition ida.hpp:1023
ushort inf_get_apptype()
Definition ida.hpp:700
idaman bool ida_export setinf_flag(inftag_t tag, uint32 flag, bool value=true)
Set a flag value.
bool inf_show_xref_seg(void)
Definition ida.hpp:845
bool inf_set_show_all_comments(bool _v=true)
Definition ida.hpp:910
bool inf_set_flat_off32(bool _v=true)
Definition ida.hpp:647
bool inf_set_coagulate_data(bool _v=true)
Definition ida.hpp:770
bool inf_is_16bit(void)
Definition ida.hpp:637
bool inf_strlit_serial_names(void)
Definition ida.hpp:952
qvector< callcnv_t > callcnvs_t
Definition ida.hpp:76
bool inf_set_create_off_using_fixup(bool _v=true)
Definition ida.hpp:750
bool inf_set_map_stkargs(bool _v=true)
Definition ida.hpp:995
bool inf_set_strlit_zeroes(char _v)
Definition ida.hpp:965
bool inf_del_no_xref_insns(void)
Definition ida.hpp:721
bool inf_set_show_xref_fncoff(bool _v=true)
Definition ida.hpp:850
uint32 inf_get_af2()
Definition ida.hpp:776
bool inf_set_snapshot(bool _v=true)
Definition ida.hpp:655
ea_t inf_get_start_ea()
Definition ida.hpp:801
uint32 inf_get_outflags()
Definition ida.hpp:884
bool inf_set_create_func_from_ptr(bool _v=true)
Definition ida.hpp:724
bool inf_rename_jumpfunc(void)
Definition ida.hpp:765
bool inf_is_32bit_exactly(void)
Definition ida.hpp:635
bool inf_set_long_demnames(uint32 _v)
Definition ida.hpp:864
bool inf_set_cc_defalign(uchar _v)
Definition ida.hpp:1027
uchar cm_t
calling convention and memory model
Definition ida.hpp:74
idaman DEPRECATED bool ida_export hook_to_notification_point(hook_type_t hook_type, hook_cb_t *cb, void *user_data=nullptr)
Register a callback for a class of events in IDA.
bool inf_set_cmtflg(uchar _v)
Definition ida.hpp:906
bool inf_set_mark_code(bool _v=true)
Definition ida.hpp:714
bool inf_trace_flow(void)
Definition ida.hpp:711
bool inf_set_cc_size_s(uchar _v)
Definition ida.hpp:1030
bool inf_set_compress_idb(bool _v=true)
Definition ida.hpp:659
bool inf_show_src_linnum(void)
Definition ida.hpp:913
bool inf_like_binary(void)
Definition ida.hpp:1131
char inf_get_strlit_zeroes()
Definition ida.hpp:964
idaman ssize_t ida_export get_dbctx_id()
Get the current database context ID.
qstring inf_get_strlit_pref()
Definition ida.hpp:1065
ushort inf_get_af_high()
Definition ida.hpp:1094
bool inf_is_hard_float(void)
Definition ida.hpp:988
bool inf_set_strlit_break(uchar _v)
Definition ida.hpp:962
bool inf_is_kernel_mode(void)
Definition ida.hpp:660
void inf_set_af_high(ushort saf2)
Definition ida.hpp:1095
bool inf_is_flat_off32(void)
Definition ida.hpp:646
bool inf_set_filetype(filetype_t _v)
Definition ida.hpp:695
bool inf_set_propagate_regargs(bool _v=true)
Definition ida.hpp:734
idaman struct dbctx_t *ida_export switch_dbctx(size_t idx)
Switch to the database with the provided context ID.
bool inf_set_show_xref_seg(bool _v=true)
Definition ida.hpp:846
bool inf_allow_non_matched_ops(void)
Definition ida.hpp:623
uint32 inf_get_short_demnames()
Definition ida.hpp:860
ushort inf_get_af2_low()
Get/set low 16-bit half of inf.af2.
Definition ida.hpp:1097
bool inf_set_32bit(bool _v=true)
Definition ida.hpp:636
bool inf_set_asmtype(uchar _v)
Definition ida.hpp:704
bool inf_is_ilp32()
Definition ida.hpp:640
bool inf_set_abibits(uint32 _v)
Definition ida.hpp:977
bool inf_is_limiter_thin(void)
Definition ida.hpp:925
bool inf_set_stack_varargs(bool _v=true)
Definition ida.hpp:987
bool inf_set_prefflag(uchar _v)
Definition ida.hpp:936
filetype_t
Known input file formats (kept in idainfo::filetype):
Definition ida.hpp:36
@ f_SREC
Motorola SREC (S-record)
Definition ida.hpp:50
@ f_LE
Linear Executable (LE)
Definition ida.hpp:45
@ f_LX
Linear Executable (LX)
Definition ida.hpp:44
@ f_ZIP
ZIP file (this file is never loaded to IDA database)
Definition ida.hpp:51
@ f_OMF
Object Module Format.
Definition ida.hpp:49
@ f_ELF
Executable and Linkable Format (ELF)
Definition ida.hpp:55
@ f_OMFLIB
Library of OMF Modules.
Definition ida.hpp:52
@ f_MACHO
Mac OS X Mach-O.
Definition ida.hpp:62
@ f_COFF
Common Object file Format (COFF)
Definition ida.hpp:47
@ f_COM_old
MS-DOS COM file.
Definition ida.hpp:38
@ f_COM
MS-DOS COM file.
Definition ida.hpp:60
@ f_HEX
Intel Hex Object file.
Definition ida.hpp:42
@ f_MEX
MOS Technology Hex Object file.
Definition ida.hpp:43
@ f_PRC
PalmPilot program file.
Definition ida.hpp:58
@ f_AOUT
Linux a.out (AOUT)
Definition ida.hpp:57
@ f_LOADER
file is loaded using LOADER DLL
Definition ida.hpp:54
@ f_AR
ar library
Definition ida.hpp:53
@ f_AIXAR
AIX ar library.
Definition ida.hpp:61
@ f_PSXOBJ
Sony Playstation PSX object file.
Definition ida.hpp:63
@ f_W32RUN
Watcom DOS32 Extender (W32RUN)
Definition ida.hpp:56
@ f_EXE
MS-DOS EXE file.
Definition ida.hpp:59
@ f_NLM
Netware Loadable Module (NLM)
Definition ida.hpp:46
@ f_WIN
New Executable (NE)
Definition ida.hpp:41
@ f_BIN
Binary file.
Definition ida.hpp:39
@ f_EXE_old
MS-DOS EXE file.
Definition ida.hpp:37
@ f_MD1IMG
Mediatek Firmware Image.
Definition ida.hpp:64
@ f_PE
Portable Executable (PE)
Definition ida.hpp:48
@ f_DRV
MS-DOS Driver.
Definition ida.hpp:40
bool inf_show_line_pref(void)
Definition ida.hpp:892
bool inf_set_allow_non_matched_ops(bool _v=true)
Definition ida.hpp:624
bool inf_set_del_no_xref_insns(bool _v=true)
Definition ida.hpp:722
bool inf_should_trace_sp(void)
Definition ida.hpp:735
bool inf_use_flirt(void)
Definition ida.hpp:757
bool inf_set_show_auto(bool _v=true)
Definition ida.hpp:889
bool inf_set_create_func_tails(bool _v=true)
Definition ida.hpp:728
uchar inf_get_cc_size_ll()
Definition ida.hpp:1035
bool inf_stack_varargs(void)
Definition ida.hpp:986
bool inf_set_specsegs(uchar _v)
Definition ida.hpp:707
bool inf_strlit_autocmt(void)
Definition ida.hpp:956
bool inf_set_decode_fpp(bool _v=true)
Definition ida.hpp:631
bool inf_no_store_user_info(void)
Definition ida.hpp:617
bool inf_set_use_allasm(bool _v=true)
Definition ida.hpp:614
bool inf_set_wide_high_byte_first(bool _v=true)
Definition ida.hpp:651
bool inf_set_dll(bool _v=true)
Definition ida.hpp:643
uchar inf_get_indent()
Definition ida.hpp:872
bool inf_set_start_ea(ea_t _v)
Definition ida.hpp:802
bool inf_set_strlit_name_bit(bool _v=true)
Definition ida.hpp:951
idaman bool ida_export move_privrange(ea_t new_privrange_start)
Move privrange to the specified address.
bool inf_set_procname(const char *_v, size_t len=size_t(-1))
Definition ida.hpp:1052
uchar inf_get_strlit_break()
Definition ida.hpp:961
bool inf_set_strlit_savecase(bool _v=true)
Definition ida.hpp:959
bool inf_set_show_hidden_funcs(bool _v=true)
Definition ida.hpp:919
bool inf_set_cmt_indent(uchar _v)
Definition ida.hpp:876
ea_t inf_get_main()
Definition ida.hpp:807
uchar inf_get_cc_size_i()
Definition ida.hpp:1017
bool inf_set_privrange_end_ea(ea_t _v)
Definition ida.hpp:1006
bool inf_is_limiter_empty(void)
Definition ida.hpp:929
uval_t inf_get_strlit_sernum()
Definition ida.hpp:970
bool inf_set_xrefflag(uchar _v)
Definition ida.hpp:844
bool inf_set_appcall_options(uint32 _v)
Definition ida.hpp:1000
bool inf_set_line_pref_with_seg(bool _v=true)
Definition ida.hpp:895
uchar inf_get_listnames()
Definition ida.hpp:869
bool inf_use_allasm(void)
Definition ida.hpp:613
uchar inf_get_xrefnum()
Definition ida.hpp:834
uint32 inf_get_long_demnames()
Definition ida.hpp:863
uchar inf_get_xrefflag()
Definition ida.hpp:843
bool inf_gen_lzero(void)
Definition ida.hpp:896
bool inf_set_prefix_show_segaddr(bool _v=true)
Definition ida.hpp:938
bool inf_set_64bit(bool _v=true)
Definition ida.hpp:639
bool inf_set_cc_size_ldbl(uchar _v)
Definition ida.hpp:1039
uchar inf_get_demnames()
Definition ida.hpp:866
bool inf_create_strlit_on_xref(void)
Definition ida.hpp:745
bool inf_is_be(void)
Definition ida.hpp:648
callcnv_t inf_get_callcnv()
Definition ida.hpp:1014
uchar inf_get_cc_size_b()
Definition ida.hpp:1020
bool inf_create_func_from_ptr(void)
Definition ida.hpp:723
uint32 inf_get_database_change_count()
Definition ida.hpp:691
bool inf_set_trace_flow(bool _v=true)
Definition ida.hpp:712
bool inf_rename_nullsub(void)
Definition ida.hpp:767
idaman size_t ida_export getinf(inftag_t tag)
Get program specific information (a scalar value)
uchar inf_get_asmtype()
Definition ida.hpp:703
bool inf_set_allow_sigmulti(bool _v=true)
Definition ida.hpp:762
qstring inf_get_procname()
Definition ida.hpp:1045
bool inf_set_handle_rtti(bool _v=true)
Definition ida.hpp:781
bool inf_set_max_ea(ea_t _v)
Definition ida.hpp:814
bool inf_set_prefix_show_funcoff(bool _v=true)
Definition ida.hpp:940
bool inf_set_datatypes(uval_t _v)
Definition ida.hpp:974
uchar inf_get_demname_form(void)
Get DEMNAM_MASK bits of demnames.
Definition ida.hpp:1122
bool inf_set_baseaddr(uval_t _v)
Definition ida.hpp:790
idaman bool ida_export is_database_busy()
Check if the database is busy (e.g.
bool inf_append_sigcmt(void)
Definition ida.hpp:759
bool inf_set_check_unicode_strlits(bool _v=true)
Definition ida.hpp:748
bool inf_prefix_show_funcoff(void)
Definition ida.hpp:939
uint32 callcnv_t
Definition ida.hpp:75
bool inf_set_lenxref(ushort _v)
Definition ida.hpp:882
bool inf_set_rename_nullsub(bool _v=true)
Definition ida.hpp:768
bool inf_prefix_truncate_opcode_bytes(void)
Definition ida.hpp:943
bool inf_strlit_savecase(void)
Definition ida.hpp:958
bool inf_is_32bit_or_higher(void)
Definition ida.hpp:634
idaman bool ida_export register_post_event_visitor(hook_type_t hook_type, post_event_visitor_t *visitor, const plugmod_t *owner)
Register the post-event visitor.
bool inf_set_show_repeatables(bool _v=true)
Definition ida.hpp:908
hook_type_t
Types of events that be hooked to with hook_event_listener()
Definition ida.hpp:1301
@ HT_LAST
Definition ida.hpp:1330
@ HT_IDB
Hook to the database events.
Definition ida.hpp:1308
@ HT_IDD
Hook to the debugger plugin.
Definition ida.hpp:1328
@ HT_GRAPH
Handling graph operations (graph_notification_t)
Definition ida.hpp:1326
@ HT_UI
Hook to the user interface.
Definition ida.hpp:1304
@ HT_DBG
Hook to the debugger.
Definition ida.hpp:1306
@ HT_IDP
Hook to the processor module.
Definition ida.hpp:1302
@ HT_DEV
Internal debugger events.
Definition ida.hpp:1318
@ HT_OUTPUT
Output window notifications.
Definition ida.hpp:1323
@ HT_VIEW
Custom/IDA views notifications.
Definition ida.hpp:1320
sel_t inf_get_start_ss()
Definition ida.hpp:792
bool inf_set_netdelta(sval_t _v)
Definition ida.hpp:832
bool inf_set_show_line_pref(bool _v=true)
Definition ida.hpp:893
bool inf_show_hidden_insns(void)
Definition ida.hpp:916
bool inf_set_omin_ea(ea_t _v)
Definition ida.hpp:817
bool inf_set_handle_eh(bool _v=true)
Definition ida.hpp:779
bool inf_set_hard_float(bool _v=true)
Definition ida.hpp:989
bool inf_set_create_func_from_call(bool _v=true)
Definition ida.hpp:726
bool inf_set_show_xref_val(bool _v=true)
Definition ida.hpp:852
bool inf_set_propagate_stkargs(bool _v=true)
Definition ida.hpp:732
bool inf_set_mem_aligned4(bool _v=true)
Definition ida.hpp:979
bool inf_is_64bit(void)
Definition ida.hpp:638
bool inf_macros_enabled(void)
Definition ida.hpp:782
bool inf_set_use_flirt(bool _v=true)
Definition ida.hpp:758
bool inf_show_auto(void)
Definition ida.hpp:888
ea_t inf_get_omin_ea()
Definition ida.hpp:816
bool inf_is_auto_enabled(void)
Definition ida.hpp:611
bool inf_handle_rtti(void)
Definition ida.hpp:780
uint32 inf_get_af()
Definition ida.hpp:709
bool inf_set_auto_enabled(bool _v=true)
Definition ida.hpp:612
bool inf_set_maxref(uval_t _v)
Definition ida.hpp:829
bool inf_check_manual_ops(void)
Definition ida.hpp:621
bool inf_set_op_offset(bool _v=true)
Definition ida.hpp:754
bool inf_set_create_jump_tables(bool _v=true)
Definition ida.hpp:716
int inf_get_pack_mode()
Definition ida.hpp:1100
bool inf_set_cc_size_i(uchar _v)
Definition ida.hpp:1018
bool inf_strlit_names(void)
Definition ida.hpp:948
bool inf_set_main(ea_t _v)
Definition ida.hpp:808
bool inf_set_full_sp_ana(bool _v=true)
Definition ida.hpp:738
bool inf_prefix_show_stack(void)
Definition ida.hpp:941
bool inf_loading_idc(void)
Definition ida.hpp:615
bool inf_set_limiter_empty(bool _v=true)
Definition ida.hpp:930
ea_t inf_get_start_sp()
Definition ida.hpp:804
bool inf_set_pack_idb(bool _v=true)
Definition ida.hpp:657
bool inf_handle_eh(void)
Definition ida.hpp:778
bool inf_set_xrefnum(uchar _v)
Definition ida.hpp:835
uchar inf_get_cc_size_l()
Definition ida.hpp:1032
void inf_set_af_low(ushort saf)
Definition ida.hpp:1093
bool inf_gen_tryblks(void)
Definition ida.hpp:902
bool inf_set_final_pass(bool _v=true)
Definition ida.hpp:774
bool inf_set_outflags(uint32 _v)
Definition ida.hpp:885
bool inf_propagate_stkargs(void)
Definition ida.hpp:731
ea_t inf_get_highoff()
Definition ida.hpp:825
ushort inf_get_af_low()
Get/set low/high 16-bit halves of inf.af.
Definition ida.hpp:1092
bool inf_decode_fpp(void)
Definition ida.hpp:630
bool inf_set_refcmtnum(uchar _v)
Definition ida.hpp:841
bool inf_set_use_gcc_layout(bool _v=true)
Definition ida.hpp:993
bool inf_set_bin_prefix_size(short _v)
Definition ida.hpp:933
bool inf_set_privrange(const range_t &_v)
Definition ida.hpp:1085
bool inf_show_xref_tmarks(void)
Definition ida.hpp:847
bool inf_set_show_src_linnum(bool _v=true)
Definition ida.hpp:914
bool inf_set_guess_func_type(bool _v=true)
Definition ida.hpp:742
bool inf_set_no_store_user_info(bool _v=true)
Definition ida.hpp:618
idaman ssize_t ida_export getinf_buf(inftag_t tag, void *buf, size_t bufsize)
Get program specific information (a non-scalar value)
bool inf_set_dbg_no_store_path(bool _v=true)
Definition ida.hpp:653
bool inf_allow_sigmulti(void)
Definition ida.hpp:761
idaman size_t ida_export get_dbctx_qty()
Get number of database contexts.
ea_t inf_get_privrange_start_ea()
Definition ida.hpp:1002
bool inf_set_hide_outlined(bool _v=true)
Definition ida.hpp:787
bool inf_set_noflow_to_data(bool _v=true)
Definition ida.hpp:718
bool inf_set_truncate_on_del(bool _v=true)
Definition ida.hpp:744
bool inf_merge_strlits(void)
Definition ida.hpp:784
bool inf_set_start_ip(ea_t _v)
Definition ida.hpp:799
bool inf_pack_idb(void)
Definition ida.hpp:656
int inf_set_pack_mode(int pack_mode)
Definition ida.hpp:1108
bool inf_truncate_on_del(void)
Definition ida.hpp:743
ushort inf_get_margin()
Definition ida.hpp:878
bool inf_set_big_arg_align(bool _v=true)
Definition ida.hpp:983
bool inf_check_unicode_strlits(void)
Definition ida.hpp:747
bool inf_set_cc_size_l(uchar _v)
Definition ida.hpp:1033
uchar inf_get_cc_size_ldbl()
Definition ida.hpp:1038
bool inf_set_readonly_idb(bool _v=true)
Definition ida.hpp:620
bool inf_create_func_from_call(void)
Definition ida.hpp:725
uchar inf_get_refcmtnum()
Definition ida.hpp:840
bool inf_set_cc(const compiler_info_t &_v)
Definition ida.hpp:1082
uint32 inf_get_lflags()
Definition ida.hpp:628
bool inf_show_hidden_funcs(void)
Definition ida.hpp:918
uval_t inf_get_maxref()
Definition ida.hpp:828
bool inf_strlit_name_bit(void)
Definition ida.hpp:950
void inf_set_app_bitness(uint bitness)
Definition ida.hpp:673
bool inf_create_func_tails(void)
Definition ida.hpp:727
bool inf_set_be(bool _v=true)
Definition ida.hpp:649
storage_type_t
Storage types for flag bits.
Definition ida.hpp:100
@ STT_CUR
use current storage type (may be used only as a function argument)
Definition ida.hpp:101
@ STT_VA
regular storage: virtual arrays, an explicit flag for each byte
Definition ida.hpp:102
@ STT_MM
memory map: sparse storage. useful for huge objects
Definition ida.hpp:103
@ STT_DBG
memory map: temporary debugger storage. used internally
Definition ida.hpp:104
bool inf_set_strlit_serial_names(bool _v=true)
Definition ida.hpp:953
bool inf_set_min_ea(ea_t _v)
Definition ida.hpp:811
bool inf_set_noret_ana(bool _v=true)
Definition ida.hpp:740
bool inf_set_highoff(ea_t _v)
Definition ida.hpp:826
bool inf_set_kernel_mode(bool _v=true)
Definition ida.hpp:661
bool inf_set_show_hidden_insns(bool _v=true)
Definition ida.hpp:917
bool inf_use_gcc_layout(void)
Definition ida.hpp:992
bool inf_set_limiter_thick(bool _v=true)
Definition ida.hpp:928
void inf_set_af2_low(ushort saf)
Definition ida.hpp:1098
bool inf_set_lflags(uint32 _v)
Definition ida.hpp:629
bool inf_gen_assume(void)
Definition ida.hpp:900
bool inf_prefix_show_segaddr(void)
Definition ida.hpp:937
bool inf_dbg_no_store_path(void)
Definition ida.hpp:652
bool inf_set_show_xref_tmarks(bool _v=true)
Definition ida.hpp:848
ea_t inf_get_min_ea()
Definition ida.hpp:810
bool inf_data_offset(void)
Definition ida.hpp:755
ssize_t idaapi hook_cb_t(void *user_data, int notification_code, va_list va)
Callback provided to hook_to_notification_point().
Definition ida.hpp:1349
idaman bool ida_export delinf(inftag_t tag)
Undefine a program specific information.
bool inf_set_coagulate_code(bool _v=true)
Definition ida.hpp:772
idaman bool ida_export setinf(inftag_t tag, ssize_t value)
Set program specific information.
idaman ssize_t ida_export getinf_str(qstring *buf, inftag_t tag)
Get program specific information (a non-scalar value)
uval_t inf_get_datatypes()
Definition ida.hpp:973
bool inf_set_start_cs(sel_t _v)
Definition ida.hpp:796
bool inf_set_gen_null(bool _v=true)
Definition ida.hpp:891
bool inf_show_hidden_segms(void)
Definition ida.hpp:920
idaman bool ida_export setinf_buf(inftag_t tag, const void *buf, size_t bufsize=0)
Set program specific information.
idaman DEPRECATED int ida_export unhook_from_notification_point(hook_type_t hook_type, hook_cb_t *cb, void *user_data=nullptr)
Unregister a callback (also see hook_to_notification_point()).
bool inf_set_should_create_stkvars(bool _v=true)
Definition ida.hpp:730
bool inf_coagulate_code(void)
Definition ida.hpp:771
bool inf_set_cc_size_ll(uchar _v)
Definition ida.hpp:1036
bool inf_set_strlit_names(bool _v=true)
Definition ida.hpp:949
bool inf_is_wide_high_byte_first(void)
Definition ida.hpp:650
bool inf_set_prefix_show_stack(bool _v=true)
Definition ida.hpp:942
bool inf_hide_libfuncs(void)
Definition ida.hpp:763
bool inf_set_strlit_flags(uchar _v)
Definition ida.hpp:947
bool inf_get_cc(compiler_info_t *out)
Definition ida.hpp:1081
bool inf_set_macros_enabled(bool _v=true)
Definition ida.hpp:783
bool inf_set_privrange_start_ea(ea_t _v)
Definition ida.hpp:1003
bool inf_line_pref_with_seg(void)
Definition ida.hpp:894
bool inf_set_af2(uint32 _v)
Definition ida.hpp:777
bool inf_set_cc_size_e(uchar _v)
Definition ida.hpp:1024
ea_t idaapi to_ea(sel_t reg_cs, uval_t reg_ip)
Convert (sel,off) value to a linear address.
Definition ida.hpp:1152
ushort inf_get_ostype()
Definition ida.hpp:697
bool inf_is_limiter_thick(void)
Definition ida.hpp:927
bool inf_set_type_xrefnum(uchar _v)
Definition ida.hpp:838
uchar inf_get_specsegs()
Definition ida.hpp:706
bool inf_set_check_manual_ops(bool _v=true)
Definition ida.hpp:622
bool inf_noflow_to_data(void)
Definition ida.hpp:717
bool inf_guess_func_type(void)
Definition ida.hpp:741
bool inf_set_gen_tryblks(bool _v=true)
Definition ida.hpp:903
uchar comp_t
target compiler id
Definition ida.hpp:73
bool inf_set_stack_ldbl(bool _v=true)
Definition ida.hpp:985
bool inf_abi_set_by_user(void)
Definition ida.hpp:990
bool inf_set_max_autoname_len(ushort _v)
Definition ida.hpp:855
bool inf_set_create_strlit_on_xref(bool _v=true)
Definition ida.hpp:746
uchar inf_get_prefflag()
Definition ida.hpp:935
bool inf_huge_arg_align(void)
Definition ida.hpp:996
bool inf_set_cc_cm(cm_t _v)
Definition ida.hpp:1012
uchar inf_get_limiter()
Definition ida.hpp:923
bool inf_set_apptype(ushort _v)
Definition ida.hpp:701
bool inf_readonly_idb(void)
Definition ida.hpp:619
uchar inf_get_type_xrefnum()
Definition ida.hpp:837
bool inf_set_af(uint32 _v)
Definition ida.hpp:710
uint inf_get_app_bitness(void)
Definition ida.hpp:663
bool inf_hide_outlined(void)
Definition ida.hpp:786
bool inf_set_gen_lzero(bool _v=true)
Definition ida.hpp:897
bool inf_create_jump_tables(void)
Definition ida.hpp:715
bool inf_set_hide_libfuncs(bool _v=true)
Definition ida.hpp:764
bool inf_noret_ana(void)
Definition ida.hpp:739
bool inf_set_prefix_truncate_opcode_bytes(bool _v=true)
Definition ida.hpp:944
bool inf_set_callcnv(callcnv_t _v)
Definition ida.hpp:1015
DECLARE_TYPE_AS_MOVABLE(idbattr_info_t)
bool inf_set_show_hidden_segms(bool _v=true)
Definition ida.hpp:921
bool inf_set_strlit_pref(const char *_v, size_t len=size_t(-1))
Definition ida.hpp:1072
bool inf_pack_stkargs(void)
Definition ida.hpp:980
int inf_get_effective_addrsize()
Definition ida.hpp:686
sval_t inf_get_netdelta()
Definition ida.hpp:831
uchar inf_get_cmtflg()
Definition ida.hpp:905
bool inf_hide_comments(void)
Definition ida.hpp:911
bool inf_set_genflags(ushort _v)
Definition ida.hpp:610
comp_t inf_get_cc_id()
Definition ida.hpp:1008
bool inf_create_all_xrefs(void)
Definition ida.hpp:719
bool inf_set_start_sp(ea_t _v)
Definition ida.hpp:805
bool inf_full_sp_ana(void)
Definition ida.hpp:737
uchar inf_get_strlit_flags()
Definition ida.hpp:946
bool inf_set_data_offset(bool _v=true)
Definition ida.hpp:756
bool inf_map_stkargs(void)
Definition ida.hpp:994
bool inf_set_cc_size_b(uchar _v)
Definition ida.hpp:1021
bool inf_set_gen_assume(bool _v=true)
Definition ida.hpp:901
short inf_get_bin_prefix_size()
Definition ida.hpp:932
bool inf_set_loading_idc(bool _v=true)
Definition ida.hpp:616
sel_t inf_get_start_cs()
Definition ida.hpp:795
bool inf_set_merge_strlits(bool _v=true)
Definition ida.hpp:785
bool inf_mark_code(void)
Definition ida.hpp:713
bool inf_set_start_ss(sel_t _v)
Definition ida.hpp:793
bool inf_set_indent(uchar _v)
Definition ida.hpp:873
bool inf_set_margin(ushort _v)
Definition ida.hpp:879
bool inf_set_omax_ea(ea_t _v)
Definition ida.hpp:820
idaman ssize_t ida_export invoke_callbacks(hook_type_t hook_type, int notification_code, va_list va)
Generate event notification.
ushort inf_get_lenxref()
Definition ida.hpp:881
bool inf_gen_org(void)
Definition ida.hpp:898
uval_t uval_t
Definition kernwin.hpp:1926
idaman size_t len
Definition kernwin.hpp:1389
asize_t size
Definition kernwin.hpp:6701
unsigned __int64 uint64
Definition llong.hpp:13
This is the first header included in the IDA project.
THREAD_SAFE size_t idaapi qstrlen(const char *s)
Definition pro.h:3074
unsigned int uint32
unsigned 32 bit value
Definition pro.h:352
uint64 asize_t
Definition pro.h:427
T align_up(T val, int elsize)
Align element up to nearest boundary.
Definition pro.h:4721
adiff_t sval_t
signed value used by the processor.
Definition pro.h:450
uint64 ea_t
Definition pro.h:425
int int32
signed 32 bit value
Definition pro.h:351
unsigned char uchar
unsigned 8 bit value
Definition pro.h:341
idaman size_t bufsize
Definition pro.h:604
uint64 sel_t
Definition pro.h:426
bool is_add_ok(U x, T y)
Check that unsigned or unsigned+signed addition does not overflow.
Definition pro.h:1548
unsigned int uint
unsigned 32 bit value
Definition pro.h:343
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:385
unsigned short ushort
unsigned 16 bit value
Definition pro.h:342
void idaapi setflag(T &where, U bit, bool cnd)
Set a 'bit' in 'where' if 'value' is not zero.
Definition pro.h:1530
constexpr bool is_pow2(T val)
is power of 2? (or zero)
Definition pro.h:1435
_qstring< char > qstring
regular string
Definition pro.h:3771
Contains the definition of range_t.
Information about the target compiler.
Definition ida.hpp:80
uchar size_s
short
Definition ida.hpp:88
cm_t cm
memory model and calling convention (see CM) see also get_cc/set_cc
Definition ida.hpp:82
uchar size_b
sizeof(bool)
Definition ida.hpp:85
uchar size_i
sizeof(int)
Definition ida.hpp:84
uchar size_ldbl
longdouble (if different from processor_t::tbyte_size)
Definition ida.hpp:91
uchar defalign
default alignment for structures
Definition ida.hpp:87
callcnv_t _new_callcnv
Definition ida.hpp:92
uchar size_ll
longlong
Definition ida.hpp:90
uchar size_l
long
Definition ida.hpp:89
uchar size_e
sizeof(enum)
Definition ida.hpp:86
helper class to support 32-bit addresses in ida64
Definition ida.hpp:1162
ea_t align_ea(ea_t ea, int size) const
Definition ida.hpp:1256
bool fits_ea_space(const range_t &r) const
Definition ida.hpp:1192
sval_t sval_min() const
Definition ida.hpp:1233
bool is_enabled() const
Definition ida.hpp:1187
ea_t fix_ea_tid(ea_t ea) const
Definition ida.hpp:1215
ea_t trunc_ea(ea_t ea) const
Definition ida.hpp:1196
bool fits_ea_space(ea_t ea) const
Definition ida.hpp:1191
bool enabled
Definition ida.hpp:1170
sval_t ea2sval(uval_t v) const
Definition ida.hpp:1188
bool is_ea_add_ok(uval_t x, uval_t y) const
Definition ida.hpp:1221
void disable()
Definition ida.hpp:1180
ea_t uval2ea(uval_t v) const
Definition ida.hpp:1190
ea_t ea_space_end() const
Definition ida.hpp:1203
const uval_t mask64
Definition ida.hpp:1166
bool fits_ea_space(ea_t) const
Definition ida.hpp:1242
bool fits_ea_space(const range_t &) const
Definition ida.hpp:1243
ea_t to_ea(sel_t cs, uval_t ip) const
Definition ida.hpp:1208
const uval_t mask32
Definition ida.hpp:1163
sval_t sval_max() const
Definition ida.hpp:1232
uval_t mask
Definition ida.hpp:1168
void setup(bool)
Definition ida.hpp:1238
bool like_badaddr(ea_t ea) const
Definition ida.hpp:1255
bool advance_ea(ea_t *ea, asize_t n) const
Definition ida.hpp:1257
void setup(bool is_64bit)
Definition ida.hpp:1172
uval_t trunc_uval(uval_t v) const
Definition ida.hpp:1189
int ea_size
Definition ida.hpp:1169
Definition ida.hpp:122
friend struct idainfo_internal_t
Definition ida.hpp:442
uchar s_xrefflag
Xref options
Definition ida.hpp:284
uint32 outflags
output flags
Definition ida.hpp:343
sval_t netdelta
Delta value to be added to all addresses, for mapping to netnodes.
Definition ida.hpp:269
uchar asmtype
target assembler number
Definition ida.hpp:185
ea_t main
address of main()
Definition ida.hpp:254
uchar type_xrefnum
Number of references to generate in the struct & enum windows 0 - xrefs won't be generated at all.
Definition ida.hpp:276
sel_t start_cs
selector of the segment with the main entry point
Definition ida.hpp:248
uchar refcmtnum
Number of comment lines to generate for refs to string literals or demangled names 0 - such comments ...
Definition ida.hpp:279
uint32 af
Analysis flags
Definition ida.hpp:192
uchar strlit_break
Character used to break string literal lines.
Definition ida.hpp:404
range_t privrange
Range of addresses reserved for internal use.
Definition ida.hpp:267
uint32 abibits
ABI features.
Definition ida.hpp:416
ea_t highoff
High limit for offsets (used in calculation of 'void' operands)
Definition ida.hpp:262
uchar listnames
Name list options
Definition ida.hpp:328
ea_t lowoff
Low limit for offsets (used in calculation of 'void' operands)
Definition ida.hpp:260
ushort margin
max length of data lines
Definition ida.hpp:341
ea_t max_ea
maxEA is excluded
Definition ida.hpp:256
ushort apptype
Application type bit definitions in libfuncs.hpp.
Definition ida.hpp:182
uchar indent
DISASSEMBLY LISTING DETAILS.
Definition ida.hpp:339
uchar strlit_flags
STRING LITERALS.
Definition ida.hpp:393
uval_t baseaddr
remaining 27 bits are reserved
Definition ida.hpp:246
char strlit_pref[IDAINFO_STRLIT_PREF_SIZE]
prefix for string literal names
Definition ida.hpp:408
ushort version
Version of database.
Definition ida.hpp:125
uval_t strlit_sernum
serial number
Definition ida.hpp:409
char strlit_zeroes
leading zeros
Definition ida.hpp:405
char tag[IDAINFO_TAG_SIZE]
'IDA'
Definition ida.hpp:123
ushort lenxref
max length of line with xrefs
Definition ida.hpp:342
ushort s_genflags
General idainfo flags
Definition ida.hpp:128
ea_t omin_ea
original minEA (is set after loading the input file)
Definition ida.hpp:257
ea_t min_ea
current limits of the program
Definition ida.hpp:255
ea_t start_ip
IP register value at the start of program execution.
Definition ida.hpp:249
uint32 long_demnames
long form of demangled names see demangle.h for definitions
Definition ida.hpp:314
ushort filetype
The input file type.
Definition ida.hpp:177
char nametype
Dummy names representation types
Definition ida.hpp:296
uint32 af2
Analysis flags 2
Definition ida.hpp:234
short bin_prefix_size
Number of instruction bytes (opcodes) to show in line prefix.
Definition ida.hpp:381
uchar xrefnum
CROSS REFERENCES.
Definition ida.hpp:273
sel_t start_ss
selector of the initial stack segment
Definition ida.hpp:247
uchar s_prefflag
Line prefix options
Definition ida.hpp:382
uchar specsegs
What format do special segments use?
Definition ida.hpp:187
int32 strtype
current ASCII string type see nalt.hpp for string types
Definition ida.hpp:406
ushort ostype
OS type the program is for bit definitions in libfuncs.hpp.
Definition ida.hpp:179
char zero
this field is not present in the database
Definition ida.hpp:124
ea_t start_ea
Linear address of the program entry point.
Definition ida.hpp:251
ea_t start_sp
SP register value at the start of program execution.
Definition ida.hpp:252
ea_t omax_ea
original maxEA (is set after loading the input file)
Definition ida.hpp:258
uchar cmt_indent
Indentation for comments.
Definition ida.hpp:340
uchar demnames
Demangled name flags
Definition ida.hpp:316
uchar s_limiter
Delimiter options
Definition ida.hpp:372
ushort max_autoname_len
NAMES.
Definition ida.hpp:295
uint32 lflags
Misc. database flags
Definition ida.hpp:143
uval_t maxref
Max tail for references.
Definition ida.hpp:265
uval_t datatypes
data types allowed in data carousel
Definition ida.hpp:412
uint32 database_change_count
incremented after each byte and regular segment modifications
Definition ida.hpp:174
uint32 appcall_options
appcall options, see idd.hpp
Definition ida.hpp:439
EA64_ALIGN(padding)
compiler_info_t cc
COMPILER.
Definition ida.hpp:415
uchar s_cmtflg
Comment options
Definition ida.hpp:358
char procname[IDAINFO_PROCNAME_SIZE]
Name of the current processor (with \0)
Definition ida.hpp:126
uint32 short_demnames
short form of demangled names
Definition ida.hpp:313
access to attribute by structure/offset/width or netnode/index/width
Definition ida.hpp:1478
bool is_onoff() const
Definition ida.hpp:1535
const char * str_false() const
Definition ida.hpp:1545
const char * hashname() const
Definition ida.hpp:1548
bool is_node_supval() const
Definition ida.hpp:1518
bool is_buf_var() const
Definition ida.hpp:1526
size_t ridx() const
Definition ida.hpp:1547
uint idi_flags
Definition ida.hpp:1490
bool is_node_valobj() const
Definition ida.hpp:1519
uchar tag
tag of node value (if IDI_NODEVAL is set)
Definition ida.hpp:1487
uint32 maxsize
max bytes reserved for storage in netnode
Definition ida.hpp:1515
bool is_hexadecimal() const
Definition ida.hpp:1528
bool is_cstr() const
Definition ida.hpp:1523
bool is_val_mapped() const
Definition ida.hpp:1531
bool is_scalar_var() const
Definition ida.hpp:1536
const idbattr_valmap_t * vmap
array value=>name (terminated by empty element)
Definition ida.hpp:1488
uint64 bitmask
mask for bitfields (0-not bitfield)
Definition ida.hpp:1486
size_t width
field width in bytes
Definition ida.hpp:1485
const char * str_true() const
Definition ida.hpp:1544
bool is_hash() const
Definition ida.hpp:1532
bool is_node_altval() const
Definition ida.hpp:1517
bool is_bitmap() const
Definition ida.hpp:1534
bool is_readonly_var() const
Definition ida.hpp:1529
bool is_boolean() const
Definition ida.hpp:1538
bool is_struc_field() const
Definition ida.hpp:1522
bool is_qstring() const
Definition ida.hpp:1524
bool is_decimal() const
Definition ida.hpp:1527
bool operator<(const idbattr_info_t &r) const
Definition ida.hpp:1549
const char * individual_node
individual node name (nullptr - use default)
Definition ida.hpp:1489
bool is_bytearray() const
Definition ida.hpp:1525
bool is_incremented() const
Definition ida.hpp:1530
const char * name
human-readable name.
Definition ida.hpp:1479
bool is_node_var() const
Definition ida.hpp:1521
bool has_individual_node() const
Definition ida.hpp:1542
bool is_bitfield() const
Definition ida.hpp:1537
bool use_hlpstruc() const
Definition ida.hpp:1533
bool is_node_blob() const
Definition ida.hpp:1520
uintptr_t offset
field position: offset within a structure (IDI_STRUCFLD) altval or supval index (IDI_NODEVAL) hashval...
Definition ida.hpp:1481
idbattr mapping value=>string for human-readable representation of IDB attrs
Definition ida.hpp:1470
const char * valname
Definition ida.hpp:1472
uint64 value
Definition ida.hpp:1471
Definition idp.hpp:2323
Implements action to take when the event was processed by the notification callback (i....
Definition ida.hpp:1389
virtual ~post_event_visitor_t()
Definition ida.hpp:1403
virtual ssize_t idaapi handle_post_event(ssize_t code, int notification_code, va_list va)=0
Action for post-event management.
Base class for an range.
Definition range.hpp:35
ea_t end_ea
end_ea excluded
Definition range.hpp:38
bool contains(ea_t ea) const
Is 'ea' in the address range?
Definition range.hpp:48
ea_t start_ea
start_ea included
Definition range.hpp:37