Module ida_idp

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.

Global Variables

AS2_BRACE

AS2_BRACE = 1

AS2_BYTE1CHAR

AS2_BYTE1CHAR = 4

AS2_COLONSUF

AS2_COLONSUF = 32

AS2_IDEALDSCR

AS2_IDEALDSCR = 8

AS2_STRINV

AS2_STRINV = 2

AS2_TERSESTR

AS2_TERSESTR = 16

AS2_YWORD

AS2_YWORD = 64

AS2_ZWORD

AS2_ZWORD = 128

ASB_BINF0

ASB_BINF0 = 0

ASB_BINF1

ASB_BINF1 = 131072

ASB_BINF2

ASB_BINF2 = 262144

ASB_BINF3

ASB_BINF3 = 393216

ASB_BINF4

ASB_BINF4 = 524288

ASB_BINF5

ASB_BINF5 = 655360

ASD_DECF0

ASD_DECF0 = 0

ASD_DECF1

ASD_DECF1 = 4096

ASD_DECF2

ASD_DECF2 = 8192

ASD_DECF3

ASD_DECF3 = 12288

ASH_HEXF0

ASH_HEXF0 = 0

ASH_HEXF1

ASH_HEXF1 = 512

ASH_HEXF2

ASH_HEXF2 = 1024

ASH_HEXF3

ASH_HEXF3 = 1536

ASH_HEXF4

ASH_HEXF4 = 2048

ASH_HEXF5

ASH_HEXF5 = 2560

ASO_OCTF0

ASO_OCTF0 = 0

ASO_OCTF1

ASO_OCTF1 = 16384

ASO_OCTF2

ASO_OCTF2 = 32768

ASO_OCTF3

ASO_OCTF3 = 49152

ASO_OCTF4

ASO_OCTF4 = 65536

ASO_OCTF5

ASO_OCTF5 = 81920

ASO_OCTF6

ASO_OCTF6 = 98304

ASO_OCTF7

ASO_OCTF7 = 114688

AS_1TEXT

AS_1TEXT = 64

AS_2CHRE

AS_2CHRE = 8

AS_ALIGN2

AS_ALIGN2 = 536870912

AS_ASCIIC

AS_ASCIIC = 1073741824

AS_ASCIIZ

AS_ASCIIZ = -2147483648

AS_BINFM

AS_BINFM = 917504

AS_COLON

AS_COLON = 2

AS_DECFM

AS_DECFM = 12288

AS_HEXFM

AS_HEXFM = 3584

AS_LALIGN

AS_LALIGN = 33554432

AS_N2CHR

AS_N2CHR = 32

AS_NCHRE

AS_NCHRE = 16

AS_NCMAS

AS_NCMAS = 256

AS_NHIAS

AS_NHIAS = 128

AS_NOCODECLN

AS_NOCODECLN = 67108864

AS_NOSPACE

AS_NOSPACE = 268435456

AS_NOXRF

AS_NOXRF = 4194304

AS_OCTFM

AS_OCTFM = 114688

AS_OFFST

AS_OFFST = 1

AS_ONEDUP

AS_ONEDUP = 2097152

AS_RELSUP

AS_RELSUP = 16777216

AS_UDATA

AS_UDATA = 4

AS_UNEQU

AS_UNEQU = 1048576

AS_XTRNTYPE

AS_XTRNTYPE = 8388608

CF_CALL

CF_CALL = 2

CF_CHG1

CF_CHG1 = 4

CF_CHG2

CF_CHG2 = 8

CF_CHG3

CF_CHG3 = 16

CF_CHG4

CF_CHG4 = 32

CF_CHG5

CF_CHG5 = 64

CF_CHG6

CF_CHG6 = 128

CF_CHG7

CF_CHG7 = 131072

CF_CHG8

CF_CHG8 = 262144

CF_HLL

CF_HLL = 65536

CF_JUMP

CF_JUMP = 16384

CF_SHFT

CF_SHFT = 32768

CF_STOP

CF_STOP = 1

CF_USE1

CF_USE1 = 256

CF_USE2

CF_USE2 = 512

CF_USE3

CF_USE3 = 1024

CF_USE4

CF_USE4 = 2048

CF_USE5

CF_USE5 = 4096

CF_USE6

CF_USE6 = 8192

CF_USE7

CF_USE7 = 524288

CF_USE8

CF_USE8 = 1048576

CUSTOM_INSN_ITYPE

CUSTOM_INSN_ITYPE = 32768

HKCB_GLOBAL

HKCB_GLOBAL = 1

IDPOPT_BADKEY

IDPOPT_BADKEY = 1

IDPOPT_BADTYPE

IDPOPT_BADTYPE = 2

IDPOPT_BADVALUE

IDPOPT_BADVALUE = 3

IDPOPT_BIT

IDPOPT_BIT = 3

IDPOPT_BIT_BOOL

IDPOPT_BIT_BOOL = 50331648

IDPOPT_BIT_UCHAR

IDPOPT_BIT_UCHAR = 16777216

IDPOPT_BIT_UINT

IDPOPT_BIT_UINT = 0

IDPOPT_BIT_USHORT

IDPOPT_BIT_USHORT = 33554432

IDPOPT_CST

IDPOPT_CST = 6

IDPOPT_CST_PARAMS

IDPOPT_CST_PARAMS = 16777216

IDPOPT_FLT

IDPOPT_FLT = 4

IDPOPT_I64

IDPOPT_I64 = 5

IDPOPT_I64_RANGE

IDPOPT_I64_RANGE = 16777216

IDPOPT_I64_UNS

IDPOPT_I64_UNS = 33554432

IDPOPT_JVL

IDPOPT_JVL = 7

IDPOPT_MBROFF

IDPOPT_MBROFF = 262144

IDPOPT_NUM

IDPOPT_NUM = 2

IDPOPT_NUM_CHAR

IDPOPT_NUM_CHAR = 16777216

IDPOPT_NUM_INT

IDPOPT_NUM_INT = 0

IDPOPT_NUM_RANGE

IDPOPT_NUM_RANGE = 67108864

IDPOPT_NUM_SHORT

IDPOPT_NUM_SHORT = 33554432

IDPOPT_NUM_UNS

IDPOPT_NUM_UNS = 134217728

IDPOPT_OK

IDPOPT_OK = 0

IDPOPT_PRI_DEFAULT

IDPOPT_PRI_DEFAULT = 1

IDPOPT_PRI_HIGH

IDPOPT_PRI_HIGH = 2

IDPOPT_STR

IDPOPT_STR = 1

IDPOPT_STR_LONG

IDPOPT_STR_LONG = 33554432

IDPOPT_STR_QSTRING

IDPOPT_STR_QSTRING = 16777216

IDP_INTERFACE_VERSION

IDP_INTERFACE_VERSION = 900

LTC_ADDED

LTC_ADDED = 1

LTC_ALIASED

LTC_ALIASED = 4

LTC_COMPILER

LTC_COMPILER = 5

LTC_DELETED

LTC_DELETED = 2

LTC_EDITED

LTC_EDITED = 3

LTC_NONE

LTC_NONE = 0

LTC_TIL_COMPACTED

LTC_TIL_COMPACTED = 8

LTC_TIL_LOADED

LTC_TIL_LOADED = 6

LTC_TIL_UNLOADED

LTC_TIL_UNLOADED = 7

NO_ACCESS

NO_ACCESS = 0

OP_FP_BASED

OP_FP_BASED = 0

OP_SP_ADD

OP_SP_ADD = 0

OP_SP_BASED

OP_SP_BASED = 1

OP_SP_SUB

OP_SP_SUB = 2

PLFM_386

PLFM_386 = 0

PLFM_6502

PLFM_6502 = 5

PLFM_65C816

PLFM_65C816 = 61

PLFM_6800

PLFM_6800 = 9

PLFM_68K

PLFM_68K = 7

PLFM_80196

PLFM_80196 = 16

PLFM_8051

PLFM_8051 = 3

PLFM_AD2106X

PLFM_AD2106X = 68

PLFM_AD218X

PLFM_AD218X = 48

PLFM_ALPHA

PLFM_ALPHA = 24

PLFM_ARC

PLFM_ARC = 63

PLFM_ARM

PLFM_ARM = 13

PLFM_AVR

PLFM_AVR = 20

PLFM_C166

PLFM_C166 = 29

PLFM_C39

PLFM_C39 = 51

PLFM_CR16

PLFM_CR16 = 52

PLFM_DALVIK

PLFM_DALVIK = 60

PLFM_DSP56K

PLFM_DSP56K = 28

PLFM_DSP96K

PLFM_DSP96K = 66

PLFM_EBC

PLFM_EBC = 57

PLFM_F2MC

PLFM_F2MC = 33

PLFM_FR

PLFM_FR = 43

PLFM_H8

PLFM_H8 = 21

PLFM_H8500

PLFM_H8500 = 26

PLFM_HPPA

PLFM_HPPA = 25

PLFM_I860

PLFM_I860 = 2

PLFM_I960

PLFM_I960 = 32

PLFM_IA64

PLFM_IA64 = 31

PLFM_JAVA

PLFM_JAVA = 8

PLFM_KR1878

PLFM_KR1878 = 47

PLFM_M16C

PLFM_M16C = 62

PLFM_M32R

PLFM_M32R = 37

PLFM_M740

PLFM_M740 = 40

PLFM_M7700

PLFM_M7700 = 41

PLFM_M7900

PLFM_M7900 = 45

PLFM_MC6812

PLFM_MC6812 = 11

PLFM_MC6816

PLFM_MC6816 = 44

PLFM_MIPS

PLFM_MIPS = 12

PLFM_MN102L00

PLFM_MN102L00 = 53

PLFM_MSP430

PLFM_MSP430 = 58

PLFM_NEC_78K0

PLFM_NEC_78K0 = 38

PLFM_NEC_78K0S

PLFM_NEC_78K0S = 39

PLFM_NEC_V850X

PLFM_NEC_V850X = 55

PLFM_NET

PLFM_NET = 19

PLFM_OAKDSP

PLFM_OAKDSP = 49

PLFM_PDP

PLFM_PDP = 6

PLFM_PIC

PLFM_PIC = 22

PLFM_PIC16

PLFM_PIC16 = 69

PLFM_PPC

PLFM_PPC = 15

PLFM_RISCV

PLFM_RISCV = 72

PLFM_RL78

PLFM_RL78 = 73

PLFM_RX

PLFM_RX = 74

PLFM_S390

PLFM_S390 = 70

PLFM_SCR_ADPT

PLFM_SCR_ADPT = 56

PLFM_SH

PLFM_SH = 18

PLFM_SPARC

PLFM_SPARC = 23

PLFM_SPC700

PLFM_SPC700 = 67

PLFM_SPU

PLFM_SPU = 59

PLFM_ST20

PLFM_ST20 = 30

PLFM_ST7

PLFM_ST7 = 10

PLFM_ST9

PLFM_ST9 = 42

PLFM_TLCS900

PLFM_TLCS900 = 50

PLFM_TMS

PLFM_TMS = 4

PLFM_TMS320C1X

PLFM_TMS320C1X = 54

PLFM_TMS320C28

PLFM_TMS320C28 = 65

PLFM_TMS320C3

PLFM_TMS320C3 = 46

PLFM_TMS320C54

PLFM_TMS320C54 = 34

PLFM_TMS320C55

PLFM_TMS320C55 = 35

PLFM_TMSC6

PLFM_TMSC6 = 14

PLFM_TRICORE

PLFM_TRICORE = 27

PLFM_TRIMEDIA

PLFM_TRIMEDIA = 36

PLFM_UNSP

PLFM_UNSP = 64

PLFM_WASM

PLFM_WASM = 75

PLFM_XTENSA

PLFM_XTENSA = 71

PLFM_Z8

PLFM_Z8 = 17

PLFM_Z80

PLFM_Z80 = 1

PR2_CODE16_BIT

PR2_CODE16_BIT = 8

PR2_FORCE_16BIT

PR2_FORCE_16BIT = 128

PR2_IDP_OPTS

PR2_IDP_OPTS = 2

PR2_MACRO

PR2_MACRO = 16

PR2_MAPPINGS

PR2_MAPPINGS = 1

PR2_REL_BITS

PR2_REL_BITS = 64

PR2_USE_CALCREL

PR2_USE_CALCREL = 32

PRN_BIN

PRN_BIN = 192

PRN_DEC

PRN_DEC = 128

PRN_HEX

PRN_HEX = 0

PRN_OCT

PRN_OCT = 64

PR_ADJSEGS

PR_ADJSEGS = 32

PR_ALIGN

PR_ALIGN = 2048

PR_ALIGN_INSN

PR_ALIGN_INSN = 16777216

PR_ASSEMBLE

PR_ASSEMBLE = 1024

PR_BINMEM

PR_BINMEM = 65536

PR_CHK_XREF

PR_CHK_XREF = 262144

PR_CNDINSNS

PR_CNDINSNS = 67108864

PR_DEFNUM

PR_DEFNUM = 192

PR_DEFSEG32

PR_DEFSEG32 = 4

PR_DEFSEG64

PR_DEFSEG64 = 268435456

PR_DELAYED

PR_DELAYED = 8388608

PR_NOCHANGE

PR_NOCHANGE = 512

PR_NO_SEGMOVE

PR_NO_SEGMOVE = 524288

PR_OUTER

PR_OUTER = 536870912

PR_PURGING

PR_PURGING = 33554432

PR_RNAMESOK

PR_RNAMESOK = 8

PR_SCALE_STKVARS

PR_SCALE_STKVARS = 4194304

PR_SEGS

PR_SEGS = 1

PR_SEGTRANS

PR_SEGTRANS = 131072

PR_SGROTHER

PR_SGROTHER = 16384

PR_STACK_UP

PR_STACK_UP = 32768

PR_TYPEINFO

PR_TYPEINFO = 4096

PR_USE32

PR_USE32 = 2

PR_USE64

PR_USE64 = 8192

PR_USE_ARG_TYPES

PR_USE_ARG_TYPES = 2097152

PR_USE_TBYTE

PR_USE_TBYTE = 134217728

PR_WORD_INS

PR_WORD_INS = 256

READ_ACCESS

READ_ACCESS = 2

REAL_ERROR_BADDATA

REAL_ERROR_BADDATA = -3

REAL_ERROR_FORMAT

REAL_ERROR_FORMAT = -1

REAL_ERROR_RANGE

REAL_ERROR_RANGE = -2

REG_SPOIL

REG_SPOIL = -2147483648

RW_ACCESS

RW_ACCESS = 3

SETPROC_IDB

SETPROC_IDB = 0

SETPROC_LOADER

SETPROC_LOADER = 1

SETPROC_LOADER_NON_FATAL

SETPROC_LOADER_NON_FATAL = 2

SETPROC_USER

SETPROC_USER = 3

WRITE_ACCESS

WRITE_ACCESS = 1

adding_segm

adding_segm = 63

allsegs_moved

allsegs_moved = 31

auto_empty

auto_empty = 3

auto_empty_finally

auto_empty_finally = 4

bookmark_changed

bookmark_changed = 61

byte_patched

byte_patched = 53

callee_addr_changed

callee_addr_changed = 60

changing_cmt

changing_cmt = 54

changing_op_ti

changing_op_ti = 14

changing_op_type

changing_op_type = 16

changing_range_cmt

changing_range_cmt = 56

changing_segm_class

changing_segm_class = 27

changing_segm_end

changing_segm_end = 23

changing_segm_name

changing_segm_name = 25

changing_segm_start

changing_segm_start = 21

changing_ti

changing_ti = 12

cik_filename

cik_filename = 1

cik_path

cik_path = 2

cik_string

cik_string = 0

closebase

closebase = 0

cmt_changed

cmt_changed = 55

compiler_changed

compiler_changed = 11

deleting_func

deleting_func = 36

deleting_func_tail

deleting_func_tail = 40

deleting_segm

deleting_segm = 19

deleting_tryblks

deleting_tryblks = 47

destroyed_items

destroyed_items = 51

determined_main

determined_main = 5
dirtree_link = 67

dirtree_mkdir

dirtree_mkdir = 65

dirtree_move

dirtree_move = 68

dirtree_rank

dirtree_rank = 69

dirtree_rmdir

dirtree_rmdir = 66

dirtree_rminode

dirtree_rminode = 70

dirtree_segm_moved

dirtree_segm_moved = 71

extlang_changed

extlang_changed = 6

extra_cmt_changed

extra_cmt_changed = 58

flow_chart_created

flow_chart_created = 10

frame_created

frame_created = 78

frame_deleted

frame_deleted = 37

frame_expanded

frame_expanded = 83

frame_udm_changed

frame_udm_changed = 82

frame_udm_created

frame_udm_created = 79

frame_udm_deleted

frame_udm_deleted = 80

frame_udm_renamed

frame_udm_renamed = 81

func_added

func_added = 32

func_deleted

func_deleted = 64

func_noret_changed

func_noret_changed = 43

func_tail_appended

func_tail_appended = 39

func_tail_deleted

func_tail_deleted = 41

func_updated

func_updated = 33

idasgn_loaded

idasgn_loaded = 7

item_color_changed

item_color_changed = 59

kernel_config_loaded

kernel_config_loaded = 8

loader_finished

loader_finished = 9

local_types_changed

local_types_changed = 72

lt_udm_changed

lt_udm_changed = 76

lt_udm_created

lt_udm_created = 73

lt_udm_deleted

lt_udm_deleted = 74

lt_udm_renamed

lt_udm_renamed = 75

lt_udt_expanded

lt_udt_expanded = 77

make_code

make_code = 49

make_data

make_data = 50

op_ti_changed

op_ti_changed = 15

op_type_changed

op_type_changed = 17

range_cmt_changed

range_cmt_changed = 57

renamed

renamed = 52

savebase

savebase = 1

segm_added

segm_added = 18

segm_attrs_updated

segm_attrs_updated = 29

segm_class_changed

segm_class_changed = 28

segm_deleted

segm_deleted = 20

segm_end_changed

segm_end_changed = 24

segm_moved

segm_moved = 30

segm_name_changed

segm_name_changed = 26

segm_start_changed

segm_start_changed = 22

set_func_end

set_func_end = 35

set_func_start

set_func_start = 34

sgr_changed

sgr_changed = 48

sgr_deleted

sgr_deleted = 62

stkpnts_changed

stkpnts_changed = 44

tail_owner_changed

tail_owner_changed = 42

thunk_func_created

thunk_func_created = 38

ti_changed

ti_changed = 13

tryblks_updated

tryblks_updated = 46

updating_tryblks

updating_tryblks = 45

upgraded

upgraded = 2

Functions

AssembleLine(ea: ea_t, cs: ea_t, ip: ea_t, use32: bool, nonnul_line: char const *) ‑> PyObject *

AssembleLine(ea, cs, ip, use32, nonnul_line) -> bytes Assemble an instruction to a string (display a warning if an error is found)

ea: linear address of instruction
cs: cs of instruction
ip: ip of instruction
use32: is 32bit segment
nonnul_line: char const *
return:     - None on failure
   - or a string containing the assembled instruction

assemble(ea: ea_t, cs: ea_t, ip: ea_t, use32: bool, line: char const *) ‑> bool

assemble(ea, cs, ip, use32, line) -> bool Assemble an instruction into the database (display a warning if an error is found)

ea: linear address of instruction
cs: cs of instruction
ip: ip of instruction
use32: is 32bit segment?
line: line to assemble

return: Boolean. True on success.

cfg_get_cc_header_path(compid: comp_t) ‑> char const *

cfg_get_cc_header_path(compid) -> char const *

compid: comp_t

cfg_get_cc_parm(compid: comp_t, name: char const *) ‑> char const *

cfg_get_cc_parm(compid, name) -> char const *