Contains definition of the interface to IDP modules. More...
Classes | |
struct | bytes_t |
Structure used to describe byte streams (for "ret" instruction and empirics) More... | |
struct | instruc_t |
Internal representation of processor instructions. More... | |
struct | asm_t |
Describes the target assembler. More... | |
struct | event_listener_t |
struct | processor_t |
Describes a processor module (IDP). More... | |
struct | ignore_micro_t |
struct | modctx_t |
struct | procmod_t |
struct | plugmod_t |
struct | reg_info_t |
Get register number and size from register name. More... | |
struct | reg_access_t |
Information about a register accessed by an instruction. More... | |
struct | reg_accesses_t |
Namespaces | |
namespace | idb_event |
IDB event group. | |
Macros | |
#define | IDP_INTERFACE_VERSION 700 |
The interface version number. More... | |
#define | CF_STOP 0x00001 |
Instruction doesn't pass execution to the next instruction. | |
#define | CF_CALL 0x00002 |
CALL instruction (should make a procedure here) | |
#define | CF_CHG1 0x00004 |
The instruction modifies the first operand. | |
#define | CF_CHG2 0x00008 |
The instruction modifies the second operand. | |
#define | CF_CHG3 0x00010 |
The instruction modifies the third operand. | |
#define | CF_CHG4 0x00020 |
The instruction modifies 4 operand. | |
#define | CF_CHG5 0x00040 |
The instruction modifies 5 operand. | |
#define | CF_CHG6 0x00080 |
The instruction modifies 6 operand. | |
#define | CF_USE1 0x00100 |
The instruction uses value of the first operand. | |
#define | CF_USE2 0x00200 |
The instruction uses value of the second operand. | |
#define | CF_USE3 0x00400 |
The instruction uses value of the third operand. | |
#define | CF_USE4 0x00800 |
The instruction uses value of the 4 operand. | |
#define | CF_USE5 0x01000 |
The instruction uses value of the 5 operand. | |
#define | CF_USE6 0x02000 |
The instruction uses value of the 6 operand. | |
#define | CF_JUMP 0x04000 |
The instruction passes execution using indirect jump or call (thus needs additional analysis) | |
#define | CF_SHFT 0x08000 |
Bit-shift instruction (shl,shr...) | |
#define | CF_HLL 0x10000 |
Instruction may be present in a high level language function. | |
#define | CF_CHG7 0x020000 |
The instruction modifies the 7th operand. | |
#define | CF_CHG8 0x040000 |
The instruction modifies the 8th operand. | |
#define | CF_USE7 0x080000 |
The instruction uses value of the 7th operand. | |
#define | CF_USE8 0x100000 |
The instruction uses value of the 8th operand. | |
#define | AS_OFFST 0x00000001L |
offsets are 'offset xxx' ? | |
#define | AS_COLON 0x00000002L |
create colons after data names ? | |
#define | AS_UDATA 0x00000004L |
can use '?' in data directives | |
#define | AS_2CHRE 0x00000008L |
double char constants are: "xy | |
#define | AS_NCHRE 0x00000010L |
char constants are: 'x | |
#define | AS_N2CHR 0x00000020L |
can't have 2 byte char consts | |
#define | AS_1TEXT 0x00000040L |
1 text per line, no bytes | |
#define | AS_NHIAS 0x00000080L |
no characters with high bit | |
#define | AS_NCMAS 0x00000100L |
no commas in ascii directives | |
#define | AS_HEXFM 0x00000E00L |
mask - hex number format | |
#define | ASH_HEXF0 0x00000000L |
34h | |
#define | ASH_HEXF1 0x00000200L |
h'34 | |
#define | ASH_HEXF2 0x00000400L |
34 | |
#define | ASH_HEXF3 0x00000600L |
0x34 | |
#define | ASH_HEXF4 0x00000800L |
$34 | |
#define | ASH_HEXF5 0x00000A00L |
<^R > (radix) | |
#define | AS_DECFM 0x00003000L |
mask - decimal number format | |
#define | ASD_DECF0 0x00000000L |
34 | |
#define | ASD_DECF1 0x00001000L |
#34 | |
#define | ASD_DECF2 0x00002000L |
34. | |
#define | ASD_DECF3 0x00003000L |
.34 | |
#define | AS_OCTFM 0x0001C000L |
mask - octal number format | |
#define | ASO_OCTF0 0x00000000L |
123o | |
#define | ASO_OCTF1 0x00004000L |
0123 | |
#define | ASO_OCTF2 0x00008000L |
123 | |
#define | ASO_OCTF3 0x0000C000L |
@123 | |
#define | ASO_OCTF4 0x00010000L |
o'123 | |
#define | ASO_OCTF5 0x00014000L |
123q | |
#define | ASO_OCTF6 0x00018000L |
~123 | |
#define | ASO_OCTF7 0x0001C000L |
q'123 | |
#define | AS_BINFM 0x000E0000L |
mask - binary number format | |
#define | ASB_BINF0 0x00000000L |
010101b | |
#define | ASB_BINF1 0x00020000L |
^B010101 | |
#define | ASB_BINF2 0x00040000L |
%010101 | |
#define | ASB_BINF3 0x00060000L |
0b1010101 | |
#define | ASB_BINF4 0x00080000L |
b'1010101 | |
#define | ASB_BINF5 0x000A0000L |
b'1010101' | |
#define | AS_UNEQU 0x00100000L |
replace undefined data items with EQU (for ANTA's A80) | |
#define | AS_ONEDUP 0x00200000L |
One array definition per line. | |
#define | AS_NOXRF 0x00400000L |
Disable xrefs during the output file generation. | |
#define | AS_XTRNTYPE 0x00800000L |
Assembler understands type of extern symbols as ":type" suffix. | |
#define | AS_RELSUP 0x01000000L |
Checkarg: 'and','or','xor' operations with addresses are possible. | |
#define | AS_LALIGN 0x02000000L |
Labels at "align" keyword are supported. | |
#define | AS_NOCODECLN 0x04000000L |
don't create colons after code names | |
#define | AS_NOSPACE 0x10000000L |
No spaces in expressions. | |
#define | AS_ALIGN2 0x20000000L |
.align directive expects an exponent rather than a power of 2 (.align 5 means to align at 32byte boundary) | |
#define | AS_ASCIIC 0x40000000L |
ascii directive accepts C-like escape sequences (\n,\x01 and similar) | |
#define | AS_ASCIIZ 0x80000000L |
ascii directive inserts implicit zero byte at the end | |
#define | AS2_BRACE 0x00000001 |
Use braces for all expressions. | |
#define | AS2_STRINV 0x00000002 |
Invert meaning of idainfo::wide_high_byte_first for text strings (for processors with bytes bigger than 8 bits) | |
#define | AS2_BYTE1CHAR 0x00000004 |
One symbol per processor byte. More... | |
#define | AS2_IDEALDSCR 0x00000008 |
Description of struc/union is in the 'reverse' form (keyword before name), the same as in borland tasm ideal. | |
#define | AS2_TERSESTR 0x00000010 |
'terse' structure initialization form; NAME<fld,fld,...> is supported | |
#define | AS2_COLONSUF 0x00000020 |
addresses may have ":xx" suffix; this suffix must be ignored when extracting the address under the cursor | |
#define | AS2_YWORD 0x00000040 |
a_yword field is present and valid | |
#define | AS2_ZWORD 0x00000080 |
a_zword field is present and valid | |
#define | HKCB_GLOBAL 0x0001 |
is global event listener? if true, the listener will survive database closing and opening. More... | |
#define | DECLARE_LISTENER(listener_type, ctx_type, ctx_name) |
Declare listener with a context. More... | |
#define | PLFM_386 0 |
Intel 80x86. | |
#define | PLFM_Z80 1 |
8085, Z80 | |
#define | PLFM_I860 2 |
Intel 860. | |
#define | PLFM_8051 3 |
8051 | |
#define | PLFM_TMS 4 |
Texas Instruments TMS320C5x. | |
#define | PLFM_6502 5 |
6502 | |
#define | PLFM_PDP 6 |
PDP11. | |
#define | PLFM_68K 7 |
Motorola 680x0. | |
#define | PLFM_JAVA 8 |
Java. | |
#define | PLFM_6800 9 |
Motorola 68xx. | |
#define | PLFM_ST7 10 |
SGS-Thomson ST7. | |
#define | PLFM_MC6812 11 |
Motorola 68HC12. | |
#define | PLFM_MIPS 12 |
MIPS. | |
#define | PLFM_ARM 13 |
Advanced RISC Machines. | |
#define | PLFM_TMSC6 14 |
Texas Instruments TMS320C6x. | |
#define | PLFM_PPC 15 |
PowerPC. | |
#define | PLFM_80196 16 |
Intel 80196. | |
#define | PLFM_Z8 17 |
Z8. | |
#define | PLFM_SH 18 |
Renesas (formerly Hitachi) SuperH. | |
#define | PLFM_NET 19 |
Microsoft Visual Studio.Net. | |
#define | PLFM_AVR 20 |
Atmel 8-bit RISC processor(s) | |
#define | PLFM_H8 21 |
Hitachi H8/300, H8/2000. | |
#define | PLFM_PIC 22 |
Microchip's PIC. | |
#define | PLFM_SPARC 23 |
SPARC. | |
#define | PLFM_ALPHA 24 |
DEC Alpha. | |
#define | PLFM_HPPA 25 |
Hewlett-Packard PA-RISC. | |
#define | PLFM_H8500 26 |
Hitachi H8/500. | |
#define | PLFM_TRICORE 27 |
Tasking Tricore. | |
#define | PLFM_DSP56K 28 |
Motorola DSP5600x. | |
#define | PLFM_C166 29 |
Siemens C166 family. | |
#define | PLFM_ST20 30 |
SGS-Thomson ST20. | |
#define | PLFM_IA64 31 |
Intel Itanium IA64. | |
#define | PLFM_I960 32 |
Intel 960. | |
#define | PLFM_F2MC 33 |
Fujistu F2MC-16. | |
#define | PLFM_TMS320C54 34 |
Texas Instruments TMS320C54xx. | |
#define | PLFM_TMS320C55 35 |
Texas Instruments TMS320C55xx. | |
#define | PLFM_TRIMEDIA 36 |
Trimedia. | |
#define | PLFM_M32R 37 |
Mitsubishi 32bit RISC. | |
#define | PLFM_NEC_78K0 38 |
NEC 78K0. | |
#define | PLFM_NEC_78K0S 39 |
NEC 78K0S. | |
#define | PLFM_M740 40 |
Mitsubishi 8bit. | |
#define | PLFM_M7700 41 |
Mitsubishi 16bit. | |
#define | PLFM_ST9 42 |
ST9+. | |
#define | PLFM_FR 43 |
Fujitsu FR Family. | |
#define | PLFM_MC6816 44 |
Motorola 68HC16. | |
#define | PLFM_M7900 45 |
Mitsubishi 7900. | |
#define | PLFM_TMS320C3 46 |
Texas Instruments TMS320C3. | |
#define | PLFM_KR1878 47 |
Angstrem KR1878. | |
#define | PLFM_AD218X 48 |
Analog Devices ADSP 218X. | |
#define | PLFM_OAKDSP 49 |
Atmel OAK DSP. | |
#define | PLFM_TLCS900 50 |
Toshiba TLCS-900. | |
#define | PLFM_C39 51 |
Rockwell C39. | |
#define | PLFM_CR16 52 |
NSC CR16. | |
#define | PLFM_MN102L00 53 |
Panasonic MN10200. | |
#define | PLFM_TMS320C1X 54 |
Texas Instruments TMS320C1x. | |
#define | PLFM_NEC_V850X 55 |
NEC V850 and V850ES/E1/E2. | |
#define | PLFM_SCR_ADPT 56 |
Processor module adapter for processor modules written in scripting languages. | |
#define | PLFM_EBC 57 |
EFI Bytecode. | |
#define | PLFM_MSP430 58 |
Texas Instruments MSP430. | |
#define | PLFM_SPU 59 |
Cell Broadband Engine Synergistic Processor Unit. | |
#define | PLFM_DALVIK 60 |
Android Dalvik Virtual Machine. | |
#define | PLFM_65C816 61 |
65802/65816 | |
#define | PLFM_M16C 62 |
Renesas M16C. | |
#define | PLFM_ARC 63 |
Argonaut RISC Core. | |
#define | PLFM_UNSP 64 |
SunPlus unSP. | |
#define | PLFM_TMS320C28 65 |
Texas Instruments TMS320C28x. | |
#define | PLFM_DSP96K 66 |
Motorola DSP96000. | |
#define | PLFM_SPC700 67 |
Sony SPC700. | |
#define | PLFM_AD2106X 68 |
Analog Devices ADSP 2106X. | |
#define | PLFM_PIC16 69 |
Microchip's 16-bit PIC. | |
#define | PLFM_S390 70 |
IBM's S390. | |
#define | PLFM_XTENSA 71 |
Tensilica Xtensa. | |
#define | PLFM_RISCV 72 |
RISC-V. | |
#define | PLFM_RL78 73 |
Renesas RL78. | |
#define | PLFM_RX 74 |
Renesas RX. | |
#define | PR_SEGS 0x000001 |
has segment registers? | |
#define | PR_USE32 0x000002 |
supports 32-bit addressing? | |
#define | PR_DEFSEG32 0x000004 |
segments are 32-bit by default | |
#define | PR_RNAMESOK 0x000008 |
allow user register names for location names | |
#define | PR_ADJSEGS 0x000020 |
IDA may adjust segments' starting/ending addresses. | |
#define | PR_DEFNUM 0x0000C0 |
mask - default number representation | |
#define | PRN_HEX 0x000000 |
hex | |
#define | PRN_OCT 0x000040 |
octal | |
#define | PRN_DEC 0x000080 |
decimal | |
#define | PRN_BIN 0x0000C0 |
binary | |
#define | PR_WORD_INS 0x000100 |
instruction codes are grouped 2bytes in binary line prefix | |
#define | PR_NOCHANGE 0x000200 |
The user can't change segments and code/data attributes (display only) | |
#define | PR_ASSEMBLE 0x000400 |
Module has a built-in assembler and will react to ev_assemble. | |
#define | PR_ALIGN 0x000800 |
All data items should be aligned properly. | |
#define | PR_TYPEINFO 0x001000 |
the processor module fully supports type information callbacks; without full support, function argument locations and other things will probably be wrong. More... | |
#define | PR_USE64 0x002000 |
supports 64-bit addressing? | |
#define | PR_SGROTHER 0x004000 |
the segment registers don't contain the segment selectors. | |
#define | PR_STACK_UP 0x008000 |
the stack grows up | |
#define | PR_BINMEM 0x010000 |
the processor module provides correct segmentation for binary files (i.e. it creates additional segments). More... | |
#define | PR_SEGTRANS 0x020000 |
the processor module supports the segment translation feature (meaning it calculates the code addresses using the map_code_ea() function) | |
#define | PR_CHK_XREF 0x040000 |
don't allow near xrefs between segments with different bases | |
#define | PR_NO_SEGMOVE 0x080000 |
the processor module doesn't support move_segm() (i.e. More... | |
#define | PR_USE_ARG_TYPES 0x200000 |
use processor_t::use_arg_types callback | |
#define | PR_SCALE_STKVARS 0x400000 |
use processor_t::get_stkvar_scale callback | |
#define | PR_DELAYED 0x800000 |
has delayed jumps and calls. More... | |
#define | PR_ALIGN_INSN 0x1000000 |
allow ida to create alignment instructions arbitrarily. More... | |
#define | PR_PURGING 0x2000000 |
there are calling conventions which may purge bytes from the stack | |
#define | PR_CNDINSNS 0x4000000 |
has conditional instructions | |
#define | PR_USE_TBYTE 0x8000000 |
BTMT_SPECFLT means _TBYTE type | |
#define | PR_DEFSEG64 0x10000000 |
segments are 64-bit by default | |
#define | PR_OUTER 0x20000000 |
has outer operands (currently only mc68k) | |
#define | PR2_MAPPINGS 0x000001 |
the processor module uses memory mapping | |
#define | PR2_IDP_OPTS 0x000002 |
the module has processor-specific configuration options | |
#define | PR2_REALCVT 0x000004 |
the module has a custom 'ev_realcvt' implementation (otherwise IEEE-754 format is assumed) | |
#define | PR2_CODE16_BIT 0x000008 |
low bit of code addresses has special meaning e.g. More... | |
#define | PR2_MACRO 0x000010 |
processor supports macro instructions | |
#define | PR2_USE_CALCREL 0x000020 |
(Lumina) the module supports calcrel info | |
#define | PR2_REL_BITS 0x000040 |
(Lumina) calcrel info has bits granularity, not bytes - construction flag only | |
#define | PR2_FORCE_16BIT 0x000080 |
use 16-bit basic types despite of 32-bit segments (used by c166) | |
#define | OP_FP_BASED 0x00000000 |
operand is FP based | |
#define | OP_SP_BASED 0x00000001 |
operand is SP based | |
#define | OP_SP_ADD 0x00000000 |
operand value is added to the pointer | |
#define | OP_SP_SUB 0x00000002 |
operand value is subtracted from the pointer | |
#define | CUSTOM_INSN_ITYPE 0x8000 |
Custom instruction codes defined by processor extension plugins must be greater than or equal to this. | |
#define | REG_SPOIL 0x80000000L |
processor_t::use_regarg_type uses this bit in the return value to indicate that the register value has been spoiled | |
#define | PH (*get_ph()) |
#define | ASH (*get_ash()) |
#define | EAH (get_modctx()->eah) |
#define | HEXDSP get_hexdsp() |
#define | SET_MODULE_DATA(type) (type *)set_module_data(&data_id, new type) |
#define | GET_MODULE_DATA(type) ((type *)get_module_data(data_id)) |
Ignore micro | |
netnode to keep information about various kinds of instructions | |
#define | IM_NONE 0 |
#define | IM_PROLOG 1 |
#define | IM_EPILOG 2 |
#define | IM_SWITCH 3 |
Typedefs | |
typedef int | help_t |
message id from ida.hlp | |
typedef void * | hexdsp_t(int code,...) |
Hex-Rays decompiler dispatcher. More... | |
typedef qvector< reg_info_t > | reginfovec_t |
vector of register info objects | |
typedef qvector< reg_access_t > | reg_access_vec_t |
Functions | |
THREAD_SAFE bool | has_cf_chg (uint32 feature, uint opnum) |
Does an instruction with the specified feature modify the i-th operand? | |
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? | |
idaman bool ida_export | has_insn_feature (uint16 icode, uint32 bit) |
Does the specified instruction have the specified feature? | |
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, bool strict=true) |
Is the instruction a "return"? | |
idaman bool ida_export | is_indirect_jump_insn (const insn_t &insn) |
Is the instruction an indirect jump? | |
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? | |
CASSERT (sizeof(asm_t)==212) | |
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. More... | |
idaman bool ida_export | unhook_event_listener (hook_type_t hook_type, event_listener_t *cb) |
Uninstall an event listener. More... | |
idaman void ida_export | remove_event_listener (event_listener_t *cb) |
remove all hooks in all databases for specified event_listener object | |
CASSERT (sizeof(processor_t)==104) | |
idaman processor_t *ida_export | get_ph () |
idaman asm_t *ida_export | get_ash () |
idaman struct modctx_t *ida_export | get_modctx () |
idaman hexdsp_t *ida_export | get_hexdsp () |
idaman int ida_export | str2reg (const char *p) |
Get any reg number (-1 on error) | |
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. More... | |
idaman ssize_t ida_export | get_reg_name (qstring *buf, int reg, size_t width, int reghi=-1) |
Get text representation of a register. More... | |
idaman bool ida_export | parse_reg_name (reg_info_t *ri, const char *regname) |
Get register info by name. More... | |
idaman bool ida_export | set_processor_type (const char *procname, setproc_level_t level) |
Set target processor type. More... | |
idaman char *ida_export | get_idp_name (char *buf, size_t bufsize) |
Get name of the current processor module. More... | |
idaman bool ida_export | set_target_assembler (int asmnum) |
Set target assembler. More... | |
void | gen_idb_event (idb_event::event_code_t code,...) |
the kernel will use this function to generate idb_events | |
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 data because now the kernel supports opening and working with multiple idbs files simultaneously. More... | |
idaman void *ida_export | clr_module_data (int data_id) |
Unregister pointer to database specific module data. More... | |
idaman void *ida_export | get_module_data (int data_id) |
Get pointer to the database specific module data. More... | |
Detailed Description
Contains definition of the interface to IDP modules.
The interface consists of two structures:
- definition of target assembler: ::ash
- definition of current processor: ::ph
These structures contain information about target processor and assembler features.
It also defines two groups of kernel events:
- processor_t::event_t processor related events
- idb_event:event_code_t database related events
The processor related events are used to communicate with the processor module. The database related events are used to inform any interested parties, like plugins or processor modules, about the changes in the database.
Macro Definition Documentation
◆ IDP_INTERFACE_VERSION
#define IDP_INTERFACE_VERSION 700 |
The interface version number.
- Note
- see also IDA_SDK_VERSION from pro.h
◆ AS2_BYTE1CHAR
#define AS2_BYTE1CHAR 0x00000004 |
One symbol per processor byte.
Meaningful only for wide byte processors
◆ HKCB_GLOBAL
#define HKCB_GLOBAL 0x0001 |
is global event listener? if true, the listener will survive database closing and opening.
it will stay in the memory until explicitly unhooked. otherwise the kernel will delete it as soon as the owner is unloaded. should be used only with PLUGIN_FIX plugins.
◆ DECLARE_LISTENER
#define DECLARE_LISTENER | ( | listener_type, | |
ctx_type, | |||
ctx_name | |||
) |
Declare listener with a context.
◆ PR_TYPEINFO
#define PR_TYPEINFO 0x001000 |
the processor module fully supports type information callbacks; without full support, function argument locations and other things will probably be wrong.
◆ PR_BINMEM
#define PR_BINMEM 0x010000 |
the processor module provides correct segmentation for binary files (i.e. it creates additional segments).
The kernel will not ask the user to specify the RAM/ROM sizes
◆ PR_NO_SEGMOVE
#define PR_NO_SEGMOVE 0x080000 |
the processor module doesn't support move_segm() (i.e.
the user can't move segments)
◆ PR_DELAYED
#define PR_DELAYED 0x800000 |
has delayed jumps and calls.
If this flag is set, processor_t::is_basic_block_end, processor_t::delay_slot_insn should be implemented
◆ PR_ALIGN_INSN
#define PR_ALIGN_INSN 0x1000000 |
allow ida to create alignment instructions arbitrarily.
Since these instructions might lead to other wrong instructions and spoil the listing, IDA does not create them by default anymore
◆ PR2_CODE16_BIT
#define PR2_CODE16_BIT 0x000008 |
low bit of code addresses has special meaning e.g.
ARM Thumb, MIPS16
Typedef Documentation
◆ hexdsp_t
typedef void * hexdsp_t(int code,...) |
Hex-Rays decompiler dispatcher.
All interaction with the decompiler is carried out by the intermediary of this dispatcher.
Enumeration Type Documentation
◆ setproc_level_t
enum setproc_level_t |
Flags passed as 'level' parameter to set_processor_type()
Enumerator | |
---|---|
SETPROC_IDB | set processor type for old idb |
SETPROC_LOADER | set processor type for new idb; if the user has specified a compatible processor, return success without changing it. if failure, call loader_failure() |
SETPROC_LOADER_NON_FATAL | the same as SETPROC_LOADER but non-fatal failures. |
SETPROC_USER | set user-specified processor used for -p and manual processor change at later time |
Function Documentation
◆ hook_event_listener()
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.
The installed listener will be called for all kernel events of the specified type (hook_type_t).
- Parameters
-
hook_type one of hook_type_t constants cb The event listener object owner The listener owner. Points to an instance of: plugin_t, processor_t, or loader_t. Can be nullptr, which means undefined owner. The owner is used by the kernel for automatic removal of the event listener when the owner is unloaded from the memory. hkcb_flags combination of Hook installation bits. bits
- Returns
- success
◆ unhook_event_listener()
idaman bool ida_export unhook_event_listener | ( | hook_type_t | hook_type, |
event_listener_t * | cb | ||
) |
Uninstall an event listener.
- Parameters
-
hook_type one of hook_type_t constants cb the listener object
- Returns
- success A listener is uninstalled automatically when the owner module is unloaded or when the listener object is being destroyed
◆ is_align_insn()
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.
Otherwise return 0.
◆ get_reg_name()
Get text representation of a register.
For most processors this function will just return processor_t::reg_names[reg]. If the processor module has implemented processor_t::get_reg_name, it will be used instead
- Parameters
-
buf output buffer reg internal register number as defined in the processor module width register width in bytes reghi if specified, then this function will return the register pair
- Returns
- length of register name in bytes or -1 if failure
◆ parse_reg_name()
idaman bool ida_export parse_reg_name | ( | reg_info_t * | ri, |
const char * | regname | ||
) |
Get register info by name.
- Parameters
-
[out] ri result regname name of register
- Returns
- success
◆ set_processor_type()
idaman bool ida_export set_processor_type | ( | const char * | procname, |
setproc_level_t | level | ||
) |
Set target processor type.
Once a processor module is loaded, it cannot be replaced until we close the idb.
- Parameters
-
procname name of processor type (one of names present in processor_t::psnames) level SETPROC_
- Returns
- success
◆ get_idp_name()
idaman char *ida_export get_idp_name | ( | char * | buf, |
size_t | bufsize | ||
) |
Get name of the current processor module.
The name is derived from the file name. For example, for IBM PC the module is named "pc.w32" (windows version), then the module name is "PC" (uppercase). If no processor module is loaded, this function will return nullptr
- Parameters
-
buf the output buffer, should be at least #QMAXFILE length bufsize size of output buffer
◆ set_target_assembler()
idaman bool ida_export set_target_assembler | ( | int | asmnum | ) |
Set target assembler.
- Parameters
-
asmnum number of assembler in the current processor module
- Returns
- success
◆ set_module_data()
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 data because now the kernel supports opening and working with multiple idbs files simultaneously.
See the source code of the processor modules in the SDK for the usage examples. Register pointer to database specific module data.
- Parameters
-
data_id initially the pointed-to value must be 0, the kernel will fill it with a unique id. once assigned, the data_id does not change. data_ptr pointer to the data to register
- Returns
- data_ptr. The registered pointer can later be retrieved using get_module_data()
◆ clr_module_data()
idaman void *ida_export clr_module_data | ( | int | data_id | ) |
Unregister pointer to database specific module data.
- Parameters
-
data_id an data_id that was assigned by set_module_data()
- Returns
- previously registered pointer for the current database. it can be deallocated now. Multiple calls to this function with the same id are forbidden.
◆ get_module_data()
idaman void *ida_export get_module_data | ( | int | data_id | ) |
Get pointer to the database specific module data.
- Parameters
-
data_id data id that was initialized by set_module_data()
- Returns
- previously registered pointer for the current database
Generated by