IDA C++ SDK 9.2
Loading...
Searching...
No Matches
idp.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 _IDP_HPP
9#define _IDP_HPP
10
11#include <fpro.h>
12#include <ieee.h>
13#include <nalt.hpp>
14#include <segment.hpp>
15#include <funcs.hpp>
16#include <ua.hpp>
17#include <bitrange.hpp>
18#include <config.hpp>
19
39
40typedef int help_t;
41
42struct outctx_t;
43struct regval_t;
44struct stkpnts_t;
45struct simd_info_t;
46struct reg_accesses_t;
47struct call_stack_t;
49struct simd_info_vec_t;
50struct reg_finder_t;
51class merge_data_t;
52class idasgn_t;
53
56
57#define IDP_INTERFACE_VERSION 900
58
59//-----------------------------------------------------------------------
62struct bytes_t
63{
65 const uchar *bytes;
66};
67
68//-------------------------------------------------------------------------
72#define CF_STOP 0x00001
74#define CF_CALL 0x00002
75#define CF_CHG1 0x00004
76#define CF_CHG2 0x00008
77#define CF_CHG3 0x00010
78#define CF_CHG4 0x00020
79#define CF_CHG5 0x00040
80#define CF_CHG6 0x00080
81#define CF_USE1 0x00100
82#define CF_USE2 0x00200
83#define CF_USE3 0x00400
84#define CF_USE4 0x00800
85#define CF_USE5 0x01000
86#define CF_USE6 0x02000
87#define CF_JUMP 0x04000
89#define CF_SHFT 0x08000
90#define CF_HLL 0x10000
92#define CF_CHG7 0x020000
93#define CF_CHG8 0x040000
94#define CF_USE7 0x080000
95#define CF_USE8 0x100000
98
99//-----------------------------------------------------------------------
104{
105 const char *name;
107};
108
109
111
112inline THREAD_SAFE bool has_cf_chg(uint32 feature, uint opnum)
113{
114 static const int bits[] =
115 {
116 CF_CHG1, CF_CHG2, CF_CHG3, CF_CHG4,
117 CF_CHG5, CF_CHG6, CF_CHG7, CF_CHG8,
118 };
119 CASSERT(qnumber(bits) == UA_MAXOP);
120 return opnum < UA_MAXOP && (feature & bits[opnum]) != 0;
121}
122
123
125
126inline THREAD_SAFE bool has_cf_use(uint32 feature, uint opnum)
127{
128 static const int bits[] =
129 {
130 CF_USE1, CF_USE2, CF_USE3, CF_USE4,
131 CF_USE5, CF_USE6, CF_USE7, CF_USE8,
132 };
133 CASSERT(qnumber(bits) == UA_MAXOP);
134 return opnum < UA_MAXOP && (feature & bits[opnum]) != 0;
135}
136
137
139
140idaman bool ida_export has_insn_feature(uint16 icode, uint32 bit);
141
142
143
145
146idaman bool ida_export is_call_insn(const insn_t &insn);
147
148
150
152#define IRI_EXTENDED 0x00
154#define IRI_RET_LITERALLY 0x01
155#define IRI_SKIP_RETTARGET 0x02
157#define IRI_STRICT (IRI_RET_LITERALLY|IRI_SKIP_RETTARGET)
159idaman bool ida_export is_ret_insn(const insn_t &insn, uchar flags=IRI_STRICT);
160
161
163
164idaman bool ida_export is_indirect_jump_insn(const insn_t &insn);
165
166
168
169idaman bool ida_export is_basic_block_end(const insn_t &insn, bool call_insn_stops_block);
170
171
172//=====================================================================
177struct asm_t
178{
183#define AS_OFFST 0x00000001
184#define AS_COLON 0x00000002
185#define AS_UDATA 0x00000004
186
187#define AS_2CHRE 0x00000008
188#define AS_NCHRE 0x00000010
189#define AS_N2CHR 0x00000020
190
191 // String literals:
192#define AS_1TEXT 0x00000040
193#define AS_NHIAS 0x00000080
194#define AS_NCMAS 0x00000100
195
196#define AS_HEXFM 0x00000E00
197#define ASH_HEXF0 0x00000000
198#define ASH_HEXF1 0x00000200
199#define ASH_HEXF2 0x00000400
200#define ASH_HEXF3 0x00000600
201#define ASH_HEXF4 0x00000800
202#define ASH_HEXF5 0x00000A00
203#define AS_DECFM 0x00003000
204#define ASD_DECF0 0x00000000
205#define ASD_DECF1 0x00001000
206#define ASD_DECF2 0x00002000
207#define ASD_DECF3 0x00003000
208#define AS_OCTFM 0x0001C000
209#define ASO_OCTF0 0x00000000
210#define ASO_OCTF1 0x00004000
211#define ASO_OCTF2 0x00008000
212#define ASO_OCTF3 0x0000C000
213#define ASO_OCTF4 0x00010000
214#define ASO_OCTF5 0x00014000
215#define ASO_OCTF6 0x00018000
216#define ASO_OCTF7 0x0001C000
217#define AS_BINFM 0x000E0000
218#define ASB_BINF0 0x00000000
219#define ASB_BINF1 0x00020000
220#define ASB_BINF2 0x00040000
221#define ASB_BINF3 0x00060000
222#define ASB_BINF4 0x00080000
223#define ASB_BINF5 0x000A0000
224
225#define AS_UNEQU 0x00100000
226#define AS_ONEDUP 0x00200000
227#define AS_NOXRF 0x00400000
228#define AS_XTRNTYPE 0x00800000
229#define AS_RELSUP 0x01000000
230#define AS_LALIGN 0x02000000
231#define AS_NOCODECLN 0x04000000
232#define AS_NOSPACE 0x10000000
233#define AS_ALIGN2 0x20000000
235#define AS_ASCIIC 0x40000000
237#define AS_ASCIIZ 0x80000000
241 const char *name;
243 const char *const *header;
245 const char *origin;
246 const char *end;
247 const char *cmnt;
248 char ascsep;
249 char accsep;
250 const char *esccodes;
252
253 // Data representation (db,dw,...):
254 const char *a_ascii;
255 const char *a_byte;
256 const char *a_word;
257 const char *a_dword;
258 const char *a_qword;
259 const char *a_oword;
260 const char *a_float;
261 const char *a_double;
262 const char *a_tbyte;
263 const char *a_packreal;
264 const char *a_dups;
273 const char *a_bss;
276 const char *a_equ;
277 const char *a_seg;
278
279 const char *a_curip;
280
284 void (idaapi *out_func_header)(outctx_t &ctx, func_t *);
285
289 void (idaapi *out_func_footer)(outctx_t &ctx, func_t *);
290
291 const char *a_public;
292 const char *a_weak;
293 const char *a_extrn;
294 const char *a_comdef;
295
298 ssize_t (idaapi *get_type_name)(
299 qstring *buf,
302
303 const char *a_align;
304
305 char lbrace;
306 char rbrace;
307
308 const char *a_mod;
309 const char *a_band;
310 const char *a_bor;
311 const char *a_xor;
312 const char *a_bnot;
313 const char *a_shl;
314 const char *a_shr;
315 const char *a_sizeof_fmt;
316
321#define AS2_BRACE 0x00000001
322#define AS2_STRINV 0x00000002
324#define AS2_BYTE1CHAR 0x00000004
326#define AS2_IDEALDSCR 0x00000008
329#define AS2_TERSESTR 0x00000010
331#define AS2_COLONSUF 0x00000020
334#define AS2_YWORD 0x00000040
335#define AS2_ZWORD 0x00000080
337
338 const char *cmnt2;
343 const char *low8;
344 const char *high8;
345 const char *low16;
346 const char *high16;
347 const char *a_include_fmt;
348 const char *a_vstruc_fmt;
352 const char *a_rva;
354 const char *a_yword;
356 const char *a_zword;
358};
359#ifndef __X86__
360CASSERT(sizeof(asm_t) == 416);
361#else
362CASSERT(sizeof(asm_t) == 212);
363#endif
364
365// forward declarations for notification helpers
366struct proc_def_t;
367struct elf_loader_t;
368class reader_t;
369struct extlang_t;
370class qflow_chart_t;
371struct libfunc_t;
372struct fixup_data_t;
373struct idd_opinfo_t;
374class argloc_t;
375struct func_type_data_t;
376struct regobjs_t;
377class callregs_t;
378struct funcarg_t;
379struct stkarg_part_t;
380
381//-------------------------------------------------------------------------
390
391
392//--------------------------------------------------------------------------
393struct event_listener_t;
394
407idaman bool ida_export hook_event_listener(
408 hook_type_t hook_type,
410 const void *owner,
411 int hkcb_flags=0);
414#define HKCB_GLOBAL 0x0001
421
428idaman bool ida_export unhook_event_listener(
429 hook_type_t hook_type,
430 event_listener_t *cb);
431
433idaman void ida_export remove_event_listener(event_listener_t *cb);
434
436{
437 size_t listener_flags = 0; // reserved
440 virtual ssize_t idaapi on_event(ssize_t code, va_list va) = 0;
442};
443
445#define DECLARE_LISTENER(listener_type, ctx_type, ctx_name) \
446 struct listener_type : public event_listener_t \
447 { \
448 ctx_type &ctx_name; \
449 listener_type(ctx_type &_ctx) : ctx_name(_ctx) {} \
450 virtual ssize_t idaapi on_event(ssize_t code, va_list va) override; \
451 }
452
453//-------------------------------------------------------------------------
458#define PLFM_386 0
459#define PLFM_Z80 1
460#define PLFM_I860 2
461#define PLFM_8051 3
462#define PLFM_TMS 4
463#define PLFM_6502 5
464#define PLFM_PDP 6
465#define PLFM_68K 7
466#define PLFM_JAVA 8
467#define PLFM_6800 9
468#define PLFM_ST7 10
469#define PLFM_MC6812 11
470#define PLFM_MIPS 12
471#define PLFM_ARM 13
472#define PLFM_TMSC6 14
473#define PLFM_PPC 15
474#define PLFM_80196 16
475#define PLFM_Z8 17
476#define PLFM_SH 18
477#define PLFM_NET 19
478#define PLFM_AVR 20
479#define PLFM_H8 21
480#define PLFM_PIC 22
481#define PLFM_SPARC 23
482#define PLFM_ALPHA 24
483#define PLFM_HPPA 25
484#define PLFM_H8500 26
485#define PLFM_TRICORE 27
486#define PLFM_DSP56K 28
487#define PLFM_C166 29
488#define PLFM_ST20 30
489#define PLFM_IA64 31
490#define PLFM_I960 32
491#define PLFM_F2MC 33
492#define PLFM_TMS320C54 34
493#define PLFM_TMS320C55 35
494#define PLFM_TRIMEDIA 36
495#define PLFM_M32R 37
496#define PLFM_NEC_78K0 38
497#define PLFM_NEC_78K0S 39
498#define PLFM_M740 40
499#define PLFM_M7700 41
500#define PLFM_ST9 42
501#define PLFM_FR 43
502#define PLFM_MC6816 44
503#define PLFM_M7900 45
504#define PLFM_TMS320C3 46
505#define PLFM_KR1878 47
506#define PLFM_AD218X 48
507#define PLFM_OAKDSP 49
508#define PLFM_TLCS900 50
509#define PLFM_C39 51
510#define PLFM_CR16 52
511#define PLFM_MN102L00 53
512#define PLFM_TMS320C1X 54
513#define PLFM_NEC_V850X 55
514#define PLFM_SCR_ADPT 56
515#define PLFM_EBC 57
516#define PLFM_MSP430 58
517#define PLFM_SPU 59
518#define PLFM_DALVIK 60
519#define PLFM_65C816 61
520#define PLFM_M16C 62
521#define PLFM_ARC 63
522#define PLFM_UNSP 64
523#define PLFM_TMS320C28 65
524#define PLFM_DSP96K 66
525#define PLFM_SPC700 67
526#define PLFM_AD2106X 68
527#define PLFM_PIC16 69
528#define PLFM_S390 70
529#define PLFM_XTENSA 71
530#define PLFM_RISCV 72
531#define PLFM_RL78 73
532#define PLFM_RX 74
533#define PLFM_WASM 75
534#define PLFM_NDS32 76
535#define PLFM_MCORE 77
537
538//-------------------------------------------------------------------------
542#define PR_SEGS 0x000001
543#define PR_USE32 0x000002
544#define PR_DEFSEG32 0x000004
545#define PR_RNAMESOK 0x000008
546//#define PR_DB2CSEG 0x0010 // .byte directive in code segments
547// // should define even number of bytes
548// // (used by AVR processor)
549#define PR_ADJSEGS 0x000020
550#define PR_DEFNUM 0x0000C0
551#define PRN_HEX 0x000000
552#define PRN_OCT 0x000040
553#define PRN_DEC 0x000080
554#define PRN_BIN 0x0000C0
555#define PR_WORD_INS 0x000100
556#define PR_NOCHANGE 0x000200
558#define PR_ASSEMBLE 0x000400
559#define PR_ALIGN 0x000800
560#define PR_TYPEINFO 0x001000
563#define PR_USE64 0x002000
564#define PR_SGROTHER 0x004000
565#define PR_STACK_UP 0x008000
566#define PR_BINMEM 0x010000
569#define PR_SEGTRANS 0x020000
572#define PR_CHK_XREF 0x040000
573#define PR_NO_SEGMOVE 0x080000
575//#define PR_FULL_HIFXP 0x100000 // ::REF_VHIGH operand value contains full operand
576// // (not only the high bits) Meaningful if \ph{high_fixup_bits}
577#define PR_USE_ARG_TYPES 0x200000
578#define PR_SCALE_STKVARS 0x400000
579#define PR_DELAYED 0x800000
582#define PR_ALIGN_INSN 0x1000000
585#define PR_PURGING 0x2000000
586#define PR_CNDINSNS 0x4000000
587#define PR_USE_TBYTE 0x8000000
588#define PR_DEFSEG64 0x10000000
589#define PR_OUTER 0x20000000
591
592//-------------------------------------------------------------------------
596#define PR2_MAPPINGS 0x000001
597#define PR2_IDP_OPTS 0x000002
598#define PR2_CODE16_BIT 0x000008
600#define PR2_MACRO 0x000010
601#define PR2_USE_CALCREL 0x000020
602#define PR2_REL_BITS 0x000040
603#define PR2_FORCE_16BIT 0x000080
604#define PR2_IGNORE_IDA_GUESS 0x000100
605
607
608//-------------------------------------------------------------------------
612#define OP_FP_BASED 0x00000000
613#define OP_SP_BASED 0x00000001
614#define OP_SP_ADD 0x00000000
615#define OP_SP_SUB 0x00000002
617
618//-------------------------------------------------------------------------
621#define CUSTOM_INSN_ITYPE 0x8000
622
623//-------------------------------------------------------------------------
626#define REG_SPOIL 0x80000000
627
628//=====================================================================
633{
639
640 bool has_idp_opts(void) const { return (flag2 & PR2_IDP_OPTS) != 0; }
641 bool has_segregs(void) const { return (flag & PR_SEGS) != 0; }
642 bool use32(void) const { return (flag & (PR_USE64|PR_USE32)) != 0; }
643 bool use64(void) const { return (flag & PR_USE64) != 0; }
644 bool ti(void) const { return (flag & PR_TYPEINFO) != 0; }
645 bool stkup(void) const { return (flag & PR_STACK_UP) != 0; }
646 bool use_tbyte(void) const { return (flag & PR_USE_TBYTE) != 0; }
647 bool use_mappings(void) const { return (flag2 & PR2_MAPPINGS) != 0; }
648 bool has_code16_bit(void) const { return (flag2 & PR2_CODE16_BIT) != 0; }
649 bool supports_macros(void) const { return (flag2 & PR2_MACRO) != 0; }
650 bool supports_calcrel(void) const { return (flag2 & PR2_USE_CALCREL) != 0; }
651 bool calcrel_in_bits(void) const { return (flag2 & PR2_REL_BITS) != 0; }
652
657
658 int get_default_segm_bitness(bool is_64bit_app) const
659 {
660 return is_64bit_app && (flag & PR_DEFSEG64) != 0 ? 2 : (flag & PR_DEFSEG32) != 0;
661 }
662
671
675 int cbsize(void) { return (cnbits+7)/8; }
676 int dbsize(void) { return (dnbits+7)/8; }
678
683 const char *const *psnames;
685 const char *const *plnames;
688
689 inline int get_proc_index();
690
691 const asm_t *const *assemblers;
696
697 typedef const regval_t &(idaapi regval_getter_t)(
698 const char *name,
699 const regval_t *regvalues);
700
701 //<hookgen IDP>
702
716 {
720
722
728
732
735
738
745
748
759
770
778
785
789
793
800
807
813
820
827
835
843
850
858
864
875
881
889
899
904
912
923
930
944
950
956
963
974
983
991
993
1003
1011
1017
1022
1027
1043
1054
1062
1069
1079
1086
1097
1106
1116
1123
1132
1140
1148
1153
1160
1172
1180
1191
1192 // the following 5 events are very low level
1193 // take care of possible recursion
1200
1207
1214
1220
1229
1236
1255
1260
1268
1279
1289
1298
1305
1318
1326
1332
1341
1347
1354
1364
1373
1382
1392
1396
1400
1408
1417
1421
1427
1437
1438
1449
1460
1468
1479
1492
1498
1504
1509
1516
1524
1531
1538
1542
1548
1559
1568
1577
1589
1595
1597
1610
1619
1629
1636
1643
1651
1658
1670
1685
1702
1703 // END OF DEBUGGER CALLBACKS
1704
1705 // START OF TYPEINFO CALLBACKS TODO: get this into doxygen output
1706 // The codes below will be called only if #PR_TYPEINFO is set.
1707 // Please note that some codes are optional but the more codes
1708 // are implemented, the better the analysis.
1709
1711
1720
1728
1732
1735
1741
1752
1757
1763
1771
1779
1795
1807
1824
1832
1840
1853
1860
1867
1876
1883
1889
1895
1900
1912
1914
1916
1917 // END OF TYPEINFO CALLBACKS
1918
1923 };
1924
1927 static ssize_t notify(event_t event_code, ...)
1928 {
1929 va_list va;
1930 va_start(va, event_code);
1931 ssize_t code = invoke_callbacks(HT_IDP, event_code, va);
1932 va_end(va);
1933 return code;
1934 }
1935
1936 // Notification helpers, should be used instead of direct ph.notify(...) calls
1937 inline static ssize_t init(const char *idp_modname);
1938 inline static ssize_t term();
1939 inline static ssize_t newprc(int pnum, bool keep_cfg);
1940 inline static ssize_t newasm(int asmnum);
1941 inline static ssize_t asm_installed(int asmnum);
1942 inline static ssize_t newfile(const char *fname);
1943 inline static ssize_t oldfile(const char *fname);
1944 inline static ssize_t newbinary(const char *filename, qoff64_t fileoff, ea_t basepara, ea_t binoff, uint64 nbytes);
1945 inline static ssize_t endbinary(bool ok);
1946 inline static ssize_t creating_segm(segment_t *seg);
1947 inline static ssize_t assemble(uchar *_bin, ea_t ea, ea_t cs, ea_t ip, bool _use32, const char *line);
1948 inline static ssize_t ana_insn(insn_t *out);
1949 inline static ssize_t emu_insn(const insn_t &insn);
1950 inline static ssize_t out_header(outctx_t &ctx);
1951 inline static ssize_t out_footer(outctx_t &ctx);
1952 inline static ssize_t out_segstart(outctx_t &ctx, segment_t *seg);
1953 inline static ssize_t out_segend(outctx_t &ctx, segment_t *seg);
1954 inline static ssize_t out_assumes(outctx_t &ctx);
1955 inline static ssize_t out_insn(outctx_t &ctx);
1956 inline static ssize_t out_mnem(outctx_t &ctx);
1957 inline static ssize_t out_operand(outctx_t &ctx, const op_t &op);
1958 inline static ssize_t out_data(outctx_t &ctx, bool analyze_only);
1959 inline static ssize_t out_label(outctx_t &ctx, const char *colored_name);
1960 inline static ssize_t out_special_item(outctx_t &ctx, uchar segtype);
1961 inline static ssize_t gen_stkvar_def(outctx_t &ctx, const struct udm_t *mptr, sval_t v, tid_t tid);
1962 inline static ssize_t gen_regvar_def(outctx_t &ctx, regvar_t *v);
1963 inline static ssize_t gen_src_file_lnnum(outctx_t &ctx, const char *file, size_t lnnum);
1964 inline static ssize_t rename(ea_t ea, const char *new_name, int flags);
1965 inline static ssize_t sanitize_name(qstring *name, callcnv_t cc);
1966 inline static ssize_t is_outlined_function(ea_t func_ea);
1967 inline static ssize_t may_show_sreg(ea_t current_ea);
1968 inline static ssize_t coagulate(ea_t start_ea);
1969 inline static void auto_queue_empty(/*atype_t*/ int type);
1970
1971 inline static ssize_t func_bounds(int *possible_return_code, func_t *pfn, ea_t max_func_end_ea);
1972 inline static ssize_t may_be_func(const insn_t &insn, int state);
1973 inline static ssize_t is_sane_insn(const insn_t &insn, int no_crefs);
1974 inline static ssize_t cmp_operands(const op_t &op1, const op_t &op2);
1975 inline static ssize_t is_jump_func(func_t *pfn, ea_t *jump_target, ea_t *func_pointer);
1976 inline static ssize_t is_basic_block_end(const insn_t &insn, bool call_insn_stops_block);
1977 inline static ssize_t getreg(uval_t *rv, int regnum);
1978 inline static ssize_t undefine(ea_t ea);
1979 inline static ssize_t moving_segm(segment_t *seg, ea_t to, int flags);
1980 inline static ssize_t is_sp_based(const insn_t &insn, const op_t &x);
1981 inline static ssize_t is_far_jump(int icode);
1982 inline static ssize_t is_call_insn(const insn_t &insn);
1983 inline static ssize_t is_ret_insn(const insn_t &insn, uchar iri_flags);
1984 inline static ssize_t is_align_insn(ea_t ea);
1985 inline static ssize_t is_addr_insn(int *type, const insn_t &insn);
1986 inline static ssize_t out_segment_start(outctx_t &ctx, ea_t seg_start_ea);
1987 inline static ssize_t out_segment_end(outctx_t &ctx, ea_t seg_start_ea);
1988 inline static ssize_t creating_segment(segment_info_t *si);
1989 inline static ssize_t moving_segment(ea_t seg_start_ea, ea_t to, int flags);
1990 inline static ssize_t is_jump_function(func_entry_info_t *fi, ea_t *jump_target, ea_t *func_pointer);
1991 inline static ssize_t function_bounds(int *possible_return_code, fchunk_info_t *fi, ea_t max_func_end_ea);
1992 inline static ssize_t verify_function_sp(ea_t func_ea);
1993 inline static ssize_t verify_function_noreturn(ea_t func_ea);
1994 inline static ssize_t create_function_frame(ea_t func_ea);
1995 inline static ssize_t get_function_retsize(int *retsize, ea_t func_ea);
1996 inline static ssize_t out_function_header(outctx_t &ctx, ea_t func_ea);
1997 inline static ssize_t out_function_footer(outctx_t &ctx, ea_t func_ea);
1998 inline static ssize_t can_have_type(const op_t &op);
1999 inline static ssize_t get_stkvar_scale_factor();
2000 inline static ssize_t demangle_name(int32 *res, qstring *out, const char *name, uint32 disable_mask, /*demreq_type_t*/ int demreq);
2001 inline static ssize_t create_flat_group(ea_t image_base, int bitness, sel_t dataseg_sel);
2002 inline static ssize_t is_alloca_probe(ea_t ea);
2003 inline static ssize_t get_reg_name(qstring *buf, int reg, size_t width, int reghi);
2004 inline static ssize_t gen_asm_or_lst(bool starting, FILE *fp, bool is_asm, int flags, /*html_line_cb_t ** */ void *outline);
2005 inline static ssize_t gen_map_file(int *nlines, FILE *fp);
2006 inline static ssize_t get_autocmt(qstring *buf, const insn_t &insn);
2007 inline static ssize_t loader_elf_machine(linput_t *li, int machine_type, const char **p_procname, proc_def_t **p_pd, elf_loader_t *ldr, reader_t *reader);
2008 inline static ssize_t is_indirect_jump(const insn_t &insn);
2009 inline static ssize_t verify_noreturn(func_t *pfn);
2010 inline static ssize_t verify_sp(func_t *pfn);
2011 inline static ssize_t create_func_frame(func_t *pfn);
2012 inline static ssize_t get_frame_retsize(int *retsize, const func_t *pfn);
2013 inline static ssize_t analyze_prolog(ea_t fct_ea);
2014 inline static ssize_t calc_spdelta(sval_t *spdelta, const insn_t &ins);
2015 inline static ssize_t calcrel(bytevec_t *out_relbits, size_t *out_consumed, ea_t ea);
2016 inline static ssize_t get_reg_accesses(reg_accesses_t *accvec, const insn_t &insn, int flags);
2017 inline static ssize_t is_control_flow_guard(int *p_reg, const insn_t *insn);
2018 inline static ssize_t find_reg_value(uval_t *out, const insn_t &insn, int reg);
2019 inline static ssize_t find_op_value(uval_t *out, const insn_t &insn, int op);
2020 inline static ssize_t treat_hindering_item(ea_t hindering_item_ea, flags64_t new_item_flags, ea_t new_item_ea, asize_t new_item_length);
2021 inline static ssize_t extract_address(ea_t *out_ea, ea_t screen_ea, const char *string, size_t x);
2022 inline static ssize_t str2reg(const char *regname);
2023 inline static ssize_t is_switch(switch_info_t *si, const insn_t &insn);
2024 inline static ssize_t create_switch_xrefs(ea_t jumpea, const switch_info_t &si);
2025 inline static ssize_t calc_switch_cases(/*casevec_t * */void *casevec, eavec_t *targets, ea_t insn_ea, const switch_info_t &si);
2026 inline static ssize_t get_bg_color(bgcolor_t *color, ea_t ea);
2027 inline static ssize_t validate_flirt_func(ea_t start_ea, const char *funcname);
2028 inline static ssize_t get_operand_string(qstring *buf, const insn_t &insn, int opnum);
2029 inline static ssize_t add_cref(ea_t from, ea_t to, cref_t type);
2030 inline static ssize_t add_dref(ea_t from, ea_t to, dref_t type);
2031 inline static ssize_t del_cref(ea_t from, ea_t to, bool expand);
2032 inline static ssize_t del_dref(ea_t from, ea_t to);
2033 inline static ssize_t coagulate_dref(ea_t from, ea_t to, bool may_define, ea_t *code_ea);
2034 inline static const char *set_idp_options(const char *keyword, int vtype, const void *value, bool idb_loaded = true);
2035 inline static ssize_t set_proc_options(const char *options, int confidence);
2036 inline static ssize_t adjust_libfunc_ea(const idasgn_t &sig, const libfunc_t &libfun, ea_t *ea);
2037 inline static fpvalue_error_t realcvt(void *m, fpvalue_t *e, uint16 swt);
2038 inline bool delay_slot_insn(ea_t *ea, bool *bexec, bool *fexec);
2039 inline static ssize_t adjust_refinfo(refinfo_t *ri, ea_t ea, int n, const fixup_data_t &fd);
2040 inline static ssize_t is_cond_insn(const insn_t &insn);
2041 inline static ssize_t set_code16_mode(ea_t ea, bool code16 = true);
2042 inline static bool get_code16_mode(ea_t ea);
2043 inline static ssize_t next_exec_insn(ea_t *target, ea_t ea, int tid, regval_getter_t *_getreg, const regval_t &regvalues);
2044 inline static ssize_t calc_step_over(ea_t *target, ea_t ip);
2045 inline static ssize_t get_macro_insn_head(ea_t *head, ea_t ip);
2046 inline static ssize_t get_dbr_opnum(int *opnum, const insn_t &insn);
2047 inline static ssize_t insn_reads_tbit(const insn_t &insn, regval_getter_t *_getreg, const regval_t &regvalues);
2048 inline static ssize_t get_idd_opinfo(idd_opinfo_t *opinf, ea_t ea, int n, int thread_id, regval_getter_t *_getreg, const regval_t &regvalues);
2049 inline static ssize_t calc_next_eas(eavec_t *res, const insn_t &insn, bool over);
2050 inline static ssize_t clean_tbit(ea_t ea, regval_getter_t *_getreg, const regval_t &regvalues);
2051 inline static const char *get_reg_info(const char *regname, bitrange_t *bitrange);
2052 inline static ssize_t update_call_stack(call_stack_t *stack, int tid, regval_getter_t *_getreg, const regval_t &regvalues);
2053 inline static ssize_t setup_til();
2054 inline static ssize_t max_ptr_size();
2055 inline static ssize_t calc_cdecl_purged_bytes(ea_t ea);
2056 inline static ssize_t equal_reglocs(const argloc_t &a1, const argloc_t &a2);
2057 inline static ssize_t _decorate_name(qstring *outbuf, const char *name, bool mangle, callcnv_t cc, const tinfo_t &type);
2058 inline static ssize_t _calc_retloc(argloc_t *retloc, const tinfo_t &rettype, callcnv_t cc);
2059 inline static ssize_t _calc_varglocs(func_type_data_t *ftd, regobjs_t *regs, relobj_t *stkargs, int nfixed);
2060 inline static ssize_t _calc_arglocs(func_type_data_t *fti);
2061 inline static ssize_t use_stkarg_type(ea_t ea, const funcarg_t &arg);
2062 inline static ssize_t get_stkarg_parts(const insn_t &insn, stkarg_part_t *parts, int max_parts);
2063 inline static ssize_t use_regarg_type(int *idx, ea_t ea, /*const funcargvec_t * */void *rargs);
2064 inline static ssize_t use_arg_types(ea_t ea, func_type_data_t *fti, /*funcargvec_t * */void *rargs);
2065 inline static ssize_t calc_purged_bytes(int *p_purged_bytes, const func_type_data_t &fti);
2066 inline static ssize_t get_cc_regs(callregs_t *regs, callcnv_t cc);
2067 inline static ssize_t get_simd_types(simd_info_vec_t *out, const simd_info_t *simd_attrs, const argloc_t *argloc, bool create_tifs, const insn_t *insn=nullptr, const op_t *op=nullptr);
2068 inline static ssize_t arg_addrs_ready(ea_t caller, int n, const tinfo_t &tif, ea_t *addrs);
2069 inline static ssize_t adjust_argloc(argloc_t *argloc, const tinfo_t *type, int size);
2070 inline static ssize_t lower_func_type(intvec_t *argnums, func_type_data_t *fti);
2071 inline static ssize_t get_abi_info(qstrvec_t *abi_names, qstrvec_t *abi_opts, comp_t comp);
2072 inline static ssize_t arch_changed();
2073 inline static ssize_t create_merge_handlers(merge_data_t *md);
2074 inline ssize_t privrange_changed(const range_t &old_privrange, adiff_t delta, qstring *errbuf=nullptr);
2075 inline ssize_t cvt64_supval(nodeidx_t node, uchar tag, nodeidx_t idx, const uchar *data, size_t datlen, qstring *errbuf = nullptr);
2076 inline ssize_t cvt64_hashval(nodeidx_t node, uchar tag, const char *name, const uchar *data, size_t datlen, qstring *errbuf = nullptr);
2077 inline static reg_finder_t *get_regfinder();
2078 inline static ssize_t query_unmapped_address(unmapped_info_t *out, ea_t ea);
2079 inline static ssize_t load_unmapped_address(ea_t ea);
2080
2085 {
2086 if ( (flag & PR_SCALE_STKVARS) == 0 )
2087 return 1;
2089 if ( scale == 0 )
2090 error("Request ph.get_stkvar_scale_factor should be implemented");
2091 else if ( scale <= 0 )
2092 error("Invalid return code from ph.get_stkvar_scale_factor request");
2093 return scale;
2094 }
2095
2096 // Processor register information:
2097 const char *const *reg_names;
2099
2108
2117
2118
2137
2142
2145 bool is_canon_insn(uint16 itype) const { return itype >= instruc_start && itype < instruc_end; }
2146
2148
2150 const char *get_canon_mnem(uint16 itype) const
2151 {
2152 return is_canon_insn(itype) ? instruc[itype-instruc_start].name : nullptr;
2153 }
2154
2157 {
2158 return is_canon_insn(itype) ? instruc[itype-instruc_start].feature : 0;
2159 }
2160
2161
2165
2176 char real_width[4];
2177
2180
2183
2184 inline void ensure_processor(void);
2185 inline size_t sizeof_ldbl() const;
2186 inline bool is_funcarg_off(const func_t *pfn, uval_t frameoff) const;
2187 inline bool is_funcarg_off_ea(ea_t func_ea, uval_t frameoff) const;
2188 inline sval_t lvar_off(const func_t *pfn, uval_t frameoff) const;
2189 inline sval_t lvar_off_ea(ea_t func_ea, uval_t frameoff) const;
2190 inline bool is_lumina_usable() const;
2191};
2192#ifndef __X86__
2193CASSERT(sizeof(processor_t) == 144);
2194#else
2195CASSERT(sizeof(processor_t) == 104);
2196#endif
2197
2198// The following two structures contain information about the current
2199// processor and assembler.
2200
2201idaman processor_t *ida_export get_ph();
2202#define PH (*get_ph())
2203idaman asm_t *ida_export get_ash();
2204#define ASH (*get_ash())
2205idaman ea_helper_t *ida_export get_eah();
2206#define EAH (*get_eah())
2207
2210typedef void *hexdsp_t(int code, ...);
2211idaman hexdsp_t *ida_export get_hexdsp();
2212#ifndef HEXDSP
2213 #define HEXDSP get_hexdsp()
2214#endif
2215
2216
2217#ifndef SWIG
2218// ignore_micro manager: can be used in modules/plugins as a base class
2220{
2221 //--------------------------------------------------------------------------
2226
2227#define IM_NONE 0 // regular instruction
2228#define IM_PROLOG 1 // prolog instruction
2229#define IM_EPILOG 2 // epilog instruction
2230#define IM_SWITCH 3 // switch instruction (the indirect jump should not be marked)
2231
2232 inline void init_ignore_micro(void) { ignore_micro.create("$ ignore micro"); }
2233 inline void term_ignore_micro(void) { ignore_micro = BADNODE; }
2234 inline char get_ignore_micro(ea_t ea) const { return ignore_micro.charval_ea(ea, 0); }
2235 inline void set_ignore_micro(ea_t ea, uchar im_type) { ignore_micro.charset_ea(ea, im_type, 0); }
2236 inline void clr_ignore_micro(ea_t ea) { ignore_micro.chardel_ea(ea, 0); }
2237 inline ea_t next_marked_insn(ea_t ea) { return node2ea(ignore_micro.charnext(ea2node(ea), 0)); }
2238 inline void mark_prolog_insn(ea_t ea) { set_ignore_micro(ea, IM_PROLOG); }
2239 inline void mark_epilog_insn(ea_t ea) { set_ignore_micro(ea, IM_EPILOG); }
2240 inline void mark_switch_insn(ea_t ea) { set_ignore_micro(ea, IM_SWITCH); }
2241 inline bool is_prolog_insn(ea_t ea) const { return get_ignore_micro(ea) == IM_PROLOG; }
2242 inline bool is_epilog_insn(ea_t ea) const { return get_ignore_micro(ea) == IM_EPILOG; }
2243 inline bool is_switch_insn(ea_t ea) const { return get_ignore_micro(ea) == IM_SWITCH; }
2244 inline bool should_ignore_micro(ea_t ea) const { return get_ignore_micro(ea) != IM_NONE; }
2246};
2247#endif // SWIG
2248
2250{
2254 size_t reserved[8] = { 0 };
2255 modctx_t() : ph(PH), ash(ASH), _eah(EAH) {}
2256#ifndef SWIG
2257 DEFINE_EA_HELPER_FUNCS(_eah)
2258#endif
2259 // this class is freed by IDA kernel on unload so must be allocated by it
2260 DEFINE_MEMORY_ALLOCATION_FUNCS()
2261};
2262
2263// Each processor module subclasses this class and reacts to HT_IDP events
2264struct procmod_t : public modctx_t, public event_listener_t, public ignore_micro_t
2265{
2266 size_t procmod_flags = 0;
2267
2269 procmod_t(const procmod_t &) = delete;
2270
2272 const op_t *make_op_reg(op_t *op, int reg, int8 dtype = -1) const
2273 {
2274 op->type = o_reg;
2275 op->reg = reg;
2276 op->dtype = calc_op_dtype(dtype);
2277 return op;
2278 }
2279 const op_t *make_op_imm(op_t *op, uval_t val, int8 dtype = -1) const
2280 {
2281 op->type = o_imm;
2282 op->value = val;
2283 op->dtype = calc_op_dtype(dtype);
2284 return op;
2285 }
2287 op_t *op,
2288 int base_reg,
2289 uval_t displ,
2290 int8 dtype = -1) const
2291 {
2292 op->type = o_displ;
2293 op->phrase = base_reg;
2294 op->addr = displ;
2295 op->dtype = calc_op_dtype(dtype);
2296 return op;
2297 }
2298
2300 op_t *op,
2301 int base_reg,
2302 int index_reg,
2303 int8 dtype = -1) const
2304 {
2305 op->type = o_phrase;
2306 op->phrase = base_reg;
2307 op->value = index_reg;
2308 op->dtype = calc_op_dtype(dtype);
2309 return op;
2310 }
2311
2312protected:
2314 {
2315 return dtype != -1 ? op_dtype_t(dtype)
2316 : eah().ea_size == 4 ? dt_dword
2317 : dt_qword;
2318 }
2319};
2320
2321
2322struct plugmod_t : public modctx_t
2323{
2324 size_t owner = 0; // internal info used by the kernel
2325
2327 virtual bool idaapi run(size_t arg) = 0;
2328
2331 hook_type_t hook_type,
2332 event_listener_t *cb,
2333 int hkcb_flags=0)
2334 {
2335 return ::hook_event_listener(hook_type, cb, this, hkcb_flags);
2336 }
2337
2339 virtual ~plugmod_t() {}
2340};
2341
2342inline ssize_t processor_t::init(const char *idp_modname)
2343{
2344 return notify(ev_init, idp_modname);
2345}
2347{
2348 return notify(ev_term);
2349}
2350inline ssize_t processor_t::newprc(int pnum, bool keep_cfg)
2351{
2352 return notify(ev_newprc, pnum, keep_cfg);
2353}
2355{
2356 return notify(ev_newasm, asmnum);
2357}
2359{
2360 return notify(ev_asm_installed, asmnum);
2361}
2362inline ssize_t processor_t::get_reg_accesses(reg_accesses_t *accvec, const insn_t &insn, int flags)
2363{
2364 return notify(ev_get_reg_accesses, accvec, &insn, flags);
2365}
2366inline ssize_t processor_t::is_control_flow_guard(int *p_reg, const insn_t *insn)
2367{
2368 return processor_t::notify(ev_is_control_flow_guard, p_reg, insn);
2369}
2370inline ssize_t processor_t::newfile(const char *fname)
2371{
2372 return notify(ev_newfile, fname);
2373}
2374inline ssize_t processor_t::oldfile(const char *fname)
2375{
2376 return notify(ev_oldfile, fname);
2377}
2378inline ssize_t processor_t::newbinary(const char *filename, qoff64_t fileoff, ea_t basepara, ea_t binoff, uint64 nbytes)
2379{
2380 return notify(ev_newbinary, filename, fileoff, basepara, binoff, nbytes);
2381}
2383{
2384 return notify(ev_endbinary, ok);
2385}
2387{
2388 return notify(ev_creating_segm, seg);
2389}
2390inline ssize_t processor_t::assemble(uchar *_bin, ea_t ea, ea_t cs, ea_t ip, bool _use32, const char *line)
2391{
2392 return notify(ev_assemble, _bin, ea, cs, ip, _use32, line, _bin);
2393}
2395{
2396 return notify(ev_ana_insn, out);
2397}
2398inline ssize_t processor_t::emu_insn(const insn_t &insn)
2399{
2400 return notify(ev_emu_insn, &insn);
2401}
2403{
2404 return notify(ev_out_header, &ctx);
2405}
2407{
2408 return notify(ev_out_footer, &ctx);
2409}
2411{
2412 return notify(ev_out_segstart, &ctx, seg);
2413}
2415{
2416 return notify(ev_out_segend, &ctx, seg);
2417}
2419{
2420 return notify(ev_out_assumes, &ctx);
2421}
2423{
2424 return notify(ev_out_insn, &ctx);
2425}
2427{
2428 return notify(ev_out_mnem, &ctx);
2429}
2431{
2432 return notify(ev_out_operand, &ctx, &op);
2433}
2434inline ssize_t processor_t::out_data(outctx_t &ctx, bool analyze_only)
2435{
2436 return notify(ev_out_data, &ctx, analyze_only);
2437}
2438inline ssize_t processor_t::out_label(outctx_t &ctx, const char *colored_name)
2439{
2440 return notify(ev_out_label, &ctx, colored_name);
2441}
2446inline ssize_t processor_t::gen_stkvar_def(outctx_t &ctx, const struct udm_t *stkvar, sval_t v, tid_t tid)
2447{
2448 return notify(ev_gen_stkvar_def, &ctx, stkvar, v, tid);
2449}
2451{
2452 return notify(ev_gen_regvar_def, &ctx, v);
2453}
2454inline ssize_t processor_t::gen_src_file_lnnum(outctx_t &ctx, const char *file, size_t lnnum)
2455{
2456 return notify(ev_gen_src_file_lnnum, &ctx, file, lnnum);
2457}
2458inline ssize_t processor_t::rename(ea_t ea, const char *new_name, int flags)
2459{
2460 return notify(ev_rename, ea, new_name, flags);
2461}
2463{
2464 return notify(ev_sanitize_name, name, cc);
2465}
2467{
2468 return notify(ev_is_outlined_function, func_ea);
2469}
2471{
2472 return notify(ev_may_show_sreg, current_ea);
2473}
2475{
2476 return notify(ev_coagulate, start_ea);
2477}
2478inline void processor_t::auto_queue_empty(/*atype_t*/ int type)
2479{
2481}
2482inline ssize_t processor_t::func_bounds(int *possible_return_code, func_t *pfn, ea_t max_func_end_ea)
2483{
2484 return notify(ev_func_bounds, possible_return_code, pfn, max_func_end_ea);
2485}
2486inline ssize_t processor_t::may_be_func(const insn_t &insn, int state)
2487{
2488 return notify(ev_may_be_func, &insn, state);
2489}
2490inline ssize_t processor_t::is_sane_insn(const insn_t &insn, int no_crefs)
2491{
2492 return notify(ev_is_sane_insn, &insn, no_crefs);
2493}
2494inline ssize_t processor_t::cmp_operands(const op_t &op1, const op_t &op2)
2495{
2496 return notify(ev_cmp_operands, &op1, &op2);
2497}
2498inline ssize_t processor_t::is_jump_func(func_t *pfn, ea_t *jump_target, ea_t *func_pointer)
2499{
2500 return notify(ev_is_jump_func, pfn, jump_target, func_pointer);
2501}
2502inline ssize_t processor_t::is_basic_block_end(const insn_t &insn, bool call_insn_stops_block)
2503{
2504 return notify(ev_is_basic_block_end, &insn, call_insn_stops_block);
2505}
2506inline ssize_t processor_t::getreg(uval_t *rv, int regnum)
2507{
2508 return notify(ev_getreg, rv, regnum);
2509}
2511{
2512 return notify(ev_undefine, ea);
2513}
2515{
2516 return notify(ev_moving_segm, seg, to, flags);
2517}
2518inline ssize_t processor_t::is_sp_based(const insn_t &insn, const op_t &x)
2519{
2520 int mode;
2521 int code = int(notify(ev_is_sp_based, &mode, &insn, &x));
2522 return code == 0 ? OP_SP_BASED : mode;
2523}
2525{
2526 return notify(ev_is_far_jump, icode);
2527}
2528inline ssize_t processor_t::is_call_insn(const insn_t &insn)
2529{
2530 return notify(ev_is_call_insn, &insn);
2531}
2532inline ssize_t processor_t::is_ret_insn(const insn_t &insn, uchar iri_flags)
2533{
2534 return notify(ev_is_ret_insn, &insn, iri_flags);
2535}
2537{
2538 return notify(ev_is_align_insn, ea);
2539}
2540inline ssize_t processor_t::is_addr_insn(int *type, const insn_t &insn)
2541{
2542 return notify(ev_is_addr_insn, type, &insn);
2543}
2545{
2546 return notify(ev_out_segment_start, &ctx, seg_start_ea);
2547}
2549{
2550 return notify(ev_out_segment_end, &ctx, seg_start_ea);
2551}
2552inline ssize_t processor_t::creating_segment(segment_info_t *si)
2553{
2554 return notify(ev_creating_segment, si);
2555}
2556inline ssize_t processor_t::moving_segment(ea_t seg_start_ea, ea_t to, int flags)
2557{
2558 return notify(ev_moving_segment, seg_start_ea, to, flags);
2559}
2560inline ssize_t processor_t::is_jump_function(func_entry_info_t *fi, ea_t *jump_target, ea_t *func_pointer)
2561{
2562 return notify(ev_is_jump_function, fi, jump_target, func_pointer);
2563}
2564inline ssize_t processor_t::function_bounds(int *possible_return_code, fchunk_info_t *fi, ea_t max_func_end_ea)
2565{
2566 return notify(ev_function_bounds, possible_return_code, fi, max_func_end_ea);
2567}
2569{
2570 return notify(ev_verify_function_sp, func_ea);
2571}
2577{
2578 return notify(ev_create_function_frame, func_ea);
2579}
2581{
2582 return notify(ev_get_function_retsize, retsize, func_ea);
2583}
2585{
2586 return notify(ev_out_function_header, &ctx, func_ea);
2587}
2589{
2590 return notify(ev_out_function_footer, &ctx, func_ea);
2591}
2593{
2595 return code != 0 ? code
2596 : op.type == o_void || op.type == o_reg ? -1
2597 : 1;
2598}
2603inline ssize_t processor_t::demangle_name(int32 *res, qstring *out, const char *name, uint32 disable_mask, /*demreq_type_t*/ int demreq)
2604{
2605 return notify(ev_demangle_name, res, out, name, disable_mask, demreq);
2606}
2607inline ssize_t processor_t::create_flat_group(ea_t image_base, int bitness, sel_t dataseg_sel)
2608{
2609 return notify(ev_create_flat_group, image_base, bitness, dataseg_sel);
2610}
2612{
2613 return notify(ev_is_alloca_probe, ea);
2614}
2615inline ssize_t processor_t::get_reg_name(qstring *buf, int reg, size_t width, int reghi)
2616{
2617 return notify(ev_get_reg_name, buf, reg, width, reghi);
2618}
2619inline ssize_t processor_t::gen_asm_or_lst(bool starting, FILE *fp, bool is_asm, int flags, /*html_line_cb_t ** */ void *outline)
2620{
2621 return notify(ev_gen_asm_or_lst, starting, fp, is_asm, flags, outline);
2622}
2623inline ssize_t processor_t::gen_map_file(int *nlines, FILE *fp)
2624{
2625 return notify(ev_gen_map_file, nlines, fp);
2626}
2627inline ssize_t processor_t::get_autocmt(qstring *buf, const insn_t &insn)
2628{
2629 return notify(ev_get_autocmt, buf, &insn);
2630}
2631inline ssize_t processor_t::loader_elf_machine(linput_t *li, int machine_type, const char **p_procname, proc_def_t **p_pd, elf_loader_t *ldr, reader_t *reader)
2632{
2633 return notify(ev_loader_elf_machine, li, machine_type, p_procname, p_pd, ldr, reader);
2634}
2635inline ssize_t processor_t::is_indirect_jump(const insn_t &insn)
2636{
2637 return notify(ev_is_indirect_jump, &insn);
2638}
2640{
2641 return notify(ev_verify_noreturn, pfn);
2642}
2644{
2645 return notify(ev_verify_sp, pfn);
2646}
2651inline ssize_t processor_t::get_frame_retsize(int *retsize, const func_t *pfn)
2652{
2653 return notify(ev_get_frame_retsize, retsize, pfn);
2654}
2656{
2657 return notify(ev_analyze_prolog, fct_ea);
2658}
2659inline ssize_t processor_t::calc_spdelta(sval_t *spdelta, const insn_t &insn)
2660{
2661 return notify(ev_calc_spdelta, spdelta, &insn);
2662}
2663inline ssize_t processor_t::calcrel(bytevec_t *out_relbits, size_t *out_consumed, ea_t ea)
2664{
2665 return notify(ev_calcrel, out_relbits, out_consumed, ea);
2666}
2667inline ssize_t processor_t::find_reg_value(uval_t *out, const insn_t &insn, int reg)
2668{
2669 return notify(ev_find_reg_value, out, &insn, reg);
2670}
2671inline ssize_t processor_t::find_op_value(uval_t *out, const insn_t &insn, int opn)
2672{
2673 return notify(ev_find_op_value, out, &insn, opn);
2674}
2675inline ssize_t processor_t::treat_hindering_item(ea_t hindering_item_ea, flags64_t new_item_flags, ea_t new_item_ea, asize_t new_item_length)
2676{
2677 return notify(ev_treat_hindering_item, hindering_item_ea, new_item_flags, new_item_ea, new_item_length);
2678}
2679inline ssize_t processor_t::extract_address(ea_t *out_ea, ea_t screen_ea, const char *string, size_t x)
2680{
2681 return notify(ev_extract_address, out_ea, screen_ea, string, x);
2682}
2683inline ssize_t processor_t::str2reg(const char *regname)
2684{
2685 return notify(ev_str2reg, regname);
2686}
2687inline ssize_t processor_t::is_switch(switch_info_t *si, const insn_t &insn)
2688{
2689 return notify(ev_is_switch, si, &insn);
2690}
2692{
2693 return notify(ev_create_switch_xrefs, jumpea, &si);
2694}
2695inline ssize_t processor_t::calc_switch_cases(/*casevec_t * */void *casevec, eavec_t *targets, ea_t insn_ea, const switch_info_t &si)
2696{
2697 return notify(ev_calc_switch_cases, casevec, targets, insn_ea, &si);
2698}
2700{
2701 return notify(ev_get_bg_color, color, ea);
2702}
2703inline ssize_t processor_t::validate_flirt_func(ea_t start_ea, const char *funcname)
2704{
2705 return notify(ev_validate_flirt_func, start_ea, funcname);
2706}
2707inline ssize_t processor_t::get_operand_string(qstring *buf, const insn_t &insn, int opnum)
2708{
2709 return notify(ev_get_operand_string, buf, &insn, opnum);
2710}
2712{
2713 return notify(ev_add_cref, from, to, type);
2714}
2716{
2717 return notify(ev_add_dref, from, to, type);
2718}
2719inline ssize_t processor_t::del_cref(ea_t from, ea_t to, bool expand)
2720{
2721 return notify(ev_del_cref, from, to, expand);
2722}
2724{
2725 return notify(ev_del_dref, from, to);
2726}
2727inline ssize_t processor_t::coagulate_dref(ea_t from, ea_t to, bool may_define, ea_t *code_ea)
2728{
2729 return notify(ev_coagulate_dref, from, to, may_define, code_ea);
2730}
2731inline const char *processor_t::set_idp_options(const char *keyword, int vtype, const void *value, bool idb_loaded)
2732{
2733 const char *errmsg = IDPOPT_BADKEY;
2734 int code = int(notify(ev_set_idp_options, keyword, vtype, value, &errmsg, idb_loaded));
2735 return code == 1 ? IDPOPT_OK : code == 0 ? IDPOPT_BADKEY : errmsg;
2736}
2737inline ssize_t processor_t::set_proc_options(const char *options, int confidence)
2738{
2739 return notify(ev_set_proc_options, options, confidence);
2740}
2741inline ssize_t processor_t::adjust_libfunc_ea(const idasgn_t &sig, const libfunc_t &libfun, ea_t *ea)
2742{
2743 return notify(ev_adjust_libfunc_ea, &sig, &libfun, ea);
2744}
2746{
2747 return (fpvalue_error_t)notify(ev_realcvt, m, e, swt);
2748}
2750{
2751 return notify(ev_adjust_refinfo, ri, ea, n, &fd);
2752}
2753inline ssize_t processor_t::is_cond_insn(const insn_t &insn)
2754{
2755 return notify(ev_is_cond_insn, &insn);
2756}
2758{
2759 return notify(ev_set_code16_mode, ea, code16);
2760}
2762{
2763 return notify(ev_get_code16_mode, ea) == 1;
2764}
2765inline ssize_t processor_t::next_exec_insn(ea_t *target, ea_t ea, int tid, regval_getter_t *_getreg, const regval_t &regvalues)
2766{
2767 return notify(ev_next_exec_insn, target, ea, tid, _getreg, &regvalues);
2768}
2770{
2771 return notify(ev_calc_step_over, target, ip);
2772}
2774{
2775 return notify(ev_get_macro_insn_head, head, ip);
2776}
2777inline ssize_t processor_t::get_dbr_opnum(int *opnum, const insn_t &insn)
2778{
2779 return notify(ev_get_dbr_opnum, opnum, &insn);
2780}
2781inline ssize_t processor_t::insn_reads_tbit(const insn_t &insn, regval_getter_t *_getreg, const regval_t &regvalues)
2782{
2783 return notify(ev_insn_reads_tbit, &insn, _getreg, &regvalues);
2784}
2785inline ssize_t processor_t::get_idd_opinfo(idd_opinfo_t *opinf, ea_t ea, int n, int thread_id, regval_getter_t *_getreg, const regval_t &regvalues)
2786{
2787 return notify(ev_get_idd_opinfo, opinf, ea, n, thread_id, _getreg, &regvalues);
2788}
2789inline ssize_t processor_t::update_call_stack(call_stack_t *stack, int thread_id, regval_getter_t *_getreg, const regval_t &regvalues)
2790{
2791 return notify(ev_update_call_stack, stack, thread_id, _getreg, &regvalues);
2792}
2793inline ssize_t processor_t::calc_next_eas(eavec_t *res, const insn_t &insn, bool over)
2794{
2795 return notify(ev_calc_next_eas, res, &insn, over);
2796}
2797inline ssize_t processor_t::clean_tbit(ea_t ea, regval_getter_t *_getreg, const regval_t &regvalues)
2798{
2799 return notify(ev_clean_tbit, ea, _getreg, &regvalues);
2800}
2802{
2803 return notify(ev_setup_til);
2804}
2806{
2808 if ( code == 0 )
2809 code = 4;
2810 return code;
2811}
2816// Use global calc_retloc() instead of this:
2818{
2819 return notify(ev_calc_retloc, retloc, &rettype, cc);
2820}
2821// Use global calc_varglocs() instead of this:
2823{
2824 return notify(ev_calc_varglocs, ftd, regs, stkargs, nfixed);
2825}
2826// Use global calc_arglocs() instead of this:
2832{
2833 return notify(ev_use_stkarg_type, ea, &arg);
2834}
2835inline ssize_t processor_t::get_stkarg_parts(const insn_t &insn, stkarg_part_t *parts, int max_parts)
2836{
2837 return notify(ev_get_stkarg_parts, &insn, parts, max_parts);
2838}
2839inline ssize_t processor_t::use_regarg_type(int *idx, ea_t ea, /*const funcargvec_t * */void *rargs)
2840{
2841 return notify(ev_use_regarg_type, idx, ea, rargs);
2842}
2843inline ssize_t processor_t::use_arg_types(ea_t ea, func_type_data_t *fti, /*funcargvec_t * */void *rargs)
2844{
2845 return notify(ev_use_arg_types, ea, fti, rargs);
2846}
2847inline ssize_t processor_t::calc_purged_bytes(int *p_purged_bytes, const func_type_data_t &fti)
2848{
2849 return notify(ev_calc_purged_bytes, p_purged_bytes, &fti);
2850}
2852{
2853 return notify(ev_get_cc_regs, regs, cc);
2854}
2855inline ssize_t processor_t::get_simd_types(simd_info_vec_t *out, const simd_info_t *simd_attrs, const argloc_t *argloc, bool create_tifs, const insn_t *insn, const op_t *op)
2856{
2857 return notify(ev_get_simd_types, out, simd_attrs, argloc, create_tifs, insn, op);
2858}
2859inline ssize_t processor_t::arg_addrs_ready(ea_t caller, int n, const tinfo_t &tif, ea_t *addrs)
2860{
2861 return notify(ev_arg_addrs_ready, caller, n, &tif, addrs);
2862}
2864{
2865 return notify(ev_adjust_argloc, argloc, type, size);
2866}
2868{
2869 return notify(ev_lower_func_type, argnums, fti);
2870}
2872{
2873 return notify(ev_get_abi_info, abi_names, abi_opts, comp);
2874}
2876{
2877 return notify(ev_arch_changed);
2878}
2883inline ssize_t processor_t::privrange_changed(const range_t &old_privrange, adiff_t delta, qstring *errbuf)
2884{
2885 return notify(ev_privrange_changed, &old_privrange, delta, errbuf);
2886}
2887inline ssize_t processor_t::cvt64_supval(nodeidx_t node, uchar tag, nodeidx_t idx, const uchar *data, size_t datlen, qstring *errbuf)
2888{
2889 return notify(ev_cvt64_supval, node, tag, idx, data, datlen, errbuf);
2890}
2891inline ssize_t processor_t::cvt64_hashval(nodeidx_t node, uchar tag, const char *name, const uchar *data, size_t datlen, qstring *errbuf)
2892{
2893 return notify(ev_cvt64_hashval, node, tag, name, data, datlen, errbuf);
2894}
2896{
2897 return reinterpret_cast<reg_finder_t *>(notify(ev_get_regfinder));
2898}
2907
2908idaman int ida_export str2reg(const char *p);
2909
2910
2913
2914idaman int ida_export is_align_insn(ea_t ea);
2915
2916
2926
2927idaman ssize_t ida_export get_reg_name(qstring *buf, int reg, size_t width, int reghi = -1);
2928
2929
2933
2934inline const char *processor_t::get_reg_info(const char *regname, bitrange_t *bitrange)
2935{
2936 const char *r2;
2937 int code = int(notify(ev_get_reg_info, &r2, bitrange, regname));
2938 if ( code == 0 ) // not implemented?
2939 {
2940 if ( ::str2reg(regname) != -1 )
2941 {
2942 if ( bitrange != nullptr )
2943 bitrange->reset();
2944 return regname;
2945 }
2946 return nullptr;
2947 }
2948 return code == 1 ? r2 : nullptr;
2949}
2950
2953{
2954 int reg;
2955 int size;
2957 {
2958 if ( reg != r.reg )
2959 return reg > r.reg ? 1 : -1;
2960 if ( size != r.size )
2961 return size > r.size ? 1 : -1;
2962 return 0;
2963 }
2964};
2967
2968
2973
2974idaman bool ida_export parse_reg_name(reg_info_t *ri, const char *regname);
2975
2976
2978enum access_type_t ENUM_SIZE(uchar)
2979{
2980 NO_ACCESS = 0,
2981 WRITE_ACCESS = 1,
2982 READ_ACCESS = 2,
2983 RW_ACCESS = WRITE_ACCESS | READ_ACCESS,
2984};
2985
2988{
2989 int regnum = 0;
2991 access_type_t access_type = NO_ACCESS;
2993
2994 bool have_common_bits(const reg_access_t &r) const
2995 {
2996 return regnum == r.regnum && range.has_common(r.range);
2997 }
2998
2999 bool operator==(const reg_access_t &r) const
3000 {
3001 return regnum == r.regnum
3002 && range == r.range
3003 && access_type == r.access_type
3004 && opnum == r.opnum;
3005 }
3006
3007 bool operator!=(const reg_access_t &r) const
3008 {
3009 return !(*this == r);
3010 }
3011};
3014
3016
3017
3018inline bool insn_t::is_canon_insn(const processor_t &_ph) const // see ::insn_t in ua.hpp
3019{
3020 return _ph.is_canon_insn(itype);
3021}
3022
3023inline const char *insn_t::get_canon_mnem(const processor_t &_ph) const // see ::insn_t in ua.hpp
3024{
3025 return _ph.get_canon_mnem(itype);
3026}
3027
3028inline uint32 insn_t::get_canon_feature(const processor_t &_ph) const // ::insn_t in ua.hpp
3029{
3030 return _ph.get_canon_feature(itype);
3031}
3032
3033
3035inline size_t processor_t::sizeof_ldbl() const
3036{
3038}
3039
3052
3058
3059idaman bool ida_export set_processor_type(
3060 const char *procname,
3061 setproc_level_t level);
3062
3063
3071
3072idaman char *ida_export get_idp_name(char *buf, size_t bufsize);
3073
3074
3078
3079idaman bool ida_export set_target_assembler(int asmnum);
3080
3081
3083inline bool processor_t::delay_slot_insn(ea_t *ea, bool *bexec, bool *fexec)
3084{
3085 bool ok = (flag & PR_DELAYED) != 0;
3086 if ( ok )
3087 {
3088 bool be = true;
3089 bool fe = true;
3090 ok = notify(ev_delay_slot_insn, ea, &be, &fe) == 1;
3091 if ( ok )
3092 {
3093 if ( bexec != nullptr )
3094 *bexec = be;
3095 if ( fexec != nullptr )
3096 *fexec = fe;
3097 }
3098 }
3099 return ok;
3100}
3101
3114
3120namespace idb_event
3121{
3122 //<hookgen IDB>
3123
3126 {
3128
3130
3134
3140
3143
3146
3154
3159
3162
3168
3172
3176
3181
3186
3197
3205
3210
3217
3227
3237
3246
3254
3260
3267
3272
3276
3280
3285
3290
3294 //
3299
3303
3308
3313
3318
3324
3328
3332
3337
3340 //
3348
3351
3357
3362
3369
3373
3381
3392
3397
3402
3406
3413
3418
3422
3425
3429
3433
3438
3443
3448
3452
3456
3461
3466
3471
3476
3483
3488
3492
3496
3501
3506
3512
3517
3522
3526
3531
3536
3542
3547
3553
3561
3564
3572
3580
3587
3593
3598
3601
3604
3608
3612
3615
3619
3623
3627
3633
3636
3640
3643
3646
3652 };
3653}
3654
3655
3657
3659{
3660 if ( errorexit )
3661 return;
3662 va_list va;
3663 va_start(va, code);
3665 va_end(va);
3666}
3667
3669{
3670 qstring curproc = inf_get_procname();
3671 for ( size_t i = 0; psnames[i] != nullptr; ++i )
3672 {
3673 const char *p = psnames[i];
3674 if ( p[0] == '-' ) // obsolete processor names start with a '-'
3675 ++p;
3676 if ( curproc == p )
3677 return int(i);
3678 }
3679 // should not reach here
3680 INTERR(10336);
3681}
3682
3687
3694
3695idaman void *ida_export set_module_data(int *data_id, void *data_ptr);
3696
3697
3703
3704idaman void *ida_export clr_module_data(int data_id);
3705
3706
3707
3711
3712idaman void *ida_export get_module_data(int data_id);
3713
3714// Convenience macros to handle the module data.
3715// They assume the existence of a global variable "int data_id"
3716#define SET_MODULE_DATA(type) (type *)set_module_data(&data_id, new type)
3717#define GET_MODULE_DATA(type) ((type *)get_module_data(data_id))
3718
3719
3720#endif // _IDP_HPP
Definition of the bitrange_t class.
Describes an argument location.
Definition typeinf.hpp:1105
This class manages the offset and size of a value that occupies a number of contiguous bits within so...
Definition bitrange.hpp:16
void reset()
Make the bitrange empty.
Definition bitrange.hpp:126
Vector of bytes (use for dynamic memory)
Definition pro.h:3850
Register allocation calling convention.
Definition typeinf.hpp:1743
Describes a function chunk (entry or tail).
Definition funcs.hpp:1535
Describes a function entry chunk.
Definition funcs.hpp:1597
A function is a set of continuous ranges of addresses with characteristics.
Definition funcs.hpp:106
class to contain public info about the merge process
Definition merge.hpp:196
Definition of the IDA database node.
Definition netnode.hpp:241
Operand of an instruction.
Definition ua.hpp:170
uint16 reg
number of register (o_reg)
Definition ua.hpp:256
uint16 phrase
number of register phrase (o_phrase,o_displ).
Definition ua.hpp:257
uval_t value
operand value (o_imm) or outer displacement (o_displ+OF_OUTER_DISP).
Definition ua.hpp:270
optype_t type
Type of operand (see Operand types)
Definition ua.hpp:178
op_dtype_t dtype
Type of operand value (see Operand value types).
Definition ua.hpp:225
ea_t addr
virtual address pointed or used by the operand.
Definition ua.hpp:293
Definition gdl.hpp:474
Reimplementation of vector class from STL.
Definition pro.h:2262
Describes a program segment.
Definition segment.hpp:408
Primary mechanism for managing type information.
Definition typeinf.hpp:3077
System independent counterparts of FILE* related functions from Clib.
Routines for working with functions within the disassembled program.
bool is_funcarg_off_ea(ea_t func_ea, uval_t frameoff) const
Does the given offset lie within the arguments section?
Definition frame.hpp:829
sval_t lvar_off(const func_t *pfn, uval_t frameoff) const
Does the given offset lie within the local variables section?
Definition frame.hpp:891
bool is_funcarg_off(const func_t *pfn, uval_t frameoff) const
Does the given offset lie within the arguments section?
Definition frame.hpp:876
sval_t lvar_off_ea(ea_t func_ea, uval_t frameoff) const
Does the given offset lie within the local variables section?
Definition frame.hpp:843
const optype_t o_reg
General Register (al,ax,es,ds...).
Definition ua.hpp:83
const optype_t o_phrase
An indirect memory reference that uses a register: [reg] There can be several registers but no displa...
Definition ua.hpp:87
const optype_t o_displ
An indirect memory reference that uses a register and has an immediate constant added to it: [reg+N] ...
Definition ua.hpp:89
const optype_t o_imm
An immediate Value (constant).
Definition ua.hpp:92
const optype_t o_void
No Operand.
Definition ua.hpp:82
idaman THREAD_SAFE va_list va
See qsscanf()
Definition err.h:21
va_end(va)
THREAD_SAFE va_start(va, format)
int code
Definition fpro.h:88
idaman size_t n
Definition pro.h:1000
idaman uchar ida_export segtype(ea_t ea)
Get segment type.
cref_t
CODE xref types.
Definition xref.hpp:49
dref_t
DATA xref types.
Definition xref.hpp:67
int help_t
message id from ida.hlp
Definition help.h:11
void * hexdsp_t(int code,...)
Hex-Rays decompiler dispatcher.
Definition hexrays.hpp:8364
cexpr_t * e
Definition hexrays.hpp:7705
const tinfo_t & type
Definition hexrays.hpp:7698
qstring inf_get_procname()
Definition ida.hpp:1045
uint32 callcnv_t
Definition ida.hpp:75
hook_type_t
Types of events that be hooked to with hook_event_listener()
Definition ida.hpp:1301
@ HT_IDB
Hook to the database events.
Definition ida.hpp:1308
@ HT_IDP
Hook to the processor module.
Definition ida.hpp:1302
uchar inf_get_cc_size_ldbl()
Definition ida.hpp:1038
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
uchar comp_t
target compiler id
Definition ida.hpp:73
idaman ssize_t ida_export invoke_callbacks(hook_type_t hook_type, int notification_code, va_list va)
Generate event notification.
DECLARE_TYPE_AS_MOVABLE(unmapped_info_t)
idaman bool ida_export hook_event_listener(hook_type_t hook_type, event_listener_t *cb, const void *owner, int hkcb_flags=0)
Install an event listener.
idaman asm_t *ida_export get_ash()
void gen_idb_event(idb_event::event_code_t code,...)
the kernel will use this function to generate idb_events
Definition idp.hpp:3658
idaman int ida_export is_align_insn(ea_t ea)
If the instruction at 'ea' looks like an alignment instruction, return its length in bytes.
setproc_level_t
Flags passed as 'level' parameter to set_processor_type()
Definition idp.hpp:3042
@ SETPROC_LOADER
set processor type for new idb; if the user has specified a compatible processor, return success with...
Definition idp.hpp:3044
@ SETPROC_IDB
set processor type for old idb
Definition idp.hpp:3043
@ SETPROC_USER
set user-specified processor used for -p and manual processor change at later time
Definition idp.hpp:3049
@ SETPROC_LOADER_NON_FATAL
the same as SETPROC_LOADER but non-fatal failures.
Definition idp.hpp:3048
idaman bool ida_export unhook_event_listener(hook_type_t hook_type, event_listener_t *cb)
Uninstall an event listener.
qvector< reg_access_t > reg_access_vec_t
Definition idp.hpp:3013
qvector< reg_info_t > reginfovec_t
vector of register info objects
Definition idp.hpp:2966
idaman bool ida_export set_target_assembler(int asmnum)
Set target assembler.
idaman void *ida_export clr_module_data(int data_id)
Unregister pointer to database specific module data.
idaman bool ida_export set_processor_type(const char *procname, setproc_level_t level)
Set target processor type.
CASSERT(sizeof(asm_t)==416)
idaman ssize_t ida_export get_reg_name(qstring *buf, int reg, size_t width, int reghi=-1)
Get text representation of a register.
local_type_change_t
Definition idp.hpp:3103
@ LTC_EDITED
edited a local type
Definition idp.hpp:3107
@ LTC_TIL_LOADED
loaded a til file
Definition idp.hpp:3110
@ LTC_ALIASED
added a type alias
Definition idp.hpp:3108
@ LTC_ADDED
added a local type
Definition idp.hpp:3105
@ LTC_COMPILER
changed the compiler and calling convention
Definition idp.hpp:3109
@ LTC_TIL_UNLOADED
unloaded a til file
Definition idp.hpp:3111
@ LTC_TIL_COMPACTED
numbered types have been compacted compact_numbered_types()
Definition idp.hpp:3112
@ LTC_NONE
no event (internal use)
Definition idp.hpp:3104
@ LTC_DELETED
deleted a local type
Definition idp.hpp:3106
idaman hexdsp_t *ida_export get_hexdsp()
idaman char *ida_export get_idp_name(char *buf, size_t bufsize)
Get name of the current processor module.
enum access_type_t ENUM_SIZE(uchar)
Possible memory and register access types.
Definition idp.hpp:2978
idaman void *ida_export set_module_data(int *data_id, void *data_ptr)
Starting from IDA v7.5 all modules should use the following 3 functions to handle idb specific static...
idaman bool ida_export is_basic_block_end(const insn_t &insn, bool call_insn_stops_block)
Is the instruction the end of a basic block?
THREAD_SAFE bool has_cf_chg(uint32 feature, uint opnum)
Does an instruction with the specified feature modify the i-th operand?
Definition idp.hpp:112
idaman bool ida_export is_indirect_jump_insn(const insn_t &insn)
Is the instruction an indirect jump?
idaman int ida_export str2reg(const char *p)
Get any register number (-1 on error)
idaman bool ida_export has_insn_feature(uint16 icode, uint32 bit)
Does the specified instruction have the specified feature?
idaman void ida_export remove_event_listener(event_listener_t *cb)
remove all hooks in all databases for specified event_listener object
idaman void *ida_export get_module_data(int data_id)
Get pointer to the database specific module data.
idaman ea_helper_t *ida_export get_eah()
idaman bool ida_export is_call_insn(const insn_t &insn)
Is the instruction a "call"?
idaman bool ida_export is_ret_insn(const insn_t &insn, uchar flags=IRI_STRICT)
THREAD_SAFE bool has_cf_use(uint32 feature, uint opnum)
Does an instruction with the specified feature use a value of the i-th operand?
Definition idp.hpp:126
idaman processor_t *ida_export get_ph()
idaman bool ida_export parse_reg_name(reg_info_t *ri, const char *regname)
Get register info by name.
IEEE floating point functions.
fpvalue_error_t
Definition ieee.h:48
int nbytes
Definition kernwin.hpp:3037
bool ok
Definition kernwin.hpp:7410
uval_t uval_t
Definition kernwin.hpp:1926
idaman int ida_export_data errorexit
Exiting because of a fatal error?
Definition kernwin.hpp:7469
asize_t size
Definition kernwin.hpp:6701
unsigned __int64 uint64
Definition llong.hpp:13
qvector< qstring > qstrvec_t
Definition lumina.hpp:831
Definitions of various information kept in netnodes.
idaman nodeidx_t ida_export ea2node(ea_t ea)
Get netnode for the specified address.
idaman ea_t ida_export node2ea(nodeidx_t ndx)
IDB event group.
Definition idp.hpp:3121
event_code_t
IDB event codes.
Definition idp.hpp:3126
@ deleting_func
The kernel is about to delete a function.
Definition idp.hpp:3291
@ dirtree_rmdir
Dirtree: a directory has been deleted.
Definition idp.hpp:3430
@ tail_owner_changed
A tail chunk owner has been changed.
Definition idp.hpp:3319
@ bookmark_changed
Bookmarked position changed.
Definition idp.hpp:3407
@ dirtree_mkdir
Dirtree: a directory has been created.
Definition idp.hpp:3426
@ frame_udm_created
Frame member has been added.
Definition idp.hpp:3493
@ set_function_end
Function chunk end address will be changed.
Definition idp.hpp:3609
@ local_type_renamed
Local type has been renamed.
Definition idp.hpp:3543
@ callee_addr_changed
Callee address has been updated by the user.
Definition idp.hpp:3403
@ lt_edm_deleted
local type enum member has been deleted
Definition idp.hpp:3527
@ local_types_changed
Local types have been changed.
Definition idp.hpp:3457
@ changing_segment_end
Segment end address is to be changed.
Definition idp.hpp:3573
@ extlang_changed
The list of extlangs or the default extlang was changed.
Definition idp.hpp:3147
@ changing_segm_name
Segment name is being changed.
Definition idp.hpp:3238
@ segment_name_changed
Segment name has been changed.
Definition idp.hpp:3584
@ closebase
The database will be closed now.
Definition idp.hpp:3127
@ changing_op_type
An operand type (offset, hex, etc...) is to be changed.
Definition idp.hpp:3198
@ lt_udt_expanded
A structure type has been expanded/shrank.
Definition idp.hpp:3484
@ idasgn_loaded
FLIRT signature has been loaded for normal processing (not for recognition of startup sequences).
Definition idp.hpp:3155
@ changing_ti
An item typestring (c/c++ prototype) is to be changed.
Definition idp.hpp:3177
@ function_tail_appended
A function tail chunk has been appended.
Definition idp.hpp:3616
@ func_deleted
A function has been deleted.
Definition idp.hpp:3423
@ byte_patched
A byte has been patched.
Definition idp.hpp:3370
@ segm_name_changed
Segment name has been changed.
Definition idp.hpp:3242
@ deleting_function_tail
A function tail chunk is to be removed.
Definition idp.hpp:3620
@ lt_udm_created
local type udt member has been added
Definition idp.hpp:3462
@ lt_udm_renamed
local type udt member has been renamed
Definition idp.hpp:3472
@ frame_udm_deleted
Frame member has been deleted.
Definition idp.hpp:3497
@ function_tail_deleted
A function tail chunk has been removed.
Definition idp.hpp:3624
@ deleting_segm
A segment is to be deleted.
Definition idp.hpp:3211
@ segment_end_changed
Segment end address has been changed.
Definition idp.hpp:3577
@ item_color_changed
An item color has been changed.
Definition idp.hpp:3398
@ changing_segm_start
Segment start address is to be changed.
Definition idp.hpp:3218
@ lt_edm_renamed
local type enum member has been renamed
Definition idp.hpp:3532
@ tryblks_updated
Updated tryblk information.
Definition idp.hpp:3335
@ sgr_deleted
The kernel has deleted a segment register value.
Definition idp.hpp:3414
@ thunk_function_created
A thunk bit has been set for a function.
Definition idp.hpp:3641
@ changing_op_ti
An operand typestring (c/c++ prototype) is to be changed.
Definition idp.hpp:3187
@ lt_udm_deleted
local type udt member has been deleted
Definition idp.hpp:3467
@ range_cmt_changed
Range comment has been changed.
Definition idp.hpp:3387
@ segm_end_changed
Segment end address has been changed.
Definition idp.hpp:3233
@ segment_class_changed
Segment class has been changed.
Definition idp.hpp:3590
@ upgraded
The database has been upgraded and the receiver can upgrade its info as well.
Definition idp.hpp:3131
@ frame_udm_changed
Frame member has been changed.
Definition idp.hpp:3507
@ dirtree_move
Dirtree: a directory or item has been moved.
Definition idp.hpp:3439
@ func_noret_changed
FUNC_NORET bit has been changed.
Definition idp.hpp:3325
@ lt_udm_changed
local type udt member has been changed
Definition idp.hpp:3477
@ changing_cmt
An item comment is to be changed.
Definition idp.hpp:3374
@ determined_main
The main() function has been determined.
Definition idp.hpp:3144
@ make_code
An instruction is being created.
Definition idp.hpp:3349
@ func_added
The kernel has added a function.
Definition idp.hpp:3273
@ segm_deleted
A segment has been deleted.
Definition idp.hpp:3213
@ frame_deleted
The kernel has deleted a function frame.
Definition idp.hpp:3295
@ dirtree_rank
Dirtree: a directory or item rank has been changed.
Definition idp.hpp:3444
@ deleting_func_tail
A function tail chunk is to be removed.
Definition idp.hpp:3309
@ func_tail_appended
A function tail chunk has been appended.
Definition idp.hpp:3304
@ make_data
A data item is being created.
Definition idp.hpp:3352
@ changing_segment_name
Segment name is being changed.
Definition idp.hpp:3581
@ changing_segm_class
Segment class is being changed.
Definition idp.hpp:3247
@ segm_attrs_updated
Segment attributes has been changed.
Definition idp.hpp:3255
@ set_func_end
Function chunk end address will be changed.
Definition idp.hpp:3286
@ function_updated
The kernel has updated a function.
Definition idp.hpp:3602
@ segm_start_changed
Segment start address has been changed.
Definition idp.hpp:3223
@ function_added
The kernel has added a function.
Definition idp.hpp:3599
@ op_type_changed
An operand type (offset, hex, etc...) has been set or deleted.
Definition idp.hpp:3202
@ auto_empty_finally
Info: all analysis queues are empty definitively.
Definition idp.hpp:3141
@ allsegs_moved
Program rebasing is complete.
Definition idp.hpp:3268
@ segm_moved
Segment has been moved.
Definition idp.hpp:3261
@ stkpnts_changed
Stack change points have been modified.
Definition idp.hpp:3329
@ dirtree_link
Dirtree: an item has been linked/unlinked.
Definition idp.hpp:3434
@ segment_added
A new segment has been created.
Definition idp.hpp:3562
@ savebase
The database is being saved.
Definition idp.hpp:3129
@ dirtree_ordering_changed
Dirtree: a directory's "natural" ordering changed.
Definition idp.hpp:3548
@ set_func_start
Function chunk start address will be changed.
Definition idp.hpp:3281
@ frame_udm_renamed
Frame member has been renamed.
Definition idp.hpp:3502
@ func_tail_deleted
A function tail chunk has been removed.
Definition idp.hpp:3314
@ set_function_start
Function chunk start address will be changed.
Definition idp.hpp:3605
@ func_updated
The kernel has updated a function.
Definition idp.hpp:3277
@ compiler_changed
The kernel has changed the compiler information.
Definition idp.hpp:3173
@ changing_segment_start
Segment start address is to be changed.
Definition idp.hpp:3565
@ adding_segm
A segment is being created.
Definition idp.hpp:3419
@ sgr_changed
The kernel has changed a segment register value.
Definition idp.hpp:3341
@ kernel_config_loaded
This event is issued when ida.cfg is parsed.
Definition idp.hpp:3160
@ changing_segm_end
Segment end address is to be changed.
Definition idp.hpp:3228
@ dirtree_segm_moved
Dirtree: inodes were changed due to a segment movement or a program rebasing.
Definition idp.hpp:3453
@ dirtree_bulk_move
Dirtree: many items have been moved.
Definition idp.hpp:3554
@ updating_tryblks
About to update tryblk information.
Definition idp.hpp:3333
@ dirtree_rminode
Dirtree: an inode became unavailable.
Definition idp.hpp:3449
@ frame_expanded
A frame type has been expanded/shrank.
Definition idp.hpp:3513
@ deleting_function
The kernel is about to delete a function.
Definition idp.hpp:3613
@ segment_start_changed
Segment start address has been changed.
Definition idp.hpp:3569
@ changing_range_cmt
Range comment is to be changed.
Definition idp.hpp:3382
@ renamed
The kernel has renamed a byte.
Definition idp.hpp:3363
@ op_ti_changed
An operand typestring (c/c++ prototype) has been changed.
Definition idp.hpp:3192
@ segm_added
A new segment has been created.
Definition idp.hpp:3206
@ extra_cmt_changed
An extra comment has been changed.
Definition idp.hpp:3393
@ changing_segment_class
Segment class is being changed.
Definition idp.hpp:3588
@ cmt_changed
An item comment has been changed.
Definition idp.hpp:3378
@ auto_empty
Info: all analysis queues are empty.
Definition idp.hpp:3135
@ segment_attrs_updated
Segment attributes has been changed.
Definition idp.hpp:3594
@ frame_created
A function frame has been created.
Definition idp.hpp:3489
@ function_tail_owner_changed
A tail chunk owner has been changed.
Definition idp.hpp:3628
@ function_noret_changed
FUNC_NORET bit has been changed.
Definition idp.hpp:3634
@ idasgn_matched_ea
A FLIRT match has been found.
Definition idp.hpp:3518
@ lt_edm_changed
local type enum member has been changed
Definition idp.hpp:3537
@ moving_range_cmt
Range comment is to be moved.
Definition idp.hpp:3647
@ function_stkpnts_changed
Stack change points have been modified.
Definition idp.hpp:3637
@ ti_changed
An item typestring (c/c++ prototype) has been changed.
Definition idp.hpp:3182
@ destroyed_items
Instructions/data have been destroyed in [ea1,ea2).
Definition idp.hpp:3358
@ flow_chart_created
Gui has retrieved a function flow chart.
Definition idp.hpp:3169
@ loader_finished
External file loader finished its work.
Definition idp.hpp:3163
@ thunk_func_created
A thunk bit has been set for a function.
Definition idp.hpp:3300
@ segm_class_changed
Segment class has been changed.
Definition idp.hpp:3250
@ function_frame_deleted
The kernel has deleted a function frame.
Definition idp.hpp:3644
@ lt_edm_created
local type enum member has been added
Definition idp.hpp:3523
@ deleting_tryblks
About to delete tryblk information in given range.
Definition idp.hpp:3338
nodeidx64_t nodeidx_t
Definition netnode.hpp:114
unsigned short uint16
unsigned 16 bit value
Definition pro.h:350
unsigned int uint32
unsigned 32 bit value
Definition pro.h:352
qvector< int > intvec_t
vector of integers
Definition pro.h:2839
signed char sint8
signed 8 bit value
Definition pro.h:347
uint64 asize_t
Definition pro.h:427
uint32 bgcolor_t
background color in RGB
Definition pro.h:5109
uint8 op_dtype_t
Definition pro.h:464
adiff_t sval_t
signed value used by the processor.
Definition pro.h:450
int64 adiff_t
Definition pro.h:428
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
unsigned int uint
unsigned 32 bit value
Definition pro.h:343
qvector< ea_t > eavec_t
vector of addresses
Definition pro.h:2838
uint64 flags64_t
64-bit flags for each address
Definition pro.h:5106
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:385
ea_t tid_t
type id (for enums, structs, etc)
Definition pro.h:5107
char int8
signed 8 bit value
Definition pro.h:346
_qstring< char > qstring
regular string
Definition pro.h:3771
unsigned int
Definition pronet.h:99
Functions that deal with segments.
Describes the target assembler.
Definition idp.hpp:178
const char * a_comdef
"comm" (communal variable)
Definition idp.hpp:294
const char * a_oword
nullptr if not allowed
Definition idp.hpp:259
const char * a_align
"align" keyword
Definition idp.hpp:303
const char * cmnt
comment string (see also cmnt2)
Definition idp.hpp:247
const char * low8
low8 operation, should contain s for the operand
Definition idp.hpp:343
flags64_t ea_t ea_or_id
Definition idp.hpp:301
const char * a_sizeof_fmt
size of type (format string)
Definition idp.hpp:315
const char * a_yword
32-byte (256-bit) data; nullptr if not allowed requires AS2_YWORD
Definition idp.hpp:354
help_t help
Help screen number, 0 - no help.
Definition idp.hpp:242
const char * high8
high8
Definition idp.hpp:344
const char * a_equ
'equ' Used if AS_UNEQU is set
Definition idp.hpp:276
const char * end
end directive
Definition idp.hpp:246
void(idaapi *out_func_header)(outctx_t &ctx
Generate function header lines.
const char * a_bss
uninitialized data directive should include 's' for the size of data
Definition idp.hpp:273
const char * a_curip
current IP (instruction pointer) symbol in assembler
Definition idp.hpp:279
const char * esccodes
special chars that cannot appear as is in string and char literals
Definition idp.hpp:250
const char * a_double
double; 8bytes; nullptr if not allowed
Definition idp.hpp:261
const char * a_rva
'rva' keyword for image based offsets (see REFINFO_RVAOFF)
Definition idp.hpp:352
uint16 uflag
user defined flags (local only for IDP) you may define and use your own bits
Definition idp.hpp:239
const char * a_vstruc_fmt
if a named item is a structure and displayed in the verbose (multiline) form then display the name as...
Definition idp.hpp:348
func_t * void(idaapi *out_func_footer)(outctx_t &ctx
Generate function footer lines.
const char * a_dword
nullptr if not allowed
Definition idp.hpp:257
const char * cmnt2
comment close string (usually nullptr) this is used to denote a string which closes comments,...
Definition idp.hpp:338
const char * a_xor
^ bit xor assembler time operation
Definition idp.hpp:311
ssize_t(idaapi *get_type_name)(qstring *buf
Get name of type of item at ea or id.
const char * a_byte
byte directive
Definition idp.hpp:255
const char * a_word
word directive
Definition idp.hpp:256
uint32 flag2
Secondary assembler feature bits
Definition idp.hpp:317
const char * a_shl
<< shift left assembler time operation
Definition idp.hpp:313
const char * origin
org directive
Definition idp.hpp:245
func_t func_t *const char * a_public
"public" name keyword. nullptr-use default, ""-do not generate
Definition idp.hpp:291
const char * a_qword
nullptr if not allowed
Definition idp.hpp:258
const char * a_shr
Definition idp.hpp:314
const char * high16
high16
Definition idp.hpp:346
const char * a_mod
% mod assembler time operation
Definition idp.hpp:308
const char * a_float
float; 4bytes; nullptr if not allowed
Definition idp.hpp:260
const char * a_tbyte
long double; nullptr if not allowed
Definition idp.hpp:262
uint32 flag
Assembler feature bits
Definition idp.hpp:179
const char * a_weak
"weak" name keyword. nullptr-use default, ""-do not generate
Definition idp.hpp:292
const char * a_include_fmt
the include directive (format string)
Definition idp.hpp:347
const char * a_seg
'seg ' prefix (example: push seg seg001)
Definition idp.hpp:277
const char *const * header
array of automatically generated header lines they appear at the start of disassembled text
Definition idp.hpp:243
const char * a_packreal
packed decimal real nullptr if not allowed
Definition idp.hpp:263
char lbrace
left brace used in complex expressions
Definition idp.hpp:305
const char * a_band
& bit and assembler time operation
Definition idp.hpp:309
char ascsep
string literal delimiter
Definition idp.hpp:248
const char * name
Assembler name (displayed in menus)
Definition idp.hpp:241
const char * a_extrn
"extern" name keyword
Definition idp.hpp:293
const char * a_zword
64-byte (512-bit) data; nullptr if not allowed requires AS2_ZWORD
Definition idp.hpp:356
const char * low16
low16
Definition idp.hpp:345
const char * a_dups
array keyword.
Definition idp.hpp:264
char rbrace
right brace used in complex expressions
Definition idp.hpp:306
const char * a_ascii
string literal directive
Definition idp.hpp:254
const char * a_bnot
~ bit not assembler time operation
Definition idp.hpp:312
char accsep
char constant delimiter
Definition idp.hpp:249
const char * a_bor
| bit or assembler time operation
Definition idp.hpp:310
Structure used to describe byte streams (for "ret" instruction and empirics)
Definition idp.hpp:63
uchar len
Definition idp.hpp:64
const uchar * bytes
Definition idp.hpp:65
defined as struct so it can be forward-declared
Definition idd.hpp:751
helper class to support 32-bit addresses in ida64
Definition ida.hpp:1162
Definition idp.hpp:436
virtual ~event_listener_t()
Definition idp.hpp:441
size_t listener_flags
Definition idp.hpp:437
virtual ssize_t idaapi on_event(ssize_t code, va_list va)=0
Callback to handle events.
External language (to support third party language interpreters)
Definition expr.hpp:654
Definition fixup.hpp:84
Processor-independent representation of a floating point value.
Definition ieee.h:98
Function type information (see tinfo_t::get_func_details())
Definition typeinf.hpp:4829
Information about a single function argument.
Definition typeinf.hpp:4753
Instruction operand information.
Definition idd.hpp:725
Definition idp.hpp:2220
bool is_switch_insn(ea_t ea) const
Definition idp.hpp:2243
netnode ignore_micro
Definition idp.hpp:2225
void mark_epilog_insn(ea_t ea)
Definition idp.hpp:2239
void set_ignore_micro(ea_t ea, uchar im_type)
Definition idp.hpp:2235
bool should_ignore_micro(ea_t ea) const
Definition idp.hpp:2244
void term_ignore_micro(void)
Definition idp.hpp:2233
ea_t next_marked_insn(ea_t ea)
Definition idp.hpp:2237
void clr_ignore_micro(ea_t ea)
Definition idp.hpp:2236
char get_ignore_micro(ea_t ea) const
Definition idp.hpp:2234
void mark_prolog_insn(ea_t ea)
Definition idp.hpp:2238
bool is_prolog_insn(ea_t ea) const
Definition idp.hpp:2241
bool is_epilog_insn(ea_t ea) const
Definition idp.hpp:2242
void init_ignore_micro(void)
Definition idp.hpp:2232
void mark_switch_insn(ea_t ea)
Definition idp.hpp:2240
High 8 bits are reserved for processor-specific features.
Definition idp.hpp:104
uint32 feature
combination of Instruction feature bits
Definition idp.hpp:106
const char * name
instruction name
Definition idp.hpp:105
ea_helper_t & _eah
Definition idp.hpp:2253
processor_t & ph
Definition idp.hpp:2251
size_t reserved[8]
Definition idp.hpp:2254
modctx_t()
Definition idp.hpp:2255
asm_t & ash
Definition idp.hpp:2252
Definition ua.hpp:1119
Definition idp.hpp:2323
size_t owner
Definition idp.hpp:2324
virtual ~plugmod_t()
Virtual destructor.
Definition idp.hpp:2339
virtual bool idaapi run(size_t arg)=0
Invoke the plugin.
bool hook_event_listener(hook_type_t hook_type, event_listener_t *cb, int hkcb_flags=0)
Helper function to hook event listeners.
Definition idp.hpp:2330
Describes a processor module (IDP).
Definition idp.hpp:633
static ssize_t arch_changed()
Definition idp.hpp:2875
static ssize_t loader_elf_machine(linput_t *li, int machine_type, const char **p_procname, proc_def_t **p_pd, elf_loader_t *ldr, reader_t *reader)
Definition idp.hpp:2631
static const char * get_reg_info(const char *regname, bitrange_t *bitrange)
Get register information - useful for registers like al, ah, dil, etc.
Definition idp.hpp:2934
bool use64(void) const
PR_USE64
Definition idp.hpp:643
static ssize_t can_have_type(const op_t &op)
Definition idp.hpp:2592
static ssize_t use_stkarg_type(ea_t ea, const funcarg_t &arg)
Definition idp.hpp:2831
const char *const * reg_names
array of register names
Definition idp.hpp:2097
static ssize_t calc_spdelta(sval_t *spdelta, const insn_t &ins)
Definition idp.hpp:2659
static ssize_t assemble(uchar *_bin, ea_t ea, ea_t cs, ea_t ip, bool _use32, const char *line)
Definition idp.hpp:2390
int get_proc_index()
Definition idp.hpp:3668
bool is_lumina_usable() const
const asm_t *const * assemblers
pointer to array of target
Definition idp.hpp:691
uint32 get_canon_feature(uint16 itype) const
Get the instruction features (combination of Instruction feature bits)
Definition idp.hpp:2156
static ssize_t use_regarg_type(int *idx, ea_t ea, void *rargs)
Definition idp.hpp:2839
static ssize_t out_function_footer(outctx_t &ctx, ea_t func_ea)
Definition idp.hpp:2588
static ssize_t ana_insn(insn_t *out)
Definition idp.hpp:2394
static ssize_t get_operand_string(qstring *buf, const insn_t &insn, int opnum)
Definition idp.hpp:2707
static ssize_t undefine(ea_t ea)
Definition idp.hpp:2510
static ssize_t validate_flirt_func(ea_t start_ea, const char *funcname)
Definition idp.hpp:2703
static ssize_t _calc_varglocs(func_type_data_t *ftd, regobjs_t *regs, relobj_t *stkargs, int nfixed)
Definition idp.hpp:2822
static ssize_t clean_tbit(ea_t ea, regval_getter_t *_getreg, const regval_t &regvalues)
Definition idp.hpp:2797
size_t sizeof_ldbl() const
Get size of long double.
Definition idp.hpp:3035
static ssize_t out_insn(outctx_t &ctx)
Definition idp.hpp:2422
static ssize_t out_header(outctx_t &ctx)
Definition idp.hpp:2402
static ssize_t out_operand(outctx_t &ctx, const op_t &op)
Definition idp.hpp:2430
static ssize_t find_reg_value(uval_t *out, const insn_t &insn, int reg)
Definition idp.hpp:2667
static ssize_t set_code16_mode(ea_t ea, bool code16=true)
Definition idp.hpp:2757
event_t
Callback notification codes.
Definition idp.hpp:716
@ ev_get_stkarg_area_info
Get some metrics of the stack argument area.
Definition idp.hpp:1884
@ ev_coagulate_dref
Data reference is being analyzed.
Definition idp.hpp:1221
@ ev_next_exec_insn
Get next address to be executed This function must return the next address to be executed.
Definition idp.hpp:1598
@ ev_get_regfinder
Get pointer to the regfinder object.
Definition idp.hpp:1461
@ ev_calc_purged_bytes
Calculate number of purged bytes by the given function type.
Definition idp.hpp:1758
@ ev_get_procmod
Get pointer to the processor module object.
Definition idp.hpp:1393
@ ev_find_reg_value
Find register value via a register tracker.
Definition idp.hpp:1356
@ ev_endbinary
IDA has loaded a binary file.
Definition idp.hpp:746
@ ev_coagulate
Try to define some unexplored bytes.
Definition idp.hpp:890
@ ev_gen_src_file_lnnum
Callback: generate analog of:
Definition idp.hpp:865
@ ev_auto_queue_empty
One analysis queue is empty.
Definition idp.hpp:1256
@ ev_calc_retloc
Calculate return value location.
Definition idp.hpp:1764
@ ev_get_bg_color
Get item background color.
Definition idp.hpp:1117
@ ev_get_autocmt
Callback: get dynamic auto comment.
Definition idp.hpp:1107
@ ev_ana_insn
Analyze one instruction and fill 'out' structure.
Definition idp.hpp:771
@ ev_is_indirect_jump
Determine if instruction is an indirect jump.
Definition idp.hpp:984
@ ev_out_special_item
Generate text representation of an item in a special segment i.e.
Definition idp.hpp:851
@ ev_calc_next_eas
Calculate list of addresses the instruction in 'insn' may pass control to.
Definition idp.hpp:1620
@ ev_cvt64_hashval
perform 32-64 conversion for a hash value
Definition idp.hpp:1450
@ ev_gen_stkvar_def
Generate stack variable definition line Default line is varname = type ptr value, where 'type' is one...
Definition idp.hpp:1469
@ ev_newprc
Before changing processor type.
Definition idp.hpp:723
@ ev_adjust_libfunc_ea
Called when a signature module has been matched against bytes in the database.
Definition idp.hpp:1269
@ ev_may_show_sreg
The kernel wants to display the segment registers in the messages window.
Definition idp.hpp:1230
@ ev_is_jump_func
Is the function a trivial "jump" function?
Definition idp.hpp:1124
@ ev_newbinary
IDA is about to load a binary file.
Definition idp.hpp:739
@ ev_ending_undo
Ended undoing/redoing an action.
Definition idp.hpp:1379
@ ev_use_regarg_type
Use information about register argument.
Definition idp.hpp:1841
@ ev_load_unmapped_address
Load the dependency covering the provided address.
Definition idp.hpp:1896
@ ev_out_mnem
Generate instruction mnemonics.
Definition idp.hpp:821
@ ev_loader_elf_machine
ELF loader machine type checkpoint.
Definition idp.hpp:1237
@ ev_cmp_operands
Compare instruction operands.
Definition idp.hpp:1063
@ ev_rename
The kernel is going to rename a byte.
Definition idp.hpp:913
@ ev_may_be_func
Can a function start here?
Definition idp.hpp:964
@ ev_get_macro_insn_head
Calculate the start of a macro instruction.
Definition idp.hpp:1630
@ ev_last_cb_before_loader
Definition idp.hpp:1915
@ ev_undefine
An item in the database (insn or data) is being deleted.
Definition idp.hpp:900
@ ev_calcrel
Reserved.
Definition idp.hpp:1355
@ ev_gen_regvar_def
Generate register variable definition line.
Definition idp.hpp:859
@ ev_get_default_enum_size
Get default enum size.
Definition idp.hpp:1733
@ ev_calc_varglocs
Calculate locations of the arguments that correspond to '...'.
Definition idp.hpp:1780
@ ev_set_proc_options
Called if the user specified an option string in the command line: -p<processor name>:<options>.
Definition idp.hpp:760
@ ev_privrange_changed
Privrange interval has been moved to a new location.
Definition idp.hpp:1428
@ ev_get_idd_opinfo
Get operand information.
Definition idp.hpp:1659
@ ev_is_align_insn
Is the instruction created only for alignment purposes?
Definition idp.hpp:1018
@ ev_get_cc_regs
Get register allocation convention for given calling convention.
Definition idp.hpp:1736
@ ev_create_func_frame
Create a function frame for a newly created function.
Definition idp.hpp:1154
@ ev_out_label
The kernel is going to generate an instruction label line or a function header.
Definition idp.hpp:844
@ ev_creating_segm
A new segment is about to be created.
Definition idp.hpp:876
@ ev_func_bounds
find_func_bounds() finished its work.
Definition idp.hpp:1133
@ ev_use_stkarg_type
Use information about a stack argument.
Definition idp.hpp:1833
@ ev_loader
This code and higher ones are reserved for the loaders.
Definition idp.hpp:1919
@ ev_last_cb_before_debugger
START OF DEBUGGER CALLBACKS.
Definition idp.hpp:1596
@ ev_is_control_flow_guard
Detect if an instruction is a "thunk call" to a flow guard function (equivalent to call reg/return/no...
Definition idp.hpp:1409
@ ev_del_cref
A code reference is being deleted.
Definition idp.hpp:1208
@ ev_getreg
IBM PC only internal request, should never be used for other purpose Get register value by internal i...
Definition idp.hpp:1333
@ ev_realcvt
Floating point -> IEEE conversion.
Definition idp.hpp:1299
@ ev_is_jump_function
Is the function a trivial "jump" function?
Definition idp.hpp:1517
@ ev_assemble
Assemble an instruction.
Definition idp.hpp:1280
@ ev_create_flat_group
Create special segment representing the flat group.
Definition idp.hpp:1327
@ ev_create_merge_handlers
Create merge handlers, if needed.
Definition idp.hpp:1422
@ ev_add_cref
A code reference is being created.
Definition idp.hpp:1194
@ ev_arg_addrs_ready
Argument address info is ready.
Definition idp.hpp:1861
@ ev_add_dref
A data reference is being created.
Definition idp.hpp:1201
@ ev_set_code16_mode
Some processors have ISA 16-bit mode e.g.
Definition idp.hpp:1383
@ ev_out_function_header
Generate function header lines.
Definition idp.hpp:1560
@ ev_verify_sp
All function instructions have been analyzed.
Definition idp.hpp:1141
@ ev_clean_tbit
Clear the TF bit after an insn like pushf stored it in memory.
Definition idp.hpp:1652
@ ev_get_frame_retsize
Get size of function return address in bytes.
Definition idp.hpp:1161
@ ev_insn_reads_tbit
Check if insn will read the TF bit.
Definition idp.hpp:1644
@ ev_set_idp_options
Set IDP-specific configuration option Also see set_options_t in config.hpp.
Definition idp.hpp:749
@ ev_cvt64_supval
perform 32-64 conversion for a netnode array element
Definition idp.hpp:1439
@ ev_get_reg_accesses
Get info about the registers that are used/changed by an instruction.
Definition idp.hpp:1401
@ ev_get_function_retsize
Get size of function return address in bytes.
Definition idp.hpp:1549
@ ev_emu_insn
Emulate instruction, create cross-references, plan to analyze subsequent instructions,...
Definition idp.hpp:779
@ ev_out_operand
Generate text representation of an instruction operand outctx_t provides functions to output the gene...
Definition idp.hpp:828
@ ev_decorate_name
Decorate/undecorate a C symbol name.
Definition idp.hpp:1868
@ ev_replaying_undo
Replaying an undo/redo buffer.
Definition idp.hpp:1374
@ ev_gen_asm_or_lst
Callback: generating asm or lst file.
Definition idp.hpp:1306
@ ev_init
The IDP module is just loaded.
Definition idp.hpp:717
@ ev_sanitize_name
Apply processor/language-specific rewrites to a candidate name before the kernel validates its charac...
Definition idp.hpp:1578
@ ev_calc_arglocs
Calculate function argument locations.
Definition idp.hpp:1772
@ ev_get_reg_name
Generate text representation of a register.
Definition idp.hpp:1087
@ ev_moving_segment
May the kernel move the segment?
Definition idp.hpp:1510
@ ev_out_insn
Generate text representation of an instruction in 'ctx.insn' outctx_t provides functions to output th...
Definition idp.hpp:814
@ ev_function_bounds
find_function_bounds() finished its work.
Definition idp.hpp:1525
@ ev_out_segend
Function to produce end of segment.
Definition idp.hpp:801
@ ev_term
The IDP module is being unloaded.
Definition idp.hpp:721
@ ev_out_data
Generate text representation of data items This function may change the database and create cross-ref...
Definition idp.hpp:836
@ ev_is_basic_block_end
Is the current instruction end of a basic block?
Definition idp.hpp:975
@ ev_use_arg_types
Use information about callee arguments.
Definition idp.hpp:1854
@ ev_calc_switch_cases
Calculate case values and targets for a custom jump table.
Definition idp.hpp:1004
@ ev_can_have_type
Can the operand have a type as offset, segment, decimal, etc?
Definition idp.hpp:1055
@ ev_is_switch
Find 'switch' idiom or override processor module's decision.
Definition idp.hpp:994
@ ev_last_cb_before_type_callbacks
Definition idp.hpp:1710
@ ev_is_addr_insn
Does the instruction calculate some address using an immediate operand?
Definition idp.hpp:1480
@ ev_is_far_jump
is indirect far jump or call instruction?
Definition idp.hpp:924
@ ev_moving_segm
May the kernel move the segment?
Definition idp.hpp:882
@ ev_calc_step_over
Calculate the address of the instruction which will be executed after "step over".
Definition idp.hpp:1611
@ ev_creating_segment
A new segment is about to be created.
Definition idp.hpp:1505
@ ev_is_call_insn
Is the instruction a "call"?
Definition idp.hpp:951
@ ev_max_ptr_size
Get maximal size of a pointer in bytes.
Definition idp.hpp:1729
@ ev_get_abi_info
Get all possible ABI names and optional extensions for given compiler abiname/option is a string enti...
Definition idp.hpp:1721
@ ev_validate_flirt_func
Flirt has recognized a library function.
Definition idp.hpp:1261
@ ev_equal_reglocs
Are 2 register arglocs the same?
Definition idp.hpp:1825
@ ev_str2reg
Convert a register name to a register number.
Definition idp.hpp:1098
@ ev_out_segment_end
Function to produce end of segment.
Definition idp.hpp:1499
@ ev_create_switch_xrefs
Create xrefs for a custom jump table.
Definition idp.hpp:1012
@ ev_out_function_footer
Generate function footer lines.
Definition idp.hpp:1569
@ ev_asm_installed
After setting a new assembler.
Definition idp.hpp:1397
@ ev_is_outlined_function
The kernel is creating a function and wants to know whether it is an outlined helper (sets FUNC_OUTLI...
Definition idp.hpp:1590
@ ev_setup_til
Setup default type libraries.
Definition idp.hpp:1712
@ ev_query_unmapped_address
Get information about an unmapped address.
Definition idp.hpp:1890
@ ev_verify_function_noreturn
The kernel wants to set 'noreturn' flags for a function.
Definition idp.hpp:1539
@ ev_verify_function_sp
All function instructions have been analyzed.
Definition idp.hpp:1532
@ ev_extract_address
Extract address from a string.
Definition idp.hpp:1290
@ ev_is_ret_insn
Is the instruction a "return"?
Definition idp.hpp:957
@ ev_adjust_refinfo
Called from apply_fixup before converting operand to reference.
Definition idp.hpp:1070
@ ev_out_assumes
Function to produce assume directives when segment register value changes.
Definition idp.hpp:808
@ ev_find_op_value
Find operand value via a register tracker.
Definition idp.hpp:1365
@ ev_out_header
Function to produce start of disassembled text.
Definition idp.hpp:786
@ ev_update_call_stack
Calculate the call stack trace for the given thread.
Definition idp.hpp:1686
@ ev_get_reg_info
Get register information by its name.
Definition idp.hpp:1671
@ ev_gen_map_file
Generate map file.
Definition idp.hpp:1319
@ ev_is_sane_insn
Is the instruction sane for the current file type?
Definition idp.hpp:931
@ ev_broadcast
Broadcast call.
Definition idp.hpp:1418
@ ev_demangle_name
Demangle a C++ (or another language) name into a user-readable string.
Definition idp.hpp:1181
@ ev_is_alloca_probe
Does the function at 'ea' behave like __alloca_probe?
Definition idp.hpp:1023
@ ev_calc_spdelta
Calculate amount of change to sp for the given insn.
Definition idp.hpp:1348
@ ev_arch_changed
The loader is done parsing arch-related information, which the processor module might want to use to ...
Definition idp.hpp:1877
@ ev_analyze_prolog
Analyzes function prolog, epilog, and updates purge, and function attributes.
Definition idp.hpp:1342
@ ev_get_code16_mode
Get ISA 16-bit mode.
Definition idp.hpp:1388
@ ev_is_cond_insn
Is conditional instruction?
Definition idp.hpp:945
@ ev_is_insn_table_jump
Reserved.
Definition idp.hpp:992
@ ev_verify_noreturn
The kernel wants to set 'noreturn' flags for a function.
Definition idp.hpp:1149
@ ev_get_dbr_opnum
Get the number of the operand to be displayed in the debugger reference view (text mode).
Definition idp.hpp:1637
@ ev_get_stkvar_scale_factor
Should stack variable references be multiplied by a coefficient before being used in the stack frame?
Definition idp.hpp:1173
@ ev_calc_cdecl_purged_bytes
Calculate number of purged bytes after call.
Definition idp.hpp:1753
@ ev_adjust_argloc
Adjust argloc according to its type/size and platform endianess.
Definition idp.hpp:1796
@ ev_get_operand_string
Request text string for operand (cli, java, ...).
Definition idp.hpp:1080
@ ev_out_footer
Function to produce end of disassembled text.
Definition idp.hpp:790
@ ev_oldfile
An old file has been loaded.
Definition idp.hpp:736
@ ev_treat_hindering_item
An item hinders creation of another item.
Definition idp.hpp:905
@ ev_out_segstart
Function to produce start of segment.
Definition idp.hpp:794
@ ev_create_function_frame
Create a function frame for a newly created function.
Definition idp.hpp:1543
@ ev_out_segment_start
Function to produce start of segment.
Definition idp.hpp:1493
@ ev_get_stkarg_parts
Enumerate the stkarg stores performed by an instruction.
Definition idp.hpp:1901
@ ev_is_sp_based
Check whether the operand is relative to stack pointer or frame pointer This event is used to determi...
Definition idp.hpp:1044
@ ev_newasm
Before setting a new assembler.
Definition idp.hpp:729
@ ev_newfile
A new file has been loaded.
Definition idp.hpp:733
@ ev_lower_func_type
Get function arguments which should be converted to pointers when lowering function prototype.
Definition idp.hpp:1808
@ ev_delay_slot_insn
Get delay slot instruction.
Definition idp.hpp:1028
@ ev_get_simd_types
Get SIMD-related types according to given attributes ant/or argument location.
Definition idp.hpp:1742
@ ev_get_swift_abi_regs
Reserved.
Definition idp.hpp:1913
@ ev_del_dref
A data reference is being deleted.
Definition idp.hpp:1215
int cbsize(void)
for code segments
Definition idp.hpp:675
static ssize_t create_function_frame(ea_t func_ea)
Definition idp.hpp:2576
static ssize_t find_op_value(uval_t *out, const insn_t &insn, int op)
Definition idp.hpp:2671
int32 instruc_start
icode of the first instruction
Definition idp.hpp:2140
static ssize_t str2reg(const char *regname)
Definition idp.hpp:2683
static ssize_t newasm(int asmnum)
Definition idp.hpp:2354
int dbsize(void)
for non-code segments
Definition idp.hpp:676
void ensure_processor(void)
bool has_idp_opts(void) const
PR_IDP_OPTS
Definition idp.hpp:640
static ssize_t analyze_prolog(ea_t fct_ea)
Definition idp.hpp:2655
int32 reg_first_sreg
number of first segment register
Definition idp.hpp:2104
static ssize_t moving_segment(ea_t seg_start_ea, ea_t to, int flags)
Definition idp.hpp:2556
static ssize_t insn_reads_tbit(const insn_t &insn, regval_getter_t *_getreg, const regval_t &regvalues)
Definition idp.hpp:2781
static ssize_t get_simd_types(simd_info_vec_t *out, const simd_info_t *simd_attrs, const argloc_t *argloc, bool create_tifs, const insn_t *insn=nullptr, const op_t *op=nullptr)
Definition idp.hpp:2855
static ssize_t is_call_insn(const insn_t &insn)
Definition idp.hpp:2528
bool is_canon_insn(uint16 itype) const
Does the given value specify a valid instruction for this instruction set?
Definition idp.hpp:2145
static ssize_t is_jump_function(func_entry_info_t *fi, ea_t *jump_target, ea_t *func_pointer)
Definition idp.hpp:2560
static ssize_t setup_til()
Definition idp.hpp:2801
static ssize_t get_stkarg_parts(const insn_t &insn, stkarg_part_t *parts, int max_parts)
Definition idp.hpp:2835
static ssize_t is_sp_based(const insn_t &insn, const op_t &x)
Definition idp.hpp:2518
const regval_t &idaapi regval_getter_t(const char *name, const regval_t *regvalues)
Definition idp.hpp:697
static ssize_t out_function_header(outctx_t &ctx, ea_t func_ea)
Definition idp.hpp:2584
static ssize_t create_switch_xrefs(ea_t jumpea, const switch_info_t &si)
Definition idp.hpp:2691
bool ti(void) const
PR_TYPEINFO
Definition idp.hpp:644
static ssize_t out_special_item(outctx_t &ctx, uchar segtype)
Definition idp.hpp:2442
ssize_t privrange_changed(const range_t &old_privrange, adiff_t delta, qstring *errbuf=nullptr)
Definition idp.hpp:2883
static ssize_t add_dref(ea_t from, ea_t to, dref_t type)
Definition idp.hpp:2715
static ssize_t is_cond_insn(const insn_t &insn)
Definition idp.hpp:2753
static ssize_t equal_reglocs(const argloc_t &a1, const argloc_t &a2)
Definition typeinf.hpp:6768
static ssize_t get_frame_retsize(int *retsize, const func_t *pfn)
Definition idp.hpp:2651
static ssize_t func_bounds(int *possible_return_code, func_t *pfn, ea_t max_func_end_ea)
Definition idp.hpp:2482
static ssize_t adjust_argloc(argloc_t *argloc, const tinfo_t *type, int size)
Definition idp.hpp:2863
int32 instruc_end
icode of the last instruction + 1
Definition idp.hpp:2141
static ssize_t is_switch(switch_info_t *si, const insn_t &insn)
Definition idp.hpp:2687
bool has_code16_bit(void) const
PR2_CODE16_BIT
Definition idp.hpp:648
static ssize_t calc_next_eas(eavec_t *res, const insn_t &insn, bool over)
Definition idp.hpp:2793
static ssize_t out_data(outctx_t &ctx, bool analyze_only)
Definition idp.hpp:2434
void * unused_slot
Reserved, currently equals to nullptr.
Definition idp.hpp:2182
static ssize_t create_flat_group(ea_t image_base, int bitness, sel_t dataseg_sel)
Definition idp.hpp:2607
static ssize_t max_ptr_size()
Definition idp.hpp:2805
static ssize_t out_segment_start(outctx_t &ctx, ea_t seg_start_ea)
Definition idp.hpp:2544
bool use32(void) const
PR_USE64 or PR_USE32
Definition idp.hpp:642
uint32 flag
an ORed combination of Processor feature bits
Definition idp.hpp:637
static ssize_t arg_addrs_ready(ea_t caller, int n, const tinfo_t &tif, ea_t *addrs)
Definition idp.hpp:2859
static ssize_t adjust_libfunc_ea(const idasgn_t &sig, const libfunc_t &libfun, ea_t *ea)
Definition idp.hpp:2741
ssize_t cvt64_supval(nodeidx_t node, uchar tag, nodeidx_t idx, const uchar *data, size_t datlen, qstring *errbuf=nullptr)
Definition idp.hpp:2887
static ssize_t gen_asm_or_lst(bool starting, FILE *fp, bool is_asm, int flags, void *outline)
Definition idp.hpp:2619
static ssize_t oldfile(const char *fname)
Definition idp.hpp:2374
bool delay_slot_insn(ea_t *ea, bool *bexec, bool *fexec)
Helper function to get the delay slot instruction.
Definition idp.hpp:3083
static ssize_t creating_segment(segment_info_t *si)
Definition idp.hpp:2552
static ssize_t lower_func_type(intvec_t *argnums, func_type_data_t *fti)
Definition idp.hpp:2867
const instruc_t * instruc
Array of instructions.
Definition idp.hpp:2147
static ssize_t term()
Definition idp.hpp:2346
static ssize_t is_align_insn(ea_t ea)
Definition idp.hpp:2536
static bool get_code16_mode(ea_t ea)
Definition idp.hpp:2761
static ssize_t emu_insn(const insn_t &insn)
Definition idp.hpp:2398
static ssize_t endbinary(bool ok)
Definition idp.hpp:2382
bool has_segregs(void) const
PR_SEGS
Definition idp.hpp:641
static ssize_t newprc(int pnum, bool keep_cfg)
Definition idp.hpp:2350
static ssize_t notify(event_t event_code,...)
Definition idp.hpp:1927
static ssize_t extract_address(ea_t *out_ea, ea_t screen_ea, const char *string, size_t x)
Definition idp.hpp:2679
static ssize_t cmp_operands(const op_t &op1, const op_t &op2)
Definition idp.hpp:2494
size_t tbyte_size
Size of long double (tbyte) for this processor (meaningful only if asm_t::a_tbyte !...
Definition idp.hpp:2164
ssize_t cvt64_hashval(nodeidx_t node, uchar tag, const char *name, const uchar *data, size_t datlen, qstring *errbuf=nullptr)
Definition idp.hpp:2891
bool stkup(void) const
PR_STACK_UP
Definition idp.hpp:645
bool use_tbyte(void) const
PR_USE_TBYTE
Definition idp.hpp:646
static ssize_t update_call_stack(call_stack_t *stack, int tid, regval_getter_t *_getreg, const regval_t &regvalues)
Definition idp.hpp:2789
const char *const * psnames
short processor names (nullptr terminated).
Definition idp.hpp:683
static ssize_t del_cref(ea_t from, ea_t to, bool expand)
Definition idp.hpp:2719
static ssize_t gen_stkvar_def(outctx_t &ctx, const struct udm_t *mptr, sval_t v, tid_t tid)
Definition idp.hpp:2446
int32 segreg_size
size of a segment register in bytes
Definition idp.hpp:2106
static ssize_t is_jump_func(func_t *pfn, ea_t *jump_target, ea_t *func_pointer)
Definition idp.hpp:2498
bool calcrel_in_bits(void) const
PR2_REL_BITS
Definition idp.hpp:651
static ssize_t gen_map_file(int *nlines, FILE *fp)
Definition idp.hpp:2623
static const char * set_idp_options(const char *keyword, int vtype, const void *value, bool idb_loaded=true)
Definition idp.hpp:2731
static ssize_t getreg(uval_t *rv, int regnum)
Definition idp.hpp:2506
int32 reg_code_sreg
number of CS register
Definition idp.hpp:2114
bool supports_macros(void) const
PR2_MACRO
Definition idp.hpp:649
static ssize_t out_footer(outctx_t &ctx)
Definition idp.hpp:2406
static ssize_t _calc_retloc(argloc_t *retloc, const tinfo_t &rettype, callcnv_t cc)
Definition idp.hpp:2817
static ssize_t newbinary(const char *filename, qoff64_t fileoff, ea_t basepara, ea_t binoff, uint64 nbytes)
Definition idp.hpp:2378
const bytes_t * codestart
Array of typical code start sequences.
Definition idp.hpp:2121
int get_default_segm_bitness(bool is_64bit_app) const
Get default segment bitness.
Definition idp.hpp:658
static ssize_t create_func_frame(func_t *pfn)
Definition idp.hpp:2647
int32 dnbits
Number of bits in a byte for non-code segments (usually 8).
Definition idp.hpp:667
bool use_mappings(void) const
PR2_MAPPINGS
Definition idp.hpp:647
const char * get_canon_mnem(uint16 itype) const
Get the instruction name.
Definition idp.hpp:2150
static ssize_t out_segment_end(outctx_t &ctx, ea_t seg_start_ea)
Definition idp.hpp:2548
static void auto_queue_empty(int type)
Definition idp.hpp:2478
static ssize_t out_label(outctx_t &ctx, const char *colored_name)
Definition idp.hpp:2438
static ssize_t get_stkvar_scale_factor()
Definition idp.hpp:2599
static ssize_t out_segend(outctx_t &ctx, segment_t *seg)
Definition idp.hpp:2414
int32 reg_last_sreg
number of last segment register
Definition idp.hpp:2105
static ssize_t is_control_flow_guard(int *p_reg, const insn_t *insn)
Definition idp.hpp:2366
static ssize_t out_mnem(outctx_t &ctx)
Definition idp.hpp:2426
static ssize_t gen_src_file_lnnum(outctx_t &ctx, const char *file, size_t lnnum)
Definition idp.hpp:2454
static ssize_t adjust_refinfo(refinfo_t *ri, ea_t ea, int n, const fixup_data_t &fd)
Definition idp.hpp:2749
char real_width[4]
Number of digits in floating numbers after the decimal point.
Definition idp.hpp:2176
static ssize_t add_cref(ea_t from, ea_t to, cref_t type)
Definition idp.hpp:2711
const bytes_t * retcodes
Array of 'return' instruction opcodes.
Definition idp.hpp:2127
int32 icode_return
Icode of return instruction. It is ok to give any of possible return instructions.
Definition idp.hpp:2179
static ssize_t coagulate_dref(ea_t from, ea_t to, bool may_define, ea_t *code_ea)
Definition idp.hpp:2727
static ssize_t set_proc_options(const char *options, int confidence)
Definition idp.hpp:2737
static ssize_t is_outlined_function(ea_t func_ea)
Definition idp.hpp:2466
static ssize_t is_indirect_jump(const insn_t &insn)
Definition idp.hpp:2635
uint32 flag2
an ORed combination of Processor additional feature bits
Definition idp.hpp:638
static ssize_t is_ret_insn(const insn_t &insn, uchar iri_flags)
Definition idp.hpp:2532
static ssize_t get_cc_regs(callregs_t *regs, callcnv_t cc)
Definition idp.hpp:2851
static ssize_t may_show_sreg(ea_t current_ea)
Definition idp.hpp:2470
static ssize_t calc_step_over(ea_t *target, ea_t ip)
Definition idp.hpp:2769
static ssize_t is_addr_insn(int *type, const insn_t &insn)
Definition idp.hpp:2540
static fpvalue_error_t realcvt(void *m, fpvalue_t *e, uint16 swt)
Definition idp.hpp:2745
int get_stkvar_scale(void)
Get the stack variable scaling factor.
Definition idp.hpp:2084
bool supports_calcrel(void) const
PR2_USE_CALCREL
Definition idp.hpp:650
static ssize_t del_dref(ea_t from, ea_t to)
Definition idp.hpp:2723
static ssize_t asm_installed(int asmnum)
Definition idp.hpp:2358
static ssize_t creating_segm(segment_t *seg)
Definition idp.hpp:2386
static ssize_t is_basic_block_end(const insn_t &insn, bool call_insn_stops_block)
Definition idp.hpp:2502
static ssize_t calc_cdecl_purged_bytes(ea_t ea)
Definition idp.hpp:2812
static ssize_t demangle_name(int32 *res, qstring *out, const char *name, uint32 disable_mask, int demreq)
Definition idp.hpp:2603
static ssize_t verify_function_noreturn(ea_t func_ea)
Definition idp.hpp:2572
static ssize_t get_idd_opinfo(idd_opinfo_t *opinf, ea_t ea, int n, int thread_id, regval_getter_t *_getreg, const regval_t &regvalues)
Definition idp.hpp:2785
static ssize_t out_segstart(outctx_t &ctx, segment_t *seg)
Definition idp.hpp:2410
static ssize_t get_function_retsize(int *retsize, ea_t func_ea)
Definition idp.hpp:2580
static ssize_t function_bounds(int *possible_return_code, fchunk_info_t *fi, ea_t max_func_end_ea)
Definition idp.hpp:2564
static ssize_t newfile(const char *fname)
Definition idp.hpp:2370
static ssize_t calc_switch_cases(void *casevec, eavec_t *targets, ea_t insn_ea, const switch_info_t &si)
Definition idp.hpp:2695
static ssize_t verify_function_sp(ea_t func_ea)
Definition idp.hpp:2568
int32 version
Expected kernel version, should be IDP_INTERFACE_VERSION.
Definition idp.hpp:634
static ssize_t get_bg_color(bgcolor_t *color, ea_t ea)
Definition idp.hpp:2699
static reg_finder_t * get_regfinder()
Definition idp.hpp:2895
static ssize_t get_autocmt(qstring *buf, const insn_t &insn)
Definition idp.hpp:2627
static ssize_t _calc_arglocs(func_type_data_t *fti)
Definition idp.hpp:2827
static ssize_t is_sane_insn(const insn_t &insn, int no_crefs)
Definition idp.hpp:2490
static ssize_t get_macro_insn_head(ea_t *head, ea_t ip)
Definition idp.hpp:2773
static ssize_t create_merge_handlers(merge_data_t *md)
Definition idp.hpp:2879
int32 id
one of Processor IDs
Definition idp.hpp:636
static ssize_t is_far_jump(int icode)
Definition idp.hpp:2524
const char *const * plnames
long processor names (nullptr terminated).
Definition idp.hpp:685
static ssize_t get_abi_info(qstrvec_t *abi_names, qstrvec_t *abi_opts, comp_t comp)
Definition idp.hpp:2871
static ssize_t get_dbr_opnum(int *opnum, const insn_t &insn)
Definition idp.hpp:2777
static ssize_t use_arg_types(ea_t ea, func_type_data_t *fti, void *rargs)
Definition idp.hpp:2843
static ssize_t is_alloca_probe(ea_t ea)
Definition idp.hpp:2611
static ssize_t next_exec_insn(ea_t *target, ea_t ea, int tid, regval_getter_t *_getreg, const regval_t &regvalues)
Definition idp.hpp:2765
static ssize_t verify_sp(func_t *pfn)
Definition idp.hpp:2643
static ssize_t query_unmapped_address(unmapped_info_t *out, ea_t ea)
Definition idp.hpp:2899
int32 cnbits
Number of bits in a byte for code segments (usually 8).
Definition idp.hpp:663
static ssize_t load_unmapped_address(ea_t ea)
Definition idp.hpp:2903
int32 regs_num
number of registers
Definition idp.hpp:2098
static ssize_t treat_hindering_item(ea_t hindering_item_ea, flags64_t new_item_flags, ea_t new_item_ea, asize_t new_item_length)
Definition idp.hpp:2675
static ssize_t _decorate_name(qstring *outbuf, const char *name, bool mangle, callcnv_t cc, const tinfo_t &type)
Definition typeinf.hpp:6777
static ssize_t rename(ea_t ea, const char *new_name, int flags)
Definition idp.hpp:2458
int32 reg_data_sreg
number of DS register
Definition idp.hpp:2115
static ssize_t sanitize_name(qstring *name, callcnv_t cc)
Definition idp.hpp:2462
static ssize_t calcrel(bytevec_t *out_relbits, size_t *out_consumed, ea_t ea)
Definition idp.hpp:2663
hook_cb_t * _notify
Event notification handler.
Definition idp.hpp:1926
static ssize_t gen_regvar_def(outctx_t &ctx, regvar_t *v)
Definition idp.hpp:2450
static ssize_t may_be_func(const insn_t &insn, int state)
Definition idp.hpp:2486
static ssize_t out_assumes(outctx_t &ctx)
Definition idp.hpp:2418
static ssize_t moving_segm(segment_t *seg, ea_t to, int flags)
Definition idp.hpp:2514
static ssize_t coagulate(ea_t start_ea)
Definition idp.hpp:2474
static ssize_t get_reg_name(qstring *buf, int reg, size_t width, int reghi)
Definition idp.hpp:2615
static ssize_t get_reg_accesses(reg_accesses_t *accvec, const insn_t &insn, int flags)
Definition idp.hpp:2362
static ssize_t calc_purged_bytes(int *p_purged_bytes, const func_type_data_t &fti)
Definition idp.hpp:2847
static ssize_t verify_noreturn(func_t *pfn)
Definition idp.hpp:2639
static ssize_t init(const char *idp_modname)
Definition idp.hpp:2342
procmod_t(const procmod_t &)=delete
const op_t * make_op_imm(op_t *op, uval_t val, int8 dtype=-1) const
Definition idp.hpp:2279
size_t procmod_flags
Definition idp.hpp:2266
procmod_t()
Definition idp.hpp:2268
const op_t * make_op_reg(op_t *op, int reg, int8 dtype=-1) const
The helper methods for reg_finder_t.
Definition idp.hpp:2272
const op_t * make_op_displ(op_t *op, int base_reg, uval_t displ, int8 dtype=-1) const
Definition idp.hpp:2286
op_dtype_t calc_op_dtype(sint8 dtype) const
Definition idp.hpp:2313
const op_t * make_op_phrase(op_t *op, int base_reg, int index_reg, int8 dtype=-1) const
This method puts the index register into the VALUE member.
Definition idp.hpp:2299
Base class for an range.
Definition range.hpp:35
Information about a reference.
Definition nalt.hpp:1001
Information about a register accessed by an instruction.
Definition idp.hpp:2988
uchar opnum
operand number
Definition idp.hpp:2992
int regnum
register number (only entire registers)
Definition idp.hpp:2989
access_type_t access_type
Definition idp.hpp:2991
bool operator==(const reg_access_t &r) const
Definition idp.hpp:2999
bool operator!=(const reg_access_t &r) const
Definition idp.hpp:3007
bitrange_t range
bitrange inside the register
Definition idp.hpp:2990
bool have_common_bits(const reg_access_t &r) const
Definition idp.hpp:2994
Definition idp.hpp:3015
Definition regfinder.hpp:931
Get register number and size from register name.
Definition idp.hpp:2953
int size
register size
Definition idp.hpp:2955
DECLARE_COMPARISONS(reg_info_t)
Definition idp.hpp:2956
int reg
register number
Definition idp.hpp:2954
Definition typeinf.hpp:6133
Structure to hold a register value.
Definition idd.hpp:563
A register variable allows the user to rename a general processor register to a meaningful name.
Definition frame.hpp:426
Relocatable object.
Definition pro.h:4103
SIMD type info.
Definition typeinf.hpp:4638
Definition typeinf.hpp:4686
Definition typeinf.hpp:1528
A single stkarg-store action returned by processor_t::get_stkarg_parts.
Definition typeinf.hpp:6197
Definition frame.hpp:75
Information about a switch statement.
Definition nalt.hpp:699
An object to represent struct or union members.
Definition typeinf.hpp:5393
Information about an unmapped address.
Definition idp.hpp:384
ea_t offset
The symbol thath is being targeted by the address - empty if no symbol was found.
Definition idp.hpp:387
qstring qualifier
Definition idp.hpp:385
qstring symbol
The symbol "qualifier". E.g., the path of a DyldSharedCache image.
Definition idp.hpp:386
Functions that deal with the disassembling of program instructions.