IDA SDK

- Main Page
- Header Files
- Classes
- Modules

- File List
- File Members

Classes | Functions | Namespaces | Macros | Typedefs | Enumerations | Variables
idp.hpp File Reference

## Detailed Description

Contains definition of the interface to IDP modules.

The interface consists of 2 structures:

- definition of target assembler: ash
- definition of current processor: ph

These structures contain information about processor features, function pointers, etc.

## Classes
struct | AbstractRegister
| AbstractRegister is deprecated. More...
struct | rginfo
| This structure is used only when detailed information on processor register is needed. More...
struct | bytes_t
| Structure used to describe byte streams (for "ret" instruction and empirics) More...
struct | cfgopt_t
struct | instruc_t
| Internal representation of processor instructions. More...
struct | s_preline
| This structure is used as a parameter for chkarg_preline. More...
struct | asm_t
| Describes the target assembler. More...
struct | processor_t
| Describes a processor module (IDP). More...
struct | reg_info_t
| Get register number and size from register name. More...

## Functions
idaman bool ida_export | parse_config_value (idc_value_t *out, lexer_t *lx, const token_t &value)
idaman const char *ida_export | cfgopt_t__apply (const cfgopt_t *_this, int vtype, const void *vdata)
idaman bool ida_export | read_config (const char *input, bool is_file, const cfgopt_t opts[], size_t nopts, cfgopt_handler_t *defhdlr=NULL, const char *const *defines=NULL, size_t ndefines=0)
| Parse the input, and apply options. More...
bool | read_config_file (const char *filename, const cfgopt_t opts[], size_t nopts, cfgopt_handler_t *defhdlr=NULL, const char *const *defines=NULL, size_t ndefines=0)
| Search for all IDA system files with the given name. More...
bool | read_config_string (const char *string, const cfgopt_t opts[], size_t nopts, cfgopt_handler_t *defhdlr=NULL, const char *const *defines=NULL, size_t ndefines=0)
| For each directive in 'string', the same processing as that of read_config will be performed. More...
idaman const char *ida_export | cfg_get_cc_parm (comp_t compid, const char *name)
| Get one of config parameters defined by CC_PARMS in ida.cfg. More...
const char * | cfg_get_cc_header_path (comp_t compid)
| Get header path config parameter from ida.cfg. More...
const char * | cfg_get_cc_predefined_macros (comp_t compid)
| Get predefined macros config parameter from ida.cfg. More...
idaman bool ida_export | InstrIsSet (int icode, int bit)
| Does the specified instruction have the specified feature?
idaman bool ida_export | is_call_insn (ea_t ea)
| Is the instruction at the specified address a "call"?
idaman bool ida_export | is_ret_insn (ea_t ea, bool strict=true)
| Is the instruction at the specified address a "return"?
idaman bool ida_export | is_indirect_jump_insn (ea_t ea)
| Is the instruction at the specified address an indirect jump?
idaman bool ida_export | is_basic_block_end (bool call_insn_stops_block)
| Is the current instruction (cmd) the end of a basic block?
idaman int ida_export | str2regf (const char *p)
| Get word reg number (-1 on error)
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 (int reg, size_t width, char *buf, size_t bufsize, int reghi=-1)
| Get text representation of a register. More...
const char * | get_reg_info2 (const char *regname, bitrange_t *bitrange)
| Get register information - useful for registers like al, ah, dil, etc. More...
idaman bool ida_export | parse_reg_name (const char *regname, reg_info_t *ri)
| Get register info by name. More...
size_t | sizeof_ldbl (void)
| Get size of long double.
idaman void ida_export | intel_data (ea_t ea)
| Kernel function to display data items and undefined bytes. More...
idaman bool ida_export | gen_spcdef (ea_t ea, uchar segtype)
| Generate declaration for item in a special segment. More...
idaman bool ida_export | gen_extern (ea_t ea, const char *name)
| Generate declaration of extern symbol. More...
idaman bool ida_export | gen_abssym (ea_t ea, const char *name)
| Generate declaration of absolute symbol. More...
idaman bool ida_export | gen_comvar (ea_t ea, const char *name)
| Generate declaration of communal variable. More...
idaman char *ida_export | set_processor_type (const char *procname, int 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...
int | create_custom_fixup (const char *name)
| Helper function to register a custom fixup. More...
bool | delay_slot_insn (ea_t *ea, bool *bexec, bool *fexec)
| Helper function to get the delay slot instruction.

## Namespaces
| idb_event
| IDB event group.

## Macros
#define | IDP_INTERFACE_VERSION 76
| The interface version number. More...
#define | NEXTEAS_ANSWER_SIZE 32
| Size of the output array for processor_t::calc_next_eas.
#define | IDPOPT_STR 1
| string constant (char *)
#define | IDPOPT_NUM 2
| number (uval_t *)
#define | IDPOPT_BIT 3
| bit, yes/no (int *)
#define | IDPOPT_I64 5
| 64bit number (int64 *)
#define | IDPOPT_CST 6
| lexer (lexer_t*) More...
#define | IDPOPT_OK NULL
| ok
#define | IDPOPT_BADKEY ((char*)1)
| illegal keyword
#define | IDPOPT_BADTYPE ((char*)2)
| illegal type of value
#define | IDPOPT_BADVALUE ((char*)3)
| illegal value (bad range, for example)
#define | IDPOPT_PRI_DEFAULT 1
| default priority - taken from config file
#define | IDPOPT_PRI_HIGH 2
| high priority - received from UI or script function
#define | IDPOPT_NUM_INT (0)
| used by cfgopt_t. You shouldn't have to deal with those directly.
#define | IDPOPT_NUM_CHAR (1 << 24)
#define | IDPOPT_NUM_SHORT (2 << 24)
#define | IDPOPT_NUM_RANGE (1 << 26)
#define | IDPOPT_NUM_UNS (1 << 27)
#define | IDPOPT_BIT_UINT 0
#define | IDPOPT_BIT_UCHAR (1 << 24)
#define | IDPOPT_BIT_USHORT (2 << 24)
#define | IDPOPT_BIT_BOOL (3 << 24)
#define | IDPOPT_BIT_INVRES (1 << 26)
#define | IDPOPT_STR_QSTRING (1 << 24)
#define | IDPOPT_STR_LONG (1 << 25)
#define | IDPOPT_I64_RANGES (1 << 24)
#define | IDPOPT_I64_UNS (1 << 25)
#define | CF_STOP 0x00001
| Instruction doesn't pass execution to the. More...
#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. More...
#define | CF_SHFT 0x08000
| Bit-shift instruction (shl,shr...)
#define | CF_HLL 0x10000
| Instruction may be present in a high level. More...
#define | PRELINE_SIZE 100
| all output arrays are 100 bytes long
#define | CA_PLUS_STR "\4"
#define | CA_PRF_NONE 0
| operand has no prefixes (unknown)
#define | CA_PRF_SEG -1
| is segment reference (x86: seg arg)
#define | CA_PRF_OFFSET 1
| is offset to (x86: offset arg)
#define | CA_PRF_SIZE 2
| request size of (x86: SIZE name)
#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_NOTAB 0x08000000L
| Disable tabulation symbols during the output file generation.
#define | AS_NOSPACE 0x10000000L
| No spaces in expressions.
#define | AS_ALIGN2 0x20000000L
| .align directive expects an exponent rather than a power of 2 More...
#define | AS_ASCIIC 0x40000000L
| ascii directive accepts C-like escape sequences More...
#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. More...
#define | AS2_BYTE1CHAR 0x00000004
| One symbol per processor byte. More...
#define | AS2_IDEALDSCR 0x00000008
| Description of struc/union is in. More...
#define | AS2_TERSESTR 0x00000010
| 'terse' structure initialization form More...
#define | AS2_COLONSUF 0x00000020
| addresses may have ":xx" suffix More...
#define | AS2_YWORD 0x00000040
| a_yword field is present and valid
#define | OBSOLETE(event) obsolete_ ## event
#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 | 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. More...
#define | PR_ASSEMBLE 0x000400
| Module has a built-in assembler and understands IDP_ASSEMBLE.
#define | PR_ALIGN 0x000800
| All data items should be aligned properly.
#define | PR_TYPEINFO 0x001000
| the processor module supports type information callbacks 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 More...
#define | PR_SEGTRANS 0x020000
| the processor module supports the segment translation feature More...
#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() More...
#define | PR_FULL_HIFXP 0x100000
| REF_VHIGH operand value contains full operand More...
#define | PR_USE_ARG_TYPES 0x200000
| use processor_t::use_arg_types3 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_TINFO 0x20000000
| has support for tinfo_t
#define | PR_OUTER 0x40000000
| has outer operands (currently only mc68k)
#define | CUSTOM_CMD_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_type3 uses this bit in the return value to indicate that the register value has been spoiled
#define | REAL_ERROR_FORMAT -1
| not supported format for current .idp
#define | REAL_ERROR_RANGE -2
| number too big (small) for store (mem NOT modified)
#define | REAL_ERROR_BADDATA -3
| illegal real data for load (IEEE data not filled)
#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 | SETPROC_COMPAT 0
| search for the processor type in the current module
#define | SETPROC_ALL 1
| search for the processor type in all modules, More...
#define | SETPROC_USER 2
| search for the processor type in all modules More...
#define | SETPROC_FATAL 0x80
| if the processor can't be set, IDA should display More...

## Typedefs
typedef int | help_t
| help screen number
typedef const char *idaapi | set_options_t(const char *keyword, int value_type, const void *value)
| Callback - called when a config directive is processed in IDA. More...
typedef const char *idaapi | cfgopt_handler_t(lexer_t *lx, const token_t &keyword, const token_t &value)
typedef qvector< reg_info_t > | reginfovec_t
| vector of register info objects

## Enumerations
enum | ca_operation_t { ca_lev_on = 020, ca_lev_off = 1, ca_not = 2, ca_minus = 3, ca_plus = 4, ca_mod = 5, ca_div_u = 6, ca_div = 7, ca_mul = 010, ca_and = 011, ca_or = 012, ca_xor = 013, ca_shl = 014, ca_shr = 015, ca_UN_MSK = 020, ca_not_UN = ca_UN_MSK | ca_not, ca_minus_UN = ca_UN_MSK | ca_minus, ca_h_delim = 037 }
| Operation binary codes. More...
enum | _chkarg_cmd { chkarg_atomprefix = 1, chkarg_preline = 2, chkarg_operseg = 3, chkarg_cmpseg = 4, chkarg_gettable = 5 }
| Command codes for asm_t::checkarg_dispatch() More...
enum | idb_event::event_code_t { idb_event::byte_patched, idb_event::cmt_changed, idb_event::ti_changed, idb_event::op_ti_changed, idb_event::op_type_changed, idb_event::enum_created, idb_event::enum_deleted, idb_event::enum_bf_changed, idb_event::enum_renamed, idb_event::enum_cmt_changed, idb_event::enum_member_created, idb_event::enum_member_deleted, idb_event::struc_created, idb_event::struc_deleted, idb_event::struc_renamed, idb_event::struc_expanded, idb_event::struc_cmt_changed, idb_event::struc_member_created, idb_event::struc_member_deleted, idb_event::struc_member_renamed, idb_event::struc_member_changed, idb_event::thunk_func_created, idb_event::func_tail_appended, idb_event::func_tail_removed, idb_event::tail_owner_changed, idb_event::func_noret_changed, idb_event::segm_added, idb_event::segm_deleted, idb_event::segm_start_changed, idb_event::segm_end_changed, idb_event::segm_moved, idb_event::area_cmt_changed, idb_event::changing_cmt, idb_event::changing_ti, idb_event::changing_op_ti, idb_event::changing_op_type, idb_event::deleting_enum, idb_event::changing_enum_bf, idb_event::renaming_enum, idb_event::changing_enum_cmt, idb_event::deleting_enum_member, idb_event::deleting_struc, idb_event::renaming_struc, idb_event::expanding_struc, idb_event::changing_struc_cmt, idb_event::deleting_struc_member, idb_event::renaming_struc_member, idb_event::changing_struc_member, idb_event::removing_func_tail, idb_event::deleting_segm, idb_event::changing_segm_start, idb_event::changing_segm_end, idb_event::changing_area_cmt, idb_event::changing_segm_name, idb_event::changing_segm_class, idb_event::segm_name_changed, idb_event::segm_class_changed, idb_event::destroyed_items, idb_event::changed_stkpnts, idb_event::extra_cmt_changed, idb_event::changing_struc, idb_event::changed_struc, idb_event::local_types_changed, idb_event::segm_attrs_changed, idb_event::allsegs_moved }
| IDB event codes. More...

## Variables
idaman processor_t ida_export_data | ph
| current processor
idaman asm_t ida_export_data | ash
| current assembler

## Macro Definition Documentation

#define IDP_INTERFACE_VERSION 76

The interface version number.

It must match the version number on the IDA modules.

Note
  This will not change anymore. Use IDA_SDK_VERSION from pro.h

## Typedef Documentation

typedef const char* idaapi set_options_t(const char *keyword, int value_type, const void *value)

Callback - called when a config directive is processed in IDA.

Also see read_config_file() and processor_t::set_idp_options

Parameters

  keyword | keyword encountered in IDA.CFG/user config file. if NULL, then an interactive dialog form should be displayed
  value_type | type of value of the keyword - one of Option value types
  value | pointer to value

Returns
  one of Option result codes, otherwise a pointer to an error message

## Enumeration Type Documentation

enum ca_operation_t

Operation binary codes.

The kernel replaces all operations in the operand by binary code from the following enumeration. The order of operations is FIXED!

Enumerator
ca_lev_on | (
ca_lev_off | )
ca_not | ~ (NOT in x86 assembler)
ca_minus | –
ca_plus | +
ca_mod | % (MOD in x86 assembler)
ca_div_u | / (unsigned) (not implemented in x86 assembler)
ca_div | /
ca_mul | *
ca_and | &
ca_or | |
ca_xor | ^
ca_shl | <<
ca_shr | >>
ca_UN_MSK | mask
ca_not_UN | 022
ca_minus_UN | 023
ca_h_delim | delimeter for holerite constant

enum _chkarg_cmd

Command codes for asm_t::checkarg_dispatch()

Enumerator
chkarg_atomprefix | Scan the operand for special prefixes like SEG, OFFSET, SIZE (see Operand prefixes). arguments: char **operand, char *flgoff
chkarg_preline | Parse operand string to and fill the s_preline structure arguments: char *operstr, s_preline *S.
chkarg_operseg | Get the default segment for the specified operand arguments: char *outseg, int opernum.
chkarg_cmpseg | Check if the selectors are interchangeable arguments: sel_t sel1, sel_t sel2.
chkarg_gettable | Request the operation mnemonic table arguments: NULL, char * const **outptr This callback must be implemented.

## Function Documentation

idaman bool ida_export read_config | ( | const char * | input,
|  | bool | is_file,
|  | const cfgopt_t | opts[],
|  | size_t | nopts,
|  | cfgopt_handler_t * | defhdlr = `NULL`,
|  | const char *const * | defines = `NULL`,
|  | size_t | ndefines = `0`
| ) |  |

Parse the input, and apply options.

Parameters

  input | input file name, or string
  is_file | is input a string, or a file name
  opts | options destcriptions
  nopts | the number of entries present in the 'opts' array
  defhdlr | a handler to be called, if a directive couldn't be found in 'opts'
  defines | a list of preprocessor identifiers to define (so it is possible to use #ifdef checks in the file.) NB: the actual identifier defined by the parser will be surrounded with double underscores (e.g., passing 'FOO' will result in '__FOO__' being defined) Additionally, the parser will also define a similar macro with the current processor name (e.g., __ARM__)
  ndefines | the number of defines in the list

Returns
  true if parsing finished without errors, false if there was a syntax error, callback returned an error, or no file was found at all.

bool read_config_file | ( | const char * | filename,
|  | const cfgopt_t | opts[],
|  | size_t | nopts,
|  | cfgopt_handler_t * | defhdlr = `NULL`,
|  | const char *const * | defines = `NULL`,
|  | size_t | ndefines = `0`
| ) |  |
| inline

Search for all IDA system files with the given name.

This function will search, in that order, for the following files:

1. IDADIR%/cfg/<file>
2. for each directory 'ONEDIR' in IDAUSR%: ONEDIR%/cfg/<file>

For each directive in each of those files, the same processing as that of read_config will be performed.

bool read_config_string | ( | const char * | string,
|  | const cfgopt_t | opts[],
|  | size_t | nopts,
|  | cfgopt_handler_t * | defhdlr = `NULL`,
|  | const char *const * | defines = `NULL`,
|  | size_t | ndefines = `0`
| ) |  |
| inline

For each directive in 'string', the same processing as that of read_config will be performed.

idaman const char* ida_export cfg_get_cc_parm | ( | comp_t | compid,
|  | const char * | name
| ) |  |

Get one of config parameters defined by CC_PARMS in ida.cfg.

All parameters for all compilers are stored in local map during last read of ida.cfg - this function just returns previously stored parameter value for given compiler (NULL if no such parameter)

const char* cfg_get_cc_header_path | ( | comp_t | compid | ) |
| inline

Get header path config parameter from ida.cfg.

Also see cfg_get_cc_parm()

const char* cfg_get_cc_predefined_macros | ( | comp_t | compid | ) |
| inline

Get predefined macros config parameter from ida.cfg.

Also see cfg_get_cc_parm()

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.

idaman ssize_t ida_export get_reg_name | ( | int | reg,
|  | size_t | width,
|  | char * | buf,
|  | size_t | bufsize,
|  | int | reghi = `-1`
| ) |  |

Get text representation of a register.

For most processors this function will just return processor_t::regNames[reg]. If the processor module has implemented processor_t::get_reg_name, it will be used instead

Parameters

  reg | internal register number as defined in the processor module
  width | register width in bytes
  buf | output buffer
  bufsize | size of output buffer
  reghi | if specified, then this function will return the register pair

Returns
  length of register name in bytes or -1 if failure

const char* get_reg_info2 | ( | const char * | regname,
|  | bitrange_t * | bitrange
| ) |  |
| inline

Get register information - useful for registers like al, ah, dil, etc.

Returns
  NULL no such register

idaman bool ida_export parse_reg_name | ( | const char * | regname,
|  | reg_info_t * | ri
| ) |  |

Get register info by name.

Parameters

  | regname | name of register
  [out] | ri | result

Returns
  success

idaman void ida_export intel_data | ( | ea_t | ea | ) |

Kernel function to display data items and undefined bytes.

This function should be used to display data.

idaman bool ida_export gen_spcdef | ( | ea_t | ea,
|  | uchar | segtype
| ) |  |

Generate declaration for item in a special segment.

Return values

  1 | overflow
  0 | ok

idaman bool ida_export gen_extern | ( | ea_t | ea,
|  | const char * | name
| ) |  |

Generate declaration of extern symbol.

Return values

  1 | overflow
  0 | ok

idaman bool ida_export gen_abssym | ( | ea_t | ea,
|  | const char * | name
| ) |  |

Generate declaration of absolute symbol.

Return values

  1 | overflow
  0 | ok

idaman bool ida_export gen_comvar | ( | ea_t | ea,
|  | const char * | name
| ) |  |

Generate declaration of communal variable.

Return values

  1 | overflow
  0 | ok

idaman char* ida_export set_processor_type | ( | const char * | procname,
|  | int | level
| ) |  |

Set target processor type.

Parameters

  procname | name of processor type (one of names present in processor_t::psnames)
  level | Set processor levels

Returns
  NULL if failed, otherwise path of file with processor module

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 NULL

Parameters

  buf | the output buffer, should be at least QMAXFILE length

idaman bool ida_export set_target_assembler | ( | int | asmnum | ) |

Set target assembler.

Parameters

  asmnum | number of assembler in the current processor module

Returns
  success

int create_custom_fixup | ( | const char * | name | ) |
| inline

Helper function to register a custom fixup.

It is can be called by the file loader and the processor module will receive the processor_t::register_custom_fixup event. It returns the custom format id (<=0 if failed)