56#define IDP_INTERFACE_VERSION 900
71#define CF_STOP 0x00001
73#define CF_CALL 0x00002
74#define CF_CHG1 0x00004
75#define CF_CHG2 0x00008
76#define CF_CHG3 0x00010
77#define CF_CHG4 0x00020
78#define CF_CHG5 0x00040
79#define CF_CHG6 0x00080
80#define CF_USE1 0x00100
81#define CF_USE2 0x00200
82#define CF_USE3 0x00400
83#define CF_USE4 0x00800
84#define CF_USE5 0x01000
85#define CF_USE6 0x02000
86#define CF_JUMP 0x04000
88#define CF_SHFT 0x08000
91#define CF_CHG7 0x020000
92#define CF_CHG8 0x040000
93#define CF_USE7 0x080000
94#define CF_USE8 0x100000
112 static const int bits[] =
114 CF_CHG1, CF_CHG2, CF_CHG3, CF_CHG4,
115 CF_CHG5, CF_CHG6, CF_CHG7, CF_CHG8,
117 CASSERT(qnumber(bits) == UA_MAXOP);
118 return opnum < UA_MAXOP && (feature & bits[opnum]) != 0;
126 static const int bits[] =
128 CF_USE1, CF_USE2, CF_USE3, CF_USE4,
129 CF_USE5, CF_USE6, CF_USE7, CF_USE8,
131 CASSERT(qnumber(bits) == UA_MAXOP);
132 return opnum < UA_MAXOP && (feature & bits[opnum]) != 0;
150#define IRI_EXTENDED 0x00
152#define IRI_RET_LITERALLY 0x01
153#define IRI_SKIP_RETTARGET 0x02
155#define IRI_STRICT (IRI_RET_LITERALLY|IRI_SKIP_RETTARGET)
181#define AS_OFFST 0x00000001
182#define AS_COLON 0x00000002
183#define AS_UDATA 0x00000004
185#define AS_2CHRE 0x00000008
186#define AS_NCHRE 0x00000010
187#define AS_N2CHR 0x00000020
190#define AS_1TEXT 0x00000040
191#define AS_NHIAS 0x00000080
192#define AS_NCMAS 0x00000100
194#define AS_HEXFM 0x00000E00
195#define ASH_HEXF0 0x00000000
196#define ASH_HEXF1 0x00000200
197#define ASH_HEXF2 0x00000400
198#define ASH_HEXF3 0x00000600
199#define ASH_HEXF4 0x00000800
200#define ASH_HEXF5 0x00000A00
201#define AS_DECFM 0x00003000
202#define ASD_DECF0 0x00000000
203#define ASD_DECF1 0x00001000
204#define ASD_DECF2 0x00002000
205#define ASD_DECF3 0x00003000
206#define AS_OCTFM 0x0001C000
207#define ASO_OCTF0 0x00000000
208#define ASO_OCTF1 0x00004000
209#define ASO_OCTF2 0x00008000
210#define ASO_OCTF3 0x0000C000
211#define ASO_OCTF4 0x00010000
212#define ASO_OCTF5 0x00014000
213#define ASO_OCTF6 0x00018000
214#define ASO_OCTF7 0x0001C000
215#define AS_BINFM 0x000E0000
216#define ASB_BINF0 0x00000000
217#define ASB_BINF1 0x00020000
218#define ASB_BINF2 0x00040000
219#define ASB_BINF3 0x00060000
220#define ASB_BINF4 0x00080000
221#define ASB_BINF5 0x000A0000
223#define AS_UNEQU 0x00100000
224#define AS_ONEDUP 0x00200000
225#define AS_NOXRF 0x00400000
226#define AS_XTRNTYPE 0x00800000
227#define AS_RELSUP 0x01000000
228#define AS_LALIGN 0x02000000
229#define AS_NOCODECLN 0x04000000
230#define AS_NOSPACE 0x10000000
231#define AS_ALIGN2 0x20000000
233#define AS_ASCIIC 0x40000000
235#define AS_ASCIIZ 0x80000000
317#define AS2_BRACE 0x00000001
318#define AS2_STRINV 0x00000002
320#define AS2_BYTE1CHAR 0x00000004
322#define AS2_IDEALDSCR 0x00000008
325#define AS2_TERSESTR 0x00000010
327#define AS2_COLONSUF 0x00000020
330#define AS2_YWORD 0x00000040
331#define AS2_ZWORD 0x00000080
398#define HKCB_GLOBAL 0x0001
429#define DECLARE_LISTENER(listener_type, ctx_type, ctx_name) \
430 struct listener_type : public event_listener_t \
432 ctx_type &ctx_name; \
433 listener_type(ctx_type &_ctx) : ctx_name(_ctx) {} \
434 virtual ssize_t idaapi on_event(ssize_t code, va_list va) override; \
453#define PLFM_MC6812 11
469#define PLFM_TRICORE 27
470#define PLFM_DSP56K 28
476#define PLFM_TMS320C54 34
477#define PLFM_TMS320C55 35
478#define PLFM_TRIMEDIA 36
480#define PLFM_NEC_78K0 38
481#define PLFM_NEC_78K0S 39
486#define PLFM_MC6816 44
488#define PLFM_TMS320C3 46
489#define PLFM_KR1878 47
490#define PLFM_AD218X 48
491#define PLFM_OAKDSP 49
492#define PLFM_TLCS900 50
495#define PLFM_MN102L00 53
496#define PLFM_TMS320C1X 54
497#define PLFM_NEC_V850X 55
498#define PLFM_SCR_ADPT 56
500#define PLFM_MSP430 58
502#define PLFM_DALVIK 60
503#define PLFM_65C816 61
507#define PLFM_TMS320C28 65
508#define PLFM_DSP96K 66
509#define PLFM_SPC700 67
510#define PLFM_AD2106X 68
513#define PLFM_XTENSA 71
524#define PR_SEGS 0x000001
525#define PR_USE32 0x000002
526#define PR_DEFSEG32 0x000004
527#define PR_RNAMESOK 0x000008
531#define PR_ADJSEGS 0x000020
532#define PR_DEFNUM 0x0000C0
533#define PRN_HEX 0x000000
534#define PRN_OCT 0x000040
535#define PRN_DEC 0x000080
536#define PRN_BIN 0x0000C0
537#define PR_WORD_INS 0x000100
538#define PR_NOCHANGE 0x000200
540#define PR_ASSEMBLE 0x000400
541#define PR_ALIGN 0x000800
542#define PR_TYPEINFO 0x001000
545#define PR_USE64 0x002000
546#define PR_SGROTHER 0x004000
547#define PR_STACK_UP 0x008000
548#define PR_BINMEM 0x010000
551#define PR_SEGTRANS 0x020000
554#define PR_CHK_XREF 0x040000
555#define PR_NO_SEGMOVE 0x080000
559#define PR_USE_ARG_TYPES 0x200000
560#define PR_SCALE_STKVARS 0x400000
561#define PR_DELAYED 0x800000
564#define PR_ALIGN_INSN 0x1000000
567#define PR_PURGING 0x2000000
568#define PR_CNDINSNS 0x4000000
569#define PR_USE_TBYTE 0x8000000
570#define PR_DEFSEG64 0x10000000
571#define PR_OUTER 0x20000000
578#define PR2_MAPPINGS 0x000001
579#define PR2_IDP_OPTS 0x000002
580#define PR2_CODE16_BIT 0x000008
582#define PR2_MACRO 0x000010
583#define PR2_USE_CALCREL 0x000020
584#define PR2_REL_BITS 0x000040
585#define PR2_FORCE_16BIT 0x000080
592#define OP_FP_BASED 0x00000000
593#define OP_SP_BASED 0x00000001
594#define OP_SP_ADD 0x00000000
595#define OP_SP_SUB 0x00000002
601#define CUSTOM_INSN_ITYPE 0x8000
606#define REG_SPOIL 0x80000000
622 bool use32(
void)
const {
return (
flag & (PR_USE64|PR_USE32)) != 0; }
623 bool use64(
void)
const {
return (
flag & PR_USE64) != 0; }
624 bool ti(
void)
const {
return (
flag & PR_TYPEINFO) != 0; }
625 bool stkup(
void)
const {
return (
flag & PR_STACK_UP) != 0; }
640 return is_64bit_app && (
flag & PR_DEFSEG64) != 0 ? 2 : (
flag & PR_DEFSEG32) != 0;
1776 inline static ssize_t init(
const char *idp_modname);
1829 inline static ssize_t gen_asm_or_lst(
bool starting, FILE *fp,
bool is_asm,
int flags,
void *outline);
1832 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);
1859 inline static const char *
set_idp_options(
const char *keyword,
int vtype,
const void *value,
bool idb_loaded =
true);
1908 if ( (
flag & PR_SCALE_STKVARS) == 0 )
1912 error(
"Request ph.get_stkvar_scale_factor should be implemented");
1913 else if ( scale <= 0 )
1914 error(
"Invalid return code from ph.get_stkvar_scale_factor request");
2022#define PH (*get_ph())
2024#define ASH (*get_ash())
2026#define EAH (*get_eah())
2033 #define HEXDSP get_hexdsp()
2077 DEFINE_EA_HELPER_FUNCS(
_eah)
2080 DEFINE_MEMORY_ALLOCATION_FUNCS()
2110 int8 dtype = -1)
const
2123 int8 dtype = -1)
const
2127 op->
value = index_reg;
2136 : eah().ea_size == 4 ? dt_dword
2147 virtual bool idaapi
run(
size_t arg) = 0;
2155 return ::hook_event_listener(hook_type, cb,
this, hkcb_flags);
2334 return code == 0 ? OP_SP_BASED : mode;
2497 const char *errmsg = IDPOPT_BADKEY;
2499 return code == 1 ? IDPOPT_OK :
code == 0 ? IDPOPT_BADKEY : errmsg;
2694 if ( bitrange !=
nullptr )
2700 return code == 1 ? r2 :
nullptr;
2711 return reg > r.reg ? 1 : -1;
2712 if (
size != r.size )
2713 return size > r.size ? 1 : -1;
2735 RW_ACCESS = WRITE_ACCESS | READ_ACCESS,
2761 return !(*
this == r);
2770inline bool insn_t::is_canon_insn(
const processor_t &_ph)
const
2772 return _ph.is_canon_insn(itype);
2775inline const char *insn_t::get_canon_mnem(
const processor_t &_ph)
const
2777 return _ph.get_canon_mnem(itype);
2782 return _ph.get_canon_feature(itype);
2812 const char *procname,
2837 bool ok = (
flag & PR_DELAYED) != 0;
2845 if ( bexec !=
nullptr )
2847 if ( fexec !=
nullptr )
3295 for (
size_t i = 0;
psnames[i] !=
nullptr; ++i )
3340#define SET_MODULE_DATA(type) (type *)set_module_data(&data_id, new type)
3341#define GET_MODULE_DATA(type) ((type *)get_module_data(data_id))
Definition of the bitrange_t class.
Describes an argument location.
Definition typeinf.hpp:1101
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:3773
Register allocation calling convention.
Definition typeinf.hpp:1733
A function is a set of continuous ranges of addresses with characteristics.
Definition funcs.hpp:85
class to contain public info about the merge process
Definition merge.hpp:191
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
A flow chart for a function, or a set of address ranges.
Definition gdl.hpp:443
Reimplementation of vector class from STL.
Definition pro.h:2250
Describes a program segment.
Definition segment.hpp:69
Primary mechanism for managing type information.
Definition typeinf.hpp:3046
System independent counterparts of FILE* related functions from Clib.
Routines for working with functions within the disassembled program.
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
THREAD_SAFE va_start(va, format)
int code
Definition fpro.h:88
idaman size_t n
Definition pro.h:997
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:7832
cexpr_t * e
Definition hexrays.hpp:7308
const tinfo_t & type
Definition hexrays.hpp:7301
qstring inf_get_procname()
Definition ida.hpp:1029
uint32 callcnv_t
Definition ida.hpp:74
hook_type_t
Types of events that be hooked to with hook_event_listener()
Definition ida.hpp:1284
@ HT_IDB
Hook to the database events.
Definition ida.hpp:1291
@ HT_IDP
Hook to the processor module.
Definition ida.hpp:1285
uchar inf_get_cc_size_ldbl()
Definition ida.hpp:1022
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:1332
uchar comp_t
target compiler id
Definition ida.hpp:72
idaman ssize_t ida_export invoke_callbacks(hook_type_t hook_type, int notification_code, va_list va)
Generate event notification.
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:3282
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:2794
@ SETPROC_LOADER
set processor type for new idb; if the user has specified a compatible processor, return success with...
Definition idp.hpp:2796
@ SETPROC_IDB
set processor type for old idb
Definition idp.hpp:2795
@ SETPROC_USER
set user-specified processor used for -p and manual processor change at later time
Definition idp.hpp:2801
@ SETPROC_LOADER_NON_FATAL
the same as SETPROC_LOADER but non-fatal failures.
Definition idp.hpp:2800
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:2765
qvector< reg_info_t > reginfovec_t
vector of register info objects
Definition idp.hpp:2718
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)
DECLARE_TYPE_AS_MOVABLE(reg_info_t)
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:2855
@ LTC_EDITED
edited a local type
Definition idp.hpp:2859
@ LTC_TIL_LOADED
loaded a til file
Definition idp.hpp:2862
@ LTC_ALIASED
added a type alias
Definition idp.hpp:2860
@ LTC_ADDED
added a local type
Definition idp.hpp:2857
@ LTC_COMPILER
changed the compiler and calling convention
Definition idp.hpp:2861
@ LTC_TIL_UNLOADED
unloaded a til file
Definition idp.hpp:2863
@ LTC_TIL_COMPACTED
numbered types have been compacted compact_numbered_types()
Definition idp.hpp:2864
@ LTC_NONE
no event (internal use)
Definition idp.hpp:2856
@ LTC_DELETED
deleted a local type
Definition idp.hpp:2858
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:2730
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:110
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:124
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:2861
bool ok
Definition kernwin.hpp:7006
uval_t uval_t
Definition kernwin.hpp:1878
idaman int ida_export_data errorexit
Exiting because of a a fatal error?
Definition kernwin.hpp:7065
asize_t size
Definition kernwin.hpp:6339
unsigned __int64 uint64
Definition llong.hpp:13
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:2873
event_code_t
IDB event codes.
Definition idp.hpp:2878
@ deleting_func
The kernel is about to delete a function.
Definition idp.hpp:3029
@ dirtree_rmdir
Dirtree: a directory has been deleted.
Definition idp.hpp:3158
@ tail_owner_changed
A tail chunk owner has been changed.
Definition idp.hpp:3051
@ bookmark_changed
Boomarked position changed.
Definition idp.hpp:3136
@ dirtree_mkdir
Dirtree: a directory has been created.
Definition idp.hpp:3154
@ frame_udm_created
Frame member has been added.
Definition idp.hpp:3221
@ local_type_renamed
Local type has been renamed.
Definition idp.hpp:3271
@ callee_addr_changed
Callee address has been updated by the user.
Definition idp.hpp:3132
@ lt_edm_deleted
local type enum member has been deleted
Definition idp.hpp:3255
@ local_types_changed
Local types have been changed.
Definition idp.hpp:3185
@ extlang_changed
The list of extlangs or the default extlang was changed.
Definition idp.hpp:2899
@ changing_segm_name
Segment name is being changed.
Definition idp.hpp:2985
@ closebase
The database will be closed now.
Definition idp.hpp:2879
@ changing_op_type
An operand type (offset, hex, etc...) is to be changed.
Definition idp.hpp:2950
@ lt_udt_expanded
A structure type has been expanded/shrank.
Definition idp.hpp:3212
@ idasgn_loaded
FLIRT signature has been loaded for normal processing (not for recognition of startup sequences).
Definition idp.hpp:2907
@ changing_ti
An item typestring (c/c++ prototype) is to be changed.
Definition idp.hpp:2929
@ func_deleted
A function has been deleted.
Definition idp.hpp:3151
@ byte_patched
A byte has been patched.
Definition idp.hpp:3099
@ segm_name_changed
Segment name has been changed.
Definition idp.hpp:2988
@ lt_udm_created
local type udt member has been added
Definition idp.hpp:3190
@ lt_udm_renamed
local type udt member has been renamed
Definition idp.hpp:3200
@ frame_udm_deleted
Frame member has been deleted.
Definition idp.hpp:3225
@ deleting_segm
A segment is to be deleted.
Definition idp.hpp:2962
@ item_color_changed
An item color has been changed.
Definition idp.hpp:3127
@ changing_segm_start
Segment start address is to be changed.
Definition idp.hpp:2969
@ lt_edm_renamed
local type enum member has been renamed
Definition idp.hpp:3260
@ tryblks_updated
Updated tryblk information.
Definition idp.hpp:3064
@ sgr_deleted
The kernel has deleted a segment register value.
Definition idp.hpp:3143
@ changing_op_ti
An operand typestring (c/c++ prototype) is to be changed.
Definition idp.hpp:2939
@ lt_udm_deleted
local type udt member has been deleted
Definition idp.hpp:3195
@ range_cmt_changed
Range comment has been changed.
Definition idp.hpp:3116
@ segm_end_changed
Segment end address has been changed.
Definition idp.hpp:2981
@ upgraded
The database has been upgraded and the receiver can upgrade its info as well.
Definition idp.hpp:2883
@ frame_udm_changed
Frame member has been changed.
Definition idp.hpp:3235
@ dirtree_move
Dirtree: a directory or item has been moved.
Definition idp.hpp:3167
@ func_noret_changed
FUNC_NORET bit has been changed.
Definition idp.hpp:3056
@ lt_udm_changed
local type udt member has been changed
Definition idp.hpp:3205
@ changing_cmt
An item comment is to be changed.
Definition idp.hpp:3103
@ determined_main
The main() function has been determined.
Definition idp.hpp:2896
@ make_code
An instruction is being created.
Definition idp.hpp:3078
@ func_added
The kernel has added a function.
Definition idp.hpp:3015
@ segm_deleted
A segment has been deleted.
Definition idp.hpp:2964
@ frame_deleted
The kernel has deleted a function frame.
Definition idp.hpp:3032
@ dirtree_rank
Dirtree: a directory or item rank has been changed.
Definition idp.hpp:3172
@ deleting_func_tail
A function tail chunk is to be removed.
Definition idp.hpp:3043
@ func_tail_appended
A function tail chunk has been appended.
Definition idp.hpp:3039
@ make_data
A data item is being created.
Definition idp.hpp:3081
@ changing_segm_class
Segment class is being changed.
Definition idp.hpp:2992
@ segm_attrs_updated
Segment attributes has been changed.
Definition idp.hpp:2998
@ set_func_end
Function chunk end address will be changed.
Definition idp.hpp:3025
@ segm_start_changed
Segment start address has been changed.
Definition idp.hpp:2973
@ op_type_changed
An operand type (offset, hex, etc...) has been set or deleted.
Definition idp.hpp:2954
@ auto_empty_finally
Info: all analysis queues are empty definitively.
Definition idp.hpp:2893
@ allsegs_moved
Program rebasing is complete.
Definition idp.hpp:3010
@ segm_moved
Segment has been moved.
Definition idp.hpp:3003
@ stkpnts_changed
Stack change points have been modified.
Definition idp.hpp:3059
@ dirtree_link
Dirtree: an item has been linked/unlinked.
Definition idp.hpp:3162
@ savebase
The database is being saved.
Definition idp.hpp:2881
@ set_func_start
Function chunk start address will be changed.
Definition idp.hpp:3021
@ frame_udm_renamed
Frame member has been renamed.
Definition idp.hpp:3230
@ func_tail_deleted
A function tail chunk has been removed.
Definition idp.hpp:3047
@ func_updated
The kernel has updated a function.
Definition idp.hpp:3018
@ compiler_changed
The kernel has changed the compiler information.
Definition idp.hpp:2925
@ adding_segm
A segment is being created.
Definition idp.hpp:3148
@ sgr_changed
The kernel has changed a segment register value.
Definition idp.hpp:3070
@ kernel_config_loaded
This event is issued when ida.cfg is parsed.
Definition idp.hpp:2912
@ changing_segm_end
Segment end address is to be changed.
Definition idp.hpp:2977
@ dirtree_segm_moved
Dirtree: inodes were changed due to a segment movement or a program rebasing.
Definition idp.hpp:3181
@ updating_tryblks
About to update tryblk information.
Definition idp.hpp:3062
@ dirtree_rminode
Dirtree: an inode became unavailable.
Definition idp.hpp:3177
@ frame_expanded
A frame type has been expanded/shrank.
Definition idp.hpp:3241
@ changing_range_cmt
Range comment is to be changed.
Definition idp.hpp:3111
@ renamed
The kernel has renamed a byte.
Definition idp.hpp:3092
@ op_ti_changed
An operand typestring (c/c++ prototype) has been changed.
Definition idp.hpp:2944
@ segm_added
A new segment has been created.
Definition idp.hpp:2958
@ extra_cmt_changed
An extra comment has been changed.
Definition idp.hpp:3122
@ cmt_changed
An item comment has been changed.
Definition idp.hpp:3107
@ auto_empty
Info: all analysis queues are empty.
Definition idp.hpp:2887
@ frame_created
A function frame has been created.
Definition idp.hpp:3217
@ idasgn_matched_ea
A FLIRT match has been found.
Definition idp.hpp:3246
@ lt_edm_changed
local type enum member has been changed
Definition idp.hpp:3265
@ ti_changed
An item typestring (c/c++ prototype) has been changed.
Definition idp.hpp:2934
@ destroyed_items
Instructions/data have been destroyed in [ea1,ea2).
Definition idp.hpp:3087
@ flow_chart_created
Gui has retrieved a function flow chart.
Definition idp.hpp:2921
@ loader_finished
External file loader finished its work.
Definition idp.hpp:2915
@ thunk_func_created
A thunk bit has been set for a function.
Definition idp.hpp:3036
@ segm_class_changed
Segment class has been changed.
Definition idp.hpp:2994
@ lt_edm_created
local type enum member has been added
Definition idp.hpp:3251
@ deleting_tryblks
About to delete tryblk information in given range.
Definition idp.hpp:3067
nodeidx64_t nodeidx_t
Definition netnode.hpp:114
unsigned short uint16
unsigned 16 bit value
Definition pro.h:346
unsigned int uint32
unsigned 32 bit value
Definition pro.h:348
qvector< int > intvec_t
vector of integers
Definition pro.h:2765
signed char sint8
signed 8 bit value
Definition pro.h:343
uint64 asize_t
Definition pro.h:423
uint32 bgcolor_t
background color in RGB
Definition pro.h:5012
uint8 op_dtype_t
Definition pro.h:460
adiff_t sval_t
signed value used by the processor.
Definition pro.h:446
int64 adiff_t
Definition pro.h:424
uint64 ea_t
Definition pro.h:421
int int32
signed 32 bit value
Definition pro.h:347
unsigned char uchar
unsigned 8 bit value
Definition pro.h:337
idaman size_t bufsize
Definition pro.h:600
uint64 sel_t
Definition pro.h:422
unsigned int uint
unsigned 32 bit value
Definition pro.h:339
qvector< ea_t > eavec_t
vector of addresses
Definition pro.h:2764
uint64 flags64_t
64-bit flags for each address
Definition pro.h:5009
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:381
ea_t tid_t
type id (for enums, structs, etc)
Definition pro.h:5010
char int8
signed 8 bit value
Definition pro.h:342
_qstring< char > qstring
regular string
Definition pro.h:3694
qvector< qstring > qstrvec_t
vector of strings
Definition pro.h:3697
Functions that deal with segments.
Describes the target assembler.
Definition idp.hpp:176
const char * a_comdef
"comm" (communal variable)
Definition idp.hpp:290
const char * a_oword
nullptr if not allowed
Definition idp.hpp:257
const char * a_align
"align" keyword
Definition idp.hpp:299
const char * cmnt
comment string (see also cmnt2)
Definition idp.hpp:245
const char * low8
low8 operation, should contain s for the operand
Definition idp.hpp:339
flags64_t ea_t ea_or_id
Definition idp.hpp:297
const char * a_sizeof_fmt
size of type (format string)
Definition idp.hpp:311
const char * a_yword
32-byte (256-bit) data; nullptr if not allowed requires AS2_YWORD
Definition idp.hpp:350
help_t help
Help screen number, 0 - no help.
Definition idp.hpp:240
const char * high8
high8
Definition idp.hpp:340
const char * a_equ
'equ' Used if AS_UNEQU is set
Definition idp.hpp:274
const char * end
end directive
Definition idp.hpp:244
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:271
const char * a_curip
current IP (instruction pointer) symbol in assembler
Definition idp.hpp:277
const char * esccodes
special chars that cannot appear as is in string and char literals
Definition idp.hpp:248
const char * a_double
double; 8bytes; nullptr if not allowed
Definition idp.hpp:259
const char * a_rva
'rva' keyword for image based offsets (see REFINFO_RVAOFF)
Definition idp.hpp:348
uint16 uflag
user defined flags (local only for IDP) you may define and use your own bits
Definition idp.hpp:237
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:344
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:255
const char * cmnt2
comment close string (usually nullptr) this is used to denote a string which closes comments,...
Definition idp.hpp:334
const char * a_xor
^ bit xor assembler time operation
Definition idp.hpp:307
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:253
const char * a_word
word directive
Definition idp.hpp:254
uint32 flag2
Secondary assembler feature bits
Definition idp.hpp:313
const char * a_shl
<< shift left assembler time operation
Definition idp.hpp:309
const char * origin
org directive
Definition idp.hpp:243
func_t func_t *const char * a_public
"public" name keyword. nullptr-use default, ""-do not generate
Definition idp.hpp:287
const char * a_qword
nullptr if not allowed
Definition idp.hpp:256
const char * a_shr
Definition idp.hpp:310
const char * high16
high16
Definition idp.hpp:342
const char * a_mod
% mod assembler time operation
Definition idp.hpp:304
const char * a_float
float; 4bytes; nullptr if not allowed
Definition idp.hpp:258
const char * a_tbyte
long double; nullptr if not allowed
Definition idp.hpp:260
uint32 flag
Assembler feature bits
Definition idp.hpp:177
const char * a_weak
"weak" name keyword. nullptr-use default, ""-do not generate
Definition idp.hpp:288
const char * a_include_fmt
the include directive (format string)
Definition idp.hpp:343
const char * a_seg
'seg ' prefix (example: push seg seg001)
Definition idp.hpp:275
const char *const * header
array of automatically generated header lines they appear at the start of disassembled text
Definition idp.hpp:241
const char * a_packreal
packed decimal real nullptr if not allowed
Definition idp.hpp:261
char lbrace
left brace used in complex expressions
Definition idp.hpp:301
const char * a_band
& bit and assembler time operation
Definition idp.hpp:305
char ascsep
string literal delimiter
Definition idp.hpp:246
const char * name
Assembler name (displayed in menus)
Definition idp.hpp:239
const char * a_extrn
"extern" name keyword
Definition idp.hpp:289
const char * a_zword
64-byte (512-bit) data; nullptr if not allowed requires AS2_ZWORD
Definition idp.hpp:352
const char * low16
low16
Definition idp.hpp:341
const char * a_dups
array keyword.
Definition idp.hpp:262
char rbrace
right brace used in complex expressions
Definition idp.hpp:302
const char * a_ascii
string literal directive
Definition idp.hpp:252
const char * a_bnot
~ bit not assembler time operation
Definition idp.hpp:308
char accsep
char constant delimiter
Definition idp.hpp:247
const char * a_bor
| bit or assembler time operation
Definition idp.hpp:306
Structure used to describe byte streams (for "ret" instruction and empirics)
Definition idp.hpp:62
uchar len
Definition idp.hpp:63
const uchar * bytes
Definition idp.hpp:64
defined as struct so it can be forward-declared
Definition idd.hpp:751
helper class to support 32bit addresses in ida64
Definition ida.hpp:1145
virtual ~event_listener_t()
Definition idp.hpp:425
size_t listener_flags
Definition idp.hpp:421
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:655
Processor-independent representation of a floating point value.
Definition ieee.h:98
Function type information (see tinfo_t::get_func_details())
Definition typeinf.hpp:4753
Information about a single function argument.
Definition typeinf.hpp:4683
Instruction operand information.
Definition idd.hpp:725
bool is_switch_insn(ea_t ea) const
Definition idp.hpp:2063
netnode ignore_micro
Definition idp.hpp:2045
void mark_epilog_insn(ea_t ea)
Definition idp.hpp:2059
void set_ignore_micro(ea_t ea, uchar im_type)
Definition idp.hpp:2055
bool should_ignore_micro(ea_t ea) const
Definition idp.hpp:2064
void term_ignore_micro(void)
Definition idp.hpp:2053
ea_t next_marked_insn(ea_t ea)
Definition idp.hpp:2057
void clr_ignore_micro(ea_t ea)
Definition idp.hpp:2056
char get_ignore_micro(ea_t ea) const
Definition idp.hpp:2054
void mark_prolog_insn(ea_t ea)
Definition idp.hpp:2058
bool is_prolog_insn(ea_t ea) const
Definition idp.hpp:2061
bool is_epilog_insn(ea_t ea) const
Definition idp.hpp:2062
void init_ignore_micro(void)
Definition idp.hpp:2052
void mark_switch_insn(ea_t ea)
Definition idp.hpp:2060
Internal representation of processor instructions.
Definition idp.hpp:102
uint32 feature
combination of Instruction feature bits
Definition idp.hpp:104
const char * name
instruction name
Definition idp.hpp:103
ea_helper_t & _eah
Definition idp.hpp:2073
processor_t & ph
Definition idp.hpp:2071
size_t reserved[8]
Definition idp.hpp:2074
modctx_t()
Definition idp.hpp:2075
asm_t & ash
Definition idp.hpp:2072
size_t owner
Definition idp.hpp:2144
virtual ~plugmod_t()
Virtual destructor.
Definition idp.hpp:2159
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:2150
Describes a processor module (IDP).
Definition idp.hpp:613
static ssize_t arch_changed()
Definition idp.hpp:2635
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:2395
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:2686
bool use64(void) const
PR_USE64
Definition idp.hpp:623
static ssize_t can_have_type(const op_t &op)
Definition idp.hpp:2356
static ssize_t use_stkarg_type(ea_t ea, const funcarg_t &arg)
Definition idp.hpp:2595
const char *const * reg_names
array of register names
Definition idp.hpp:1919
static ssize_t calc_spdelta(sval_t *spdelta, const insn_t &ins)
Definition idp.hpp:2423
static ssize_t assemble(uchar *_bin, ea_t ea, ea_t cs, ea_t ip, bool _use32, const char *line)
Definition idp.hpp:2210
int get_proc_index()
Definition idp.hpp:3292
bool is_lumina_usable() const
const asm_t *const * assemblers
pointer to array of target
Definition idp.hpp:671
uint32 get_canon_feature(uint16 itype) const
Get the instruction features (combination of Instruction feature bits)
Definition idp.hpp:1978
static ssize_t use_regarg_type(int *idx, ea_t ea, void *rargs)
Definition idp.hpp:2599
static ssize_t ana_insn(insn_t *out)
Definition idp.hpp:2214
static ssize_t get_operand_string(qstring *buf, const insn_t &insn, int opnum)
Definition idp.hpp:2471
static ssize_t undefine(ea_t ea)
Definition idp.hpp:2322
static ssize_t validate_flirt_func(ea_t start_ea, const char *funcname)
Definition idp.hpp:2467
static ssize_t _calc_varglocs(func_type_data_t *ftd, regobjs_t *regs, relobj_t *stkargs, int nfixed)
Definition idp.hpp:2586
static ssize_t clean_tbit(ea_t ea, regval_getter_t *_getreg, const regval_t ®values)
Definition idp.hpp:2561
size_t sizeof_ldbl() const
Get size of long double.
Definition idp.hpp:2787
static ssize_t out_insn(outctx_t &ctx)
Definition idp.hpp:2242
static ssize_t out_header(outctx_t &ctx)
Definition idp.hpp:2222
static ssize_t out_operand(outctx_t &ctx, const op_t &op)
Definition idp.hpp:2250
static ssize_t find_reg_value(uval_t *out, const insn_t &insn, int reg)
Definition idp.hpp:2431
static ssize_t set_code16_mode(ea_t ea, bool code16=true)
Definition idp.hpp:2521
event_t
Callback notification codes.
Definition idp.hpp:696
@ ev_get_stkarg_area_info
Get some metrics of the stack argument area.
Definition idp.hpp:1748
@ ev_coagulate_dref
Data reference is being analyzed.
Definition idp.hpp:1191
@ ev_next_exec_insn
Get next address to be executed This function must return the next address to be executed.
Definition idp.hpp:1465
@ ev_get_regfinder
Get pointer to the regfinder object.
Definition idp.hpp:1431
@ ev_calc_purged_bytes
Calculate number of purged bytes by the given function type.
Definition idp.hpp:1622
@ ev_get_procmod
Get pointer to the processor module object.
Definition idp.hpp:1363
@ ev_find_reg_value
Find register value via a register tracker.
Definition idp.hpp:1326
@ ev_endbinary
IDA has loaded a binary file.
Definition idp.hpp:726
@ ev_coagulate
Try to define some unexplored bytes.
Definition idp.hpp:866
@ ev_gen_src_file_lnnum
Callback: generate analog of:
Definition idp.hpp:843
@ ev_auto_queue_empty
One analysis queue is empty.
Definition idp.hpp:1226
@ ev_calc_retloc
Calculate return value location.
Definition idp.hpp:1628
@ ev_get_bg_color
Get item background color.
Definition idp.hpp:1093
@ ev_get_autocmt
Callback: get dynamic auto comment.
Definition idp.hpp:1083
@ ev_ana_insn
Analyze one instruction and fill 'out' structure.
Definition idp.hpp:751
@ ev_is_indirect_jump
Determine if instruction is an indirect jump.
Definition idp.hpp:960
@ ev_out_special_item
Generate text representation of an item in a special segment i.e.
Definition idp.hpp:829
@ ev_calc_next_eas
Calculate list of addresses the instruction in 'insn' may pass control to.
Definition idp.hpp:1487
@ ev_cvt64_hashval
perform 32-64 conversion for a hash value
Definition idp.hpp:1420
@ ev_gen_stkvar_def
Generate stack variable definition line Default line is varname = type ptr value, where 'type' is one...
Definition idp.hpp:1439
@ ev_newprc
Before changing processor type.
Definition idp.hpp:703
@ ev_adjust_libfunc_ea
Called when a signature module has been matched against bytes in the database.
Definition idp.hpp:1239
@ ev_may_show_sreg
The kernel wants to display the segment registers in the messages window.
Definition idp.hpp:1200
@ ev_is_jump_func
Is the function a trivial "jump" function?
Definition idp.hpp:1100
@ ev_newbinary
IDA is about to load a binary file.
Definition idp.hpp:719
@ ev_ending_undo
Ended undoing/redoing an action.
Definition idp.hpp:1349
@ ev_use_regarg_type
Use information about register argument.
Definition idp.hpp:1705
@ ev_out_mnem
Generate instruction mnemonics.
Definition idp.hpp:799
@ ev_loader_elf_machine
ELF loader machine type checkpoint.
Definition idp.hpp:1207
@ ev_cmp_operands
Compare instruction operands.
Definition idp.hpp:1039
@ ev_rename
The kernel is going to rename a byte.
Definition idp.hpp:889
@ ev_may_be_func
Can a function start here?
Definition idp.hpp:940
@ ev_get_macro_insn_head
Calculate the start of a macro instruction.
Definition idp.hpp:1497
@ ev_last_cb_before_loader
Definition idp.hpp:1754
@ ev_undefine
An item in the database (insn or data) is being deleted.
Definition idp.hpp:876
@ ev_calcrel
Reserved.
Definition idp.hpp:1325
@ ev_gen_regvar_def
Generate register variable definition line.
Definition idp.hpp:837
@ ev_get_default_enum_size
Get default enum size.
Definition idp.hpp:1600
@ ev_calc_varglocs
Calculate locations of the arguments that correspond to '...'.
Definition idp.hpp:1644
@ ev_set_proc_options
Called if the user specified an option string in the command line: -p<processor name>:<options>.
Definition idp.hpp:740
@ ev_privrange_changed
Privrange interval has been moved to a new location.
Definition idp.hpp:1398
@ ev_get_idd_opinfo
Get operand information.
Definition idp.hpp:1526
@ ev_is_align_insn
Is the instruction created only for alignment purposes?
Definition idp.hpp:994
@ ev_get_cc_regs
Get register allocation convention for given calling convention.
Definition idp.hpp:1603
@ ev_create_func_frame
Create a function frame for a newly created function Set up frame size, its attributes etc.
Definition idp.hpp:1126
@ ev_out_label
The kernel is going to generate an instruction label line or a function header.
Definition idp.hpp:822
@ ev_creating_segm
A new segment is about to be created.
Definition idp.hpp:854
@ ev_func_bounds
find_func_bounds() finished its work.
Definition idp.hpp:1108
@ ev_use_stkarg_type
Use information about a stack argument.
Definition idp.hpp:1697
@ ev_loader
This code and higher ones are reserved for the loaders.
Definition idp.hpp:1758
@ ev_last_cb_before_debugger
START OF DEBUGGER CALLBACKS.
Definition idp.hpp:1463
@ 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:1379
@ ev_del_cref
A code reference is being deleted.
Definition idp.hpp:1178
@ ev_getreg
IBM PC only internal request, should never be used for other purpose Get register value by internal i...
Definition idp.hpp:1303
@ ev_realcvt
Floating point -> IEEE conversion.
Definition idp.hpp:1269
@ ev_assemble
Assemble an instruction.
Definition idp.hpp:1250
@ ev_create_flat_group
Create special segment representing the flat group.
Definition idp.hpp:1297
@ ev_create_merge_handlers
Create merge handlers, if needed.
Definition idp.hpp:1392
@ ev_add_cref
A code reference is being created.
Definition idp.hpp:1164
@ ev_arg_addrs_ready
Argument address info is ready.
Definition idp.hpp:1725
@ ev_add_dref
A data reference is being created.
Definition idp.hpp:1171
@ ev_set_code16_mode
Some processors have ISA 16-bit mode e.g.
Definition idp.hpp:1353
@ ev_verify_sp
All function instructions have been analyzed.
Definition idp.hpp:1115
@ ev_clean_tbit
Clear the TF bit after an insn like pushf stored it in memory.
Definition idp.hpp:1519
@ ev_get_frame_retsize
Get size of function return address in bytes If this event is not implemented, the kernel will assume...
Definition idp.hpp:1132
@ ev_insn_reads_tbit
Check if insn will read the TF bit.
Definition idp.hpp:1511
@ ev_set_idp_options
Set IDP-specific configuration option Also see set_options_t in config.hpp.
Definition idp.hpp:729
@ ev_cvt64_supval
perform 32-64 conversion for a netnode array element
Definition idp.hpp:1409
@ ev_get_reg_accesses
Get info about the registers that are used/changed by an instruction.
Definition idp.hpp:1371
@ ev_emu_insn
Emulate instruction, create cross-references, plan to analyze subsequent instructions,...
Definition idp.hpp:759
@ ev_out_operand
Generate text representation of an instruction operand outctx_t provides functions to output the gene...
Definition idp.hpp:806
@ ev_decorate_name
Decorate/undecorate a C symbol name.
Definition idp.hpp:1732
@ ev_replaying_undo
Replaying an undo/redo buffer.
Definition idp.hpp:1344
@ ev_gen_asm_or_lst
Callback: generating asm or lst file.
Definition idp.hpp:1276
@ ev_init
The IDP module is just loaded.
Definition idp.hpp:697
@ ev_calc_arglocs
Calculate function argument locations.
Definition idp.hpp:1636
@ ev_get_reg_name
Generate text representation of a register.
Definition idp.hpp:1063
@ ev_out_insn
Generate text representation of an instruction in 'ctx.insn' outctx_t provides functions to output th...
Definition idp.hpp:792
@ ev_out_segend
Function to produce end of segment.
Definition idp.hpp:780
@ ev_term
The IDP module is being unloaded.
Definition idp.hpp:701
@ ev_out_data
Generate text representation of data items This function may change the database and create cross-ref...
Definition idp.hpp:814
@ ev_is_basic_block_end
Is the current instruction end of a basic block?
Definition idp.hpp:951
@ ev_use_arg_types
Use information about callee arguments.
Definition idp.hpp:1718
@ ev_calc_switch_cases
Calculate case values and targets for a custom jump table.
Definition idp.hpp:980
@ ev_can_have_type
Can the operand have a type as offset, segment, decimal, etc?
Definition idp.hpp:1031
@ ev_is_switch
Find 'switch' idiom or override processor module's decision.
Definition idp.hpp:970
@ ev_last_cb_before_type_callbacks
Definition idp.hpp:1577
@ ev_is_addr_insn
Does the instruction calculate some address using an immediate operand?
Definition idp.hpp:1450
@ ev_is_far_jump
is indirect far jump or call instruction?
Definition idp.hpp:900
@ ev_moving_segm
May the kernel move the segment?
Definition idp.hpp:859
@ ev_calc_step_over
Calculate the address of the instruction which will be executed after "step over".
Definition idp.hpp:1478
@ ev_is_call_insn
Is the instruction a "call"?
Definition idp.hpp:927
@ ev_max_ptr_size
Get maximal size of a pointer in bytes.
Definition idp.hpp:1596
@ ev_get_abi_info
Get all possible ABI names and optional extensions for given compiler abiname/option is a string enti...
Definition idp.hpp:1588
@ ev_validate_flirt_func
Flirt has recognized a library function.
Definition idp.hpp:1231
@ ev_equal_reglocs
Are 2 register arglocs the same?
Definition idp.hpp:1689
@ ev_str2reg
Convert a register name to a register number.
Definition idp.hpp:1074
@ ev_create_switch_xrefs
Create xrefs for a custom jump table.
Definition idp.hpp:988
@ ev_asm_installed
After setting a new assembler.
Definition idp.hpp:1367
@ ev_setup_til
Setup default type libraries.
Definition idp.hpp:1579
@ ev_extract_address
Extract address from a string.
Definition idp.hpp:1260
@ ev_is_ret_insn
Is the instruction a "return"?
Definition idp.hpp:933
@ ev_adjust_refinfo
Called from apply_fixup before converting operand to reference.
Definition idp.hpp:1046
@ ev_out_assumes
Function to produce assume directives when segment register value changes.
Definition idp.hpp:786
@ ev_find_op_value
Find operand value via a register tracker.
Definition idp.hpp:1335
@ ev_out_header
Function to produce start of disassembled text.
Definition idp.hpp:766
@ ev_update_call_stack
Calculate the call stack trace for the given thread.
Definition idp.hpp:1553
@ ev_get_reg_info
Get register information by its name.
Definition idp.hpp:1538
@ ev_gen_map_file
Generate map file.
Definition idp.hpp:1289
@ ev_is_sane_insn
Is the instruction sane for the current file type?
Definition idp.hpp:907
@ ev_broadcast
Broadcast call.
Definition idp.hpp:1388
@ ev_demangle_name
Demangle a C++ (or another language) name into a user-readable string.
Definition idp.hpp:1151
@ ev_is_alloca_probe
Does the function at 'ea' behave as __alloca_probe?
Definition idp.hpp:999
@ ev_calc_spdelta
Calculate amount of change to sp for the given insn.
Definition idp.hpp:1318
@ ev_arch_changed
The loader is done parsing arch-related information, which the processor module might want to use to ...
Definition idp.hpp:1741
@ ev_analyze_prolog
Analyzes function prolog, epilog, and updates purge, and function attributes.
Definition idp.hpp:1312
@ ev_get_code16_mode
Get ISA 16-bit mode.
Definition idp.hpp:1358
@ ev_is_cond_insn
Is conditional instruction?
Definition idp.hpp:921
@ ev_is_insn_table_jump
Reserved.
Definition idp.hpp:968
@ ev_verify_noreturn
The kernel wants to set 'noreturn' flags for a function.
Definition idp.hpp:1122
@ ev_get_dbr_opnum
Get the number of the operand to be displayed in the debugger reference view (text mode).
Definition idp.hpp:1504
@ ev_get_stkvar_scale_factor
Should stack variable references be multiplied by a coefficient before being used in the stack frame?
Definition idp.hpp:1143
@ ev_calc_cdecl_purged_bytes
Calculate number of purged bytes after call.
Definition idp.hpp:1617
@ ev_adjust_argloc
Adjust argloc according to its type/size and platform endianess.
Definition idp.hpp:1660
@ ev_get_operand_string
Request text string for operand (cli, java, ...).
Definition idp.hpp:1056
@ ev_out_footer
Function to produce end of disassembled text.
Definition idp.hpp:770
@ ev_oldfile
An old file has been loaded.
Definition idp.hpp:716
@ ev_treat_hindering_item
An item hinders creation of another item.
Definition idp.hpp:881
@ ev_out_segstart
Function to produce start of segment.
Definition idp.hpp:774
@ 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:1020
@ ev_newasm
Before setting a new assembler.
Definition idp.hpp:709
@ ev_newfile
A new file has been loaded.
Definition idp.hpp:713
@ ev_lower_func_type
Get function arguments which should be converted to pointers when lowering function prototype.
Definition idp.hpp:1672
@ ev_delay_slot_insn
Get delay slot instruction.
Definition idp.hpp:1004
@ ev_get_simd_types
Get SIMD-related types according to given attributes ant/or argument location.
Definition idp.hpp:1608
@ ev_del_dref
A data reference is being deleted.
Definition idp.hpp:1185
int cbsize(void)
for code segments
Definition idp.hpp:655
static ssize_t find_op_value(uval_t *out, const insn_t &insn, int op)
Definition idp.hpp:2435
int32 instruc_start
icode of the first instruction
Definition idp.hpp:1962
static ssize_t str2reg(const char *regname)
Definition idp.hpp:2447
static ssize_t newasm(int asmnum)
Definition idp.hpp:2174
int dbsize(void)
for non-code segments
Definition idp.hpp:656
void ensure_processor(void)
bool has_idp_opts(void) const
PR_IDP_OPTS
Definition idp.hpp:620
static ssize_t analyze_prolog(ea_t fct_ea)
Definition idp.hpp:2419
int32 reg_first_sreg
number of first segment register
Definition idp.hpp:1926
static ssize_t insn_reads_tbit(const insn_t &insn, regval_getter_t *_getreg, const regval_t ®values)
Definition idp.hpp:2545
static ssize_t is_call_insn(const insn_t &insn)
Definition idp.hpp:2340
bool is_canon_insn(uint16 itype) const
Does the given value specify a valid instruction for this instruction set?
Definition idp.hpp:1967
static ssize_t setup_til()
Definition idp.hpp:2565
static ssize_t is_sp_based(const insn_t &insn, const op_t &x)
Definition idp.hpp:2330
const regval_t &idaapi regval_getter_t(const char *name, const regval_t *regvalues)
Definition idp.hpp:677
static ssize_t create_switch_xrefs(ea_t jumpea, const switch_info_t &si)
Definition idp.hpp:2455
bool ti(void) const
PR_TYPEINFO
Definition idp.hpp:624
static ssize_t out_special_item(outctx_t &ctx, uchar segtype)
Definition idp.hpp:2262
ssize_t privrange_changed(const range_t &old_privrange, adiff_t delta, qstring *errbuf=nullptr)
Definition idp.hpp:2643
static ssize_t add_dref(ea_t from, ea_t to, dref_t type)
Definition idp.hpp:2479
static ssize_t is_cond_insn(const insn_t &insn)
Definition idp.hpp:2517
static ssize_t equal_reglocs(const argloc_t &a1, const argloc_t &a2)
Definition typeinf.hpp:6673
static ssize_t get_frame_retsize(int *retsize, const func_t *pfn)
Definition idp.hpp:2415
static ssize_t func_bounds(int *possible_return_code, func_t *pfn, ea_t max_func_end_ea)
Definition idp.hpp:2294
static ssize_t adjust_argloc(argloc_t *argloc, const tinfo_t *type, int size)
Definition idp.hpp:2623
int32 instruc_end
icode of the last instruction + 1
Definition idp.hpp:1963
static ssize_t is_switch(switch_info_t *si, const insn_t &insn)
Definition idp.hpp:2451
bool has_code16_bit(void) const
PR2_CODE16_BIT
Definition idp.hpp:628
static ssize_t calc_next_eas(eavec_t *res, const insn_t &insn, bool over)
Definition idp.hpp:2557
static ssize_t out_data(outctx_t &ctx, bool analyze_only)
Definition idp.hpp:2254
void * unused_slot
Reserved, currently equals to nullptr.
Definition idp.hpp:2004
static ssize_t create_flat_group(ea_t image_base, int bitness, sel_t dataseg_sel)
Definition idp.hpp:2371
static ssize_t max_ptr_size()
Definition idp.hpp:2569
bool use32(void) const
PR_USE64 or PR_USE32
Definition idp.hpp:622
uint32 flag
an ORed combination of Processor feature bits
Definition idp.hpp:617
static ssize_t arg_addrs_ready(ea_t caller, int n, const tinfo_t &tif, ea_t *addrs)
Definition idp.hpp:2619
static ssize_t adjust_libfunc_ea(const idasgn_t &sig, const libfunc_t &libfun, ea_t *ea)
Definition idp.hpp:2505
ssize_t cvt64_supval(nodeidx_t node, uchar tag, nodeidx_t idx, const uchar *data, size_t datlen, qstring *errbuf=nullptr)
Definition idp.hpp:2647
static ssize_t gen_asm_or_lst(bool starting, FILE *fp, bool is_asm, int flags, void *outline)
Definition idp.hpp:2383
static ssize_t oldfile(const char *fname)
Definition idp.hpp:2194
bool delay_slot_insn(ea_t *ea, bool *bexec, bool *fexec)
Helper function to get the delay slot instruction.
Definition idp.hpp:2835
static ssize_t lower_func_type(intvec_t *argnums, func_type_data_t *fti)
Definition idp.hpp:2627
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:207
const instruc_t * instruc
Array of instructions.
Definition idp.hpp:1969
static ssize_t term()
Definition idp.hpp:2166
static ssize_t is_align_insn(ea_t ea)
Definition idp.hpp:2348
static bool get_code16_mode(ea_t ea)
Definition idp.hpp:2525
static ssize_t emu_insn(const insn_t &insn)
Definition idp.hpp:2218
static ssize_t endbinary(bool ok)
Definition idp.hpp:2202
bool has_segregs(void) const
PR_SEGS
Definition idp.hpp:621
static ssize_t newprc(int pnum, bool keep_cfg)
Definition idp.hpp:2170
static ssize_t notify(event_t event_code,...)
Definition idp.hpp:1766
static ssize_t extract_address(ea_t *out_ea, ea_t screen_ea, const char *string, size_t x)
Definition idp.hpp:2443
static ssize_t cmp_operands(const op_t &op1, const op_t &op2)
Definition idp.hpp:2306
size_t tbyte_size
Size of long double (tbyte) for this processor (meaningful only if asm_t::a_tbyte !...
Definition idp.hpp:1986
ssize_t cvt64_hashval(nodeidx_t node, uchar tag, const char *name, const uchar *data, size_t datlen, qstring *errbuf=nullptr)
Definition idp.hpp:2651
bool stkup(void) const
PR_STACK_UP
Definition idp.hpp:625
bool use_tbyte(void) const
PR_USE_TBYTE
Definition idp.hpp:626
static ssize_t update_call_stack(call_stack_t *stack, int tid, regval_getter_t *_getreg, const regval_t ®values)
Definition idp.hpp:2553
const char *const * psnames
short processor names (nullptr terminated).
Definition idp.hpp:663
static ssize_t del_cref(ea_t from, ea_t to, bool expand)
Definition idp.hpp:2483
static ssize_t gen_stkvar_def(outctx_t &ctx, const struct udm_t *mptr, sval_t v, tid_t tid)
Definition idp.hpp:2266
int32 segreg_size
size of a segment register in bytes
Definition idp.hpp:1928
static ssize_t is_jump_func(func_t *pfn, ea_t *jump_target, ea_t *func_pointer)
Definition idp.hpp:2310
bool calcrel_in_bits(void) const
PR2_REL_BITS
Definition idp.hpp:631
static ssize_t gen_map_file(int *nlines, FILE *fp)
Definition idp.hpp:2387
static const char * set_idp_options(const char *keyword, int vtype, const void *value, bool idb_loaded=true)
Definition idp.hpp:2495
static ssize_t getreg(uval_t *rv, int regnum)
Definition idp.hpp:2318
int32 reg_code_sreg
number of CS register
Definition idp.hpp:1936
bool supports_macros(void) const
PR2_MACRO
Definition idp.hpp:629
static ssize_t out_footer(outctx_t &ctx)
Definition idp.hpp:2226
static ssize_t _calc_retloc(argloc_t *retloc, const tinfo_t &rettype, callcnv_t cc)
Definition idp.hpp:2581
static ssize_t newbinary(const char *filename, qoff64_t fileoff, ea_t basepara, ea_t binoff, uint64 nbytes)
Definition idp.hpp:2198
const bytes_t * codestart
Array of typical code start sequences.
Definition idp.hpp:1943
int get_default_segm_bitness(bool is_64bit_app) const
Get default segment bitness.
Definition idp.hpp:638
static ssize_t create_func_frame(func_t *pfn)
Definition idp.hpp:2411
int32 dnbits
Number of bits in a byte for non-code segments (usually 8).
Definition idp.hpp:647
bool use_mappings(void) const
PR2_MAPPINGS
Definition idp.hpp:627
const char * get_canon_mnem(uint16 itype) const
Get the instruction name.
Definition idp.hpp:1972
static void auto_queue_empty(int type)
Definition idp.hpp:2290
static ssize_t out_label(outctx_t &ctx, const char *colored_name)
Definition idp.hpp:2258
static ssize_t get_stkvar_scale_factor()
Definition idp.hpp:2363
static ssize_t out_segend(outctx_t &ctx, segment_t *seg)
Definition idp.hpp:2234
static ssize_t get_simd_types(void *out, const simd_info_t *simd_attrs, const argloc_t *argloc, bool create_tifs)
Definition idp.hpp:2615
int32 reg_last_sreg
number of last segment register
Definition idp.hpp:1927
static ssize_t is_control_flow_guard(int *p_reg, const insn_t *insn)
Definition idp.hpp:2186
static ssize_t out_mnem(outctx_t &ctx)
Definition idp.hpp:2246
static ssize_t gen_src_file_lnnum(outctx_t &ctx, const char *file, size_t lnnum)
Definition idp.hpp:2274
static ssize_t adjust_refinfo(refinfo_t *ri, ea_t ea, int n, const fixup_data_t &fd)
Definition idp.hpp:2513
char real_width[4]
Number of digits in floating numbers after the decimal point.
Definition idp.hpp:1998
static ssize_t add_cref(ea_t from, ea_t to, cref_t type)
Definition idp.hpp:2475
const bytes_t * retcodes
Array of 'return' instruction opcodes.
Definition idp.hpp:1949
int32 icode_return
Icode of return instruction. It is ok to give any of possible return instructions.
Definition idp.hpp:2001
static ssize_t coagulate_dref(ea_t from, ea_t to, bool may_define, ea_t *code_ea)
Definition idp.hpp:2491
static ssize_t set_proc_options(const char *options, int confidence)
Definition idp.hpp:2501
static ssize_t is_indirect_jump(const insn_t &insn)
Definition idp.hpp:2399
uint32 flag2
an ORed combination of Processor additional feature bits
Definition idp.hpp:618
static ssize_t is_ret_insn(const insn_t &insn, uchar iri_flags)
Definition idp.hpp:2344
static ssize_t get_cc_regs(callregs_t *regs, callcnv_t cc)
Definition idp.hpp:2611
static ssize_t may_show_sreg(ea_t current_ea)
Definition idp.hpp:2282
static ssize_t calc_step_over(ea_t *target, ea_t ip)
Definition idp.hpp:2533
static ssize_t is_addr_insn(int *type, const insn_t &insn)
Definition idp.hpp:2352
static fpvalue_error_t realcvt(void *m, fpvalue_t *e, uint16 swt)
Definition idp.hpp:2509
int get_stkvar_scale(void)
Get the stack variable scaling factor.
Definition idp.hpp:1906
bool supports_calcrel(void) const
PR2_USE_CALCREL
Definition idp.hpp:630
static ssize_t del_dref(ea_t from, ea_t to)
Definition idp.hpp:2487
static ssize_t asm_installed(int asmnum)
Definition idp.hpp:2178
static ssize_t creating_segm(segment_t *seg)
Definition idp.hpp:2206
static ssize_t is_basic_block_end(const insn_t &insn, bool call_insn_stops_block)
Definition idp.hpp:2314
static ssize_t calc_cdecl_purged_bytes(ea_t ea)
Definition idp.hpp:2576
static ssize_t demangle_name(int32 *res, qstring *out, const char *name, uint32 disable_mask, int demreq)
Definition idp.hpp:2367
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 ®values)
Definition idp.hpp:2549
static ssize_t out_segstart(outctx_t &ctx, segment_t *seg)
Definition idp.hpp:2230
static ssize_t newfile(const char *fname)
Definition idp.hpp:2190
static ssize_t calc_switch_cases(void *casevec, eavec_t *targets, ea_t insn_ea, const switch_info_t &si)
Definition idp.hpp:2459
int32 version
Expected kernel version, should be IDP_INTERFACE_VERSION.
Definition idp.hpp:614
static ssize_t get_bg_color(bgcolor_t *color, ea_t ea)
Definition idp.hpp:2463
static reg_finder_t * get_regfinder()
Definition idp.hpp:2655
static ssize_t get_autocmt(qstring *buf, const insn_t &insn)
Definition idp.hpp:2391
static ssize_t _calc_arglocs(func_type_data_t *fti)
Definition idp.hpp:2591
static ssize_t is_sane_insn(const insn_t &insn, int no_crefs)
Definition idp.hpp:2302
static ssize_t get_macro_insn_head(ea_t *head, ea_t ip)
Definition idp.hpp:2537
static ssize_t create_merge_handlers(merge_data_t *md)
Definition idp.hpp:2639
int32 id
one of Processor IDs
Definition idp.hpp:616
static ssize_t is_far_jump(int icode)
Definition idp.hpp:2336
const char *const * plnames
long processor names (nullptr terminated).
Definition idp.hpp:665
static ssize_t get_abi_info(qstrvec_t *abi_names, qstrvec_t *abi_opts, comp_t comp)
Definition idp.hpp:2631
bool is_funcarg_off(const func_t *pfn, uval_t frameoff) const
Does the given offset lie within the arguments section?
Definition frame.hpp:196
static ssize_t get_dbr_opnum(int *opnum, const insn_t &insn)
Definition idp.hpp:2541
static ssize_t use_arg_types(ea_t ea, func_type_data_t *fti, void *rargs)
Definition idp.hpp:2603
static ssize_t is_alloca_probe(ea_t ea)
Definition idp.hpp:2375
static ssize_t next_exec_insn(ea_t *target, ea_t ea, int tid, regval_getter_t *_getreg, const regval_t ®values)
Definition idp.hpp:2529
static ssize_t verify_sp(func_t *pfn)
Definition idp.hpp:2407
int32 cnbits
Number of bits in a byte for code segments (usually 8).
Definition idp.hpp:643
int32 regs_num
number of registers
Definition idp.hpp:1920
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:2439
static ssize_t _decorate_name(qstring *outbuf, const char *name, bool mangle, callcnv_t cc, const tinfo_t &type)
Definition typeinf.hpp:6682
static ssize_t rename(ea_t ea, const char *new_name, int flags)
Definition idp.hpp:2278
int32 reg_data_sreg
number of DS register
Definition idp.hpp:1937
static ssize_t calcrel(bytevec_t *out_relbits, size_t *out_consumed, ea_t ea)
Definition idp.hpp:2427
hook_cb_t * _notify
Event notification handler.
Definition idp.hpp:1765
static ssize_t gen_regvar_def(outctx_t &ctx, regvar_t *v)
Definition idp.hpp:2270
static ssize_t may_be_func(const insn_t &insn, int state)
Definition idp.hpp:2298
static ssize_t out_assumes(outctx_t &ctx)
Definition idp.hpp:2238
static ssize_t moving_segm(segment_t *seg, ea_t to, int flags)
Definition idp.hpp:2326
static ssize_t coagulate(ea_t start_ea)
Definition idp.hpp:2286
static ssize_t get_reg_name(qstring *buf, int reg, size_t width, int reghi)
Definition idp.hpp:2379
static ssize_t get_reg_accesses(reg_accesses_t *accvec, const insn_t &insn, int flags)
Definition idp.hpp:2182
static ssize_t calc_purged_bytes(int *p_purged_bytes, const func_type_data_t &fti)
Definition idp.hpp:2607
static ssize_t verify_noreturn(func_t *pfn)
Definition idp.hpp:2403
static ssize_t init(const char *idp_modname)
Definition idp.hpp:2162
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:2099
size_t procmod_flags
Definition idp.hpp:2086
procmod_t()
Definition idp.hpp:2088
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:2092
const op_t * make_op_displ(op_t *op, int base_reg, uval_t displ, int8 dtype=-1) const
Definition idp.hpp:2106
op_dtype_t calc_op_dtype(sint8 dtype) const
Definition idp.hpp:2133
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:2119
Base class for an range.
Definition range.hpp:35
Information about a reference.
Definition nalt.hpp:1010
Information about a register accessed by an instruction.
Definition idp.hpp:2740
uchar opnum
operand number
Definition idp.hpp:2744
int regnum
register number (only entire registers)
Definition idp.hpp:2741
access_type_t access_type
Definition idp.hpp:2743
bool operator==(const reg_access_t &r) const
Definition idp.hpp:2751
bool operator!=(const reg_access_t &r) const
Definition idp.hpp:2759
bitrange_t range
bitrange inside the register
Definition idp.hpp:2742
bool have_common_bits(const reg_access_t &r) const
Definition idp.hpp:2746
Definition regfinder.hpp:821
Get register number and size from register name.
Definition idp.hpp:2705
int size
register size
Definition idp.hpp:2707
DECLARE_COMPARISONS(reg_info_t)
Definition idp.hpp:2708
int reg
register number
Definition idp.hpp:2706
Definition typeinf.hpp:6044
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:440
Relocatable object.
Definition pro.h:4026
SIMD type info.
Definition typeinf.hpp:4584
Definition typeinf.hpp:1518
Information about a switch statement.
Definition nalt.hpp:710
An object to represent struct or union members.
Definition typeinf.hpp:5300
Functions that deal with the disassembling of program instructions.