IDAPython 8.4
Loading...
Searching...
No Matches
ida_pro Namespace Reference

Detailed Description

This is the first header included in the IDA project.

It defines the most common types, functions and data. Also, it tries to make
system dependent definitions.

The following preprocessor macros are used in the project (the list may be
incomplete)

Platform must be specified as one of:

__NT__ - MS Windows (all platforms)
__LINUX__ - Linux
__MAC__ - MAC OS X

__EA64__ - 64-bit address size (sizeof(ea_t)==8)
__X86__ - 32-bit debug servers (sizeof(void*)==4)
__X64__ - x64 processor (sizeof(void*)==8) default
__PPC__ - PowerPC
__ARM__ - ARM

Classes

class  _qstrvec_t
 
class  boolvec_t
 Proxy of C++ qvector< bool > class. More...
 
class  channel_redir_t
 Proxy of C++ channel_redir_t class. More...
 
class  ea_array
 Proxy of C++ ea_array class. More...
 
class  ea_pointer
 Proxy of C++ ea_pointer class. More...
 
class  instant_dbgopts_t
 Proxy of C++ instant_dbgopts_t class. More...
 
class  int64vec_t
 Proxy of C++ qvector< long long > class. More...
 
class  int_pointer
 Proxy of C++ int_pointer class. More...
 
class  intvec_t
 Proxy of C++ qvector< int > class. More...
 
class  qmutex_locker_t
 Proxy of C++ qmutex_locker_t class. More...
 
class  qrefcnt_obj_t
 Proxy of C++ qrefcnt_obj_t class. More...
 
class  sel_array
 Proxy of C++ sel_array class. More...
 
class  sel_pointer
 Proxy of C++ sel_pointer class. More...
 
class  sizevec_t
 Proxy of C++ qvector< size_t > class. More...
 
class  strvec_t
 Proxy of C++ qvector< simpleline_t > class. More...
 
class  sval_pointer
 Proxy of C++ sval_pointer class. More...
 
class  tid_array
 Proxy of C++ tid_array class. More...
 
class  uchar_array
 Proxy of C++ uchar_array class. More...
 
class  uint64vec_t
 Proxy of C++ qvector< unsigned long long > class. More...
 
class  uintvec_t
 Proxy of C++ qvector< unsigned int > class. More...
 
class  uval_array
 Proxy of C++ uval_array class. More...
 

Functions

"int64" qatoll (*args)
 qatoll(nptr) -> int64
 
"void" qexit (*args)
 qexit(code) Call qatexit functions, shut down UI and kernel, and exit.
 
"int" log2ceil (*args)
 log2ceil(d64) -> int calculate ceil(log2(d64)) or floor(log2(d64)), it returns 0 if d64 == 0
 
"int" log2floor (*args)
 log2floor(d64) -> int
 
"uint64" extend_sign (*args)
 extend_sign(v, nbytes, sign_extend) -> uint64 Sign-, or zero-extend the value 'v' to occupy 64 bits.
 
"int" readbytes (*args)
 readbytes(h, res, size, mf) -> int Read at most 4 bytes from file.
 
"int" writebytes (*args)
 writebytes(h, l, size, mf) -> int Write at most 4 bytes to file.
 
"void" reloc_value (*args)
 reloc_value(value, size, delta, mf)
 
"void *" qvector_reserve (*args)
 qvector_reserve(vec, old, cnt, elsize) -> void * Change capacity of given qvector.
 
"bool" relocate_relobj (*args)
 relocate_relobj(_relobj, ea, mf) -> bool
 
"bool" is_cvt64 (*args)
 is_cvt64() -> bool is IDA converting IDB into I64?
 
"bool" quote_cmdline_arg (*args)
 quote_cmdline_arg(arg) -> bool Quote a command line argument if it contains escape characters.
 
"bool" parse_dbgopts (*args)
 parse_dbgopts(ido, r_switch) -> bool Parse the -r command line switch (for instant debugging).
 
"int" check_process_exit (*args)
 check_process_exit(handle, exit_code, msecs=-1) -> int Check whether process has terminated or not.
 
"enum tty_control_t" is_control_tty (*args)
 is_control_tty(fd) -> enum tty_control_t Check if the current process is the owner of the TTY specified by 'fd' (typically an opened descriptor to /dev/tty).
 
"void" qdetach_tty (*args)
 qdetach_tty() If the current terminal is the controlling terminal of the calling process, give up this controlling terminal.
 
"void" qcontrol_tty (*args)
 qcontrol_tty() Make the current terminal the controlling terminal of the calling process.
 
"bool" qthread_equal (*args)
 qthread_equal(q1, q2) -> bool Are two threads equal?
 
"bool" is_main_thread (*args)
 is_main_thread() -> bool Are we running in the main thread?
 
"PyObject *" qstrvec_t_create (*args)
 qstrvec_t_create() -> PyObject *
 
"bool" qstrvec_t_destroy (*args)
 qstrvec_t_destroy(py_obj) -> bool
 
"qstrvec_t *" qstrvec_t_get_clink (*args)
 qstrvec_t_get_clink(_self) -> qstrvec_t *
 
"PyObject *" qstrvec_t_get_clink_ptr (*args)
 qstrvec_t_get_clink_ptr(_self) -> PyObject *
 
"bool" qstrvec_t_assign (*args)
 qstrvec_t_assign(_self, other) -> bool
 
"PyObject *" qstrvec_t_addressof (*args)
 qstrvec_t_addressof(_self, idx) -> PyObject *
 
"bool" qstrvec_t_set (*args)
 qstrvec_t_set(_self, idx, s) -> bool
 
"bool" qstrvec_t_from_list (*args)
 qstrvec_t_from_list(_self, py_list) -> bool
 
"size_t" qstrvec_t_size (*args)
 qstrvec_t_size(_self) -> size_t
 
"PyObject *" qstrvec_t_get (*args)
 qstrvec_t_get(_self, idx) -> PyObject *
 
"bool" qstrvec_t_add (*args)
 qstrvec_t_add(_self, s) -> bool
 
"bool" qstrvec_t_clear (*args)
 qstrvec_t_clear(_self, qclear) -> bool
 
"bool" qstrvec_t_insert (*args)
 qstrvec_t_insert(_self, idx, s) -> bool
 
"bool" qstrvec_t_remove (*args)
 qstrvec_t_remove(_self, idx) -> bool
 
"PyObject *" str2user (*args)
 str2user(str) -> str or None Insert C-style escape characters to string
 
"uchar_array *" uchar_array_frompointer (*args)
 uchar_array_frompointer(t) -> uchar_array
 
"tid_array *" tid_array_frompointer (*args)
 tid_array_frompointer(t) -> tid_array
 
"ea_array *" ea_array_frompointer (*args)
 ea_array_frompointer(t) -> ea_array
 
"sel_array *" sel_array_frompointer (*args)
 sel_array_frompointer(t) -> sel_array
 
"uval_array *" uval_array_frompointer (*args)
 uval_array_frompointer(t) -> uval_array
 
"int_pointer *" int_pointer_frompointer (*args)
 int_pointer_frompointer(t) -> int_pointer
 
"ea_pointer *" ea_pointer_frompointer (*args)
 ea_pointer_frompointer(t) -> ea_pointer
 
"sval_pointer *" sval_pointer_frompointer (*args)
 sval_pointer_frompointer(t) -> sval_pointer
 
"sel_pointer *" sel_pointer_frompointer (*args)
 sel_pointer_frompointer(t) -> sel_pointer
 

Variables

 BADDIFF = _ida_pro.BADDIFF
 
 IDA_SDK_VERSION = _ida_pro.IDA_SDK_VERSION
 
 BADMEMSIZE = _ida_pro.BADMEMSIZE
 
 _CRT_DECLARE_NONSTDC_NAMES = _ida_pro._CRT_DECLARE_NONSTDC_NAMES
 
 MAXSTR = _ida_pro.MAXSTR
 
 FMT_64 = _ida_pro.FMT_64
 
 FMT_Z = _ida_pro.FMT_Z
 
 FMT_ZX = _ida_pro.FMT_ZX
 
 FMT_ZS = _ida_pro.FMT_ZS
 
 FMT_EA = _ida_pro.FMT_EA
 
 IDBDEC_ESCAPE = _ida_pro.IDBDEC_ESCAPE
 
 CP_BOM = _ida_pro.CP_BOM
 
 UTF8_BOM = _ida_pro.UTF8_BOM
 
 UTF16LE_BOM = _ida_pro.UTF16LE_BOM
 
 UTF16BE_BOM = _ida_pro.UTF16BE_BOM
 
 UTF32LE_BOM = _ida_pro.UTF32LE_BOM
 
 UTF32BE_BOM = _ida_pro.UTF32BE_BOM
 
 CP_ELLIPSIS = _ida_pro.CP_ELLIPSIS
 
 UTF8_ELLIPSIS = _ida_pro.UTF8_ELLIPSIS
 
 CP_REPLCHAR = _ida_pro.CP_REPLCHAR
 
 UTF8_REPLCHAR = _ida_pro.UTF8_REPLCHAR
 
 MAX_UTF8_SEQ_LEN = _ida_pro.MAX_UTF8_SEQ_LEN
 
 CEF_RETERR = _ida_pro.CEF_RETERR
 
 ENC_WIN1252 = _ida_pro.ENC_WIN1252
 
 ENC_UTF8 = _ida_pro.ENC_UTF8
 
 ENC_MUTF8 = _ida_pro.ENC_MUTF8
 
 ENC_UTF16 = _ida_pro.ENC_UTF16
 
 ENC_UTF16LE = _ida_pro.ENC_UTF16LE
 
 ENC_UTF16BE = _ida_pro.ENC_UTF16BE
 
 ENC_UTF32 = _ida_pro.ENC_UTF32
 
 ENC_UTF32LE = _ida_pro.ENC_UTF32LE
 
 ENC_UTF32BE = _ida_pro.ENC_UTF32BE
 
 CP_UTF8 = _ida_pro.CP_UTF8
 
 CP_UTF16 = _ida_pro.CP_UTF16
 
 SUBSTCHAR = _ida_pro.SUBSTCHAR
 
 IOREDIR_INPUT = _ida_pro.IOREDIR_INPUT
 
 IOREDIR_OUTPUT = _ida_pro.IOREDIR_OUTPUT
 
 IOREDIR_APPEND = _ida_pro.IOREDIR_APPEND
 
 IOREDIR_QUOTED = _ida_pro.IOREDIR_QUOTED
 
 QWCONTINUED = _ida_pro.QWCONTINUED
 
 QWNOHANG = _ida_pro.QWNOHANG
 
 TCT_UNKNOWN = _ida_pro.TCT_UNKNOWN
 
 TCT_OWNER = _ida_pro.TCT_OWNER
 
 TCT_NOT_OWNER = _ida_pro.TCT_NOT_OWNER
 
 cvar = _ida_pro.cvar
 
 NULL_PIPE_HANDLE = cvar.NULL_PIPE_HANDLE
 
 longlongvec_t = int64vec_t
 
 ulonglongvec_t = uint64vec_t
 
 svalvec_t = int64vec_t
 
 uvalvec_t = uint64vec_t
 
 eavec_t = uvalvec_t
 

Function Documentation

◆ check_process_exit()

"int" check_process_exit ( * args)
Parameters
handle(C++: void *) process handle to wait for
exit_code(C++: int *) pointer to the buffer for the exit code
msecshow long to wait. special values:
  • 0: do not wait
  • 1 or -1: wait infinitely
  • other values: timeout in milliseconds
Return values
0process has exited, and the exit code is available. if *exit_code < 0: the process was killed with a signal -*exit_code
1process has not exited yet
-1error happened, see error code for winerr() in *exit_code

◆ ea_array_frompointer()

"ea_array *" ea_array_frompointer ( * args)
Parameters
tea_t *

◆ ea_pointer_frompointer()

"ea_pointer *" ea_pointer_frompointer ( * args)
Parameters
tea_t *

◆ extend_sign()

"uint64" extend_sign ( * args)

The value 'v' is considered to be of size 'nbytes'.

Parameters
v(C++: uint64)
nbytes(C++: int)
sign_extend(C++: bool)

◆ int_pointer_frompointer()

"int_pointer *" int_pointer_frompointer ( * args)
Parameters
tint *

◆ is_control_tty()

"enum tty_control_t" is_control_tty ( * args)
Parameters
fd(C++: int)

◆ is_cvt64()

"bool" is_cvt64 ( * args)

◆ is_main_thread()

"bool" is_main_thread ( * args)

◆ log2ceil()

"int" log2ceil ( * args)
Parameters
d64(C++: uint64)

◆ log2floor()

"int" log2floor ( * args)
Parameters
d64uint64

◆ parse_dbgopts()

"bool" parse_dbgopts ( * args)

r_switch points to the value of the -r switch. Example: win32@localhost+

Parameters
ido(C++: struct instant_dbgopts_t *) instant_dbgopts_t *
r_switch(C++: const char *) char const *
Returns
: true-ok, false-parse error

◆ qatoll()

"int64" qatoll ( * args)
Parameters
nptrchar const *

◆ qcontrol_tty()

"void" qcontrol_tty ( * args)
Note
: The current terminal is supposed to be /dev/tty

◆ qdetach_tty()

"void" qdetach_tty ( * args)
Note
: The current terminal is supposed to be /dev/tty

◆ qexit()

"void" qexit ( * args)
Parameters
code(C++: int) exit code

◆ qstrvec_t_add()

"bool" qstrvec_t_add ( * args)
Parameters
selfPyObject *
schar const *

◆ qstrvec_t_addressof()

"PyObject *" qstrvec_t_addressof ( * args)
Parameters
selfPyObject *
idxsize_t

◆ qstrvec_t_assign()

"bool" qstrvec_t_assign ( * args)
Parameters
selfPyObject *
otherPyObject *

◆ qstrvec_t_clear()

"bool" qstrvec_t_clear ( * args)
Parameters
selfPyObject *
qclearbool

◆ qstrvec_t_create()

"PyObject *" qstrvec_t_create ( * args)

◆ qstrvec_t_destroy()

"bool" qstrvec_t_destroy ( * args)
Parameters
py_objPyObject *

◆ qstrvec_t_from_list()

"bool" qstrvec_t_from_list ( * args)
Parameters
selfPyObject *
py_listPyObject *

◆ qstrvec_t_get()

"PyObject *" qstrvec_t_get ( * args)
Parameters
selfPyObject *
idxsize_t

◆ qstrvec_t_get_clink()

"qstrvec_t *" qstrvec_t_get_clink ( * args)
Parameters
selfPyObject *

◆ qstrvec_t_get_clink_ptr()

"PyObject *" qstrvec_t_get_clink_ptr ( * args)
Parameters
selfPyObject *

◆ qstrvec_t_insert()

"bool" qstrvec_t_insert ( * args)
Parameters
selfPyObject *
idxsize_t
schar const *

◆ qstrvec_t_remove()

"bool" qstrvec_t_remove ( * args)
Parameters
selfPyObject *
idxsize_t

◆ qstrvec_t_set()

"bool" qstrvec_t_set ( * args)
Parameters
selfPyObject *
idxsize_t
schar const *

◆ qstrvec_t_size()

"size_t" qstrvec_t_size ( * args)
Parameters
selfPyObject *

◆ qthread_equal()

"bool" qthread_equal ( * args)
Parameters
q1(C++: qthread_t)
q2(C++: qthread_t)

◆ quote_cmdline_arg()

"bool" quote_cmdline_arg ( * args)

For example, .c will be converted into "</em>.c" because * may be inadvertently expanded by the shell

Parameters
arg(C++: qstring *)
Returns
: true: modified 'arg'

◆ qvector_reserve()

"void *" qvector_reserve ( * args)
Parameters
vec(C++: void *) a pointer to a qvector
old(C++: void *) a pointer to the qvector's array
cnt(C++: size_t) number of elements to reserve
elsize(C++: size_t) size of each element
Returns
: a pointer to the newly allocated array

◆ readbytes()

"int" readbytes ( * args)
Parameters
h(C++: int) file handle
res(C++: uint32 *) value read from file
size(C++: int) size of value in bytes (1,2,4)
mf(C++: bool) is MSB first?
Returns
: 0 on success, nonzero otherwise

◆ reloc_value()

"void" reloc_value ( * args)
Parameters
valuevoid *
sizeint
deltaadiff_t
mfbool

◆ relocate_relobj()

"bool" relocate_relobj ( * args)
Parameters
_relobjrelobj_t *
eaea_t
mfbool

◆ sel_array_frompointer()

"sel_array *" sel_array_frompointer ( * args)
Parameters
tsel_t *

◆ sel_pointer_frompointer()

"sel_pointer *" sel_pointer_frompointer ( * args)
Parameters
tsel_t *

◆ str2user()

"PyObject *" str2user ( * args)
Parameters
strchar const *
Returns
: new string with escape characters inserted

◆ sval_pointer_frompointer()

"sval_pointer *" sval_pointer_frompointer ( * args)
Parameters
tsval_t *

◆ tid_array_frompointer()

"tid_array *" tid_array_frompointer ( * args)
Parameters
ttid_t *

◆ uchar_array_frompointer()

"uchar_array *" uchar_array_frompointer ( * args)
Parameters
tuchar *

◆ uval_array_frompointer()

"uval_array *" uval_array_frompointer ( * args)
Parameters
tuval_t *

◆ writebytes()

"int" writebytes ( * args)
Parameters
h(C++: int) file handle
l(C++: uint32) value to write
size(C++: int) size of value in bytes (1,2,4)
mf(C++: bool) is MSB first?
Returns
: 0 on success, nonzero otherwise

Variable Documentation

◆ _CRT_DECLARE_NONSTDC_NAMES

_CRT_DECLARE_NONSTDC_NAMES = _ida_pro._CRT_DECLARE_NONSTDC_NAMES
protected

◆ BADDIFF

BADDIFF = _ida_pro.BADDIFF

◆ BADMEMSIZE

BADMEMSIZE = _ida_pro.BADMEMSIZE

◆ CEF_RETERR

CEF_RETERR = _ida_pro.CEF_RETERR

◆ CP_BOM

CP_BOM = _ida_pro.CP_BOM

◆ CP_ELLIPSIS

CP_ELLIPSIS = _ida_pro.CP_ELLIPSIS

◆ CP_REPLCHAR

CP_REPLCHAR = _ida_pro.CP_REPLCHAR

◆ CP_UTF16

CP_UTF16 = _ida_pro.CP_UTF16

◆ CP_UTF8

CP_UTF8 = _ida_pro.CP_UTF8

◆ cvar

cvar = _ida_pro.cvar

◆ eavec_t

eavec_t = uvalvec_t

◆ ENC_MUTF8

ENC_MUTF8 = _ida_pro.ENC_MUTF8

◆ ENC_UTF16

ENC_UTF16 = _ida_pro.ENC_UTF16

◆ ENC_UTF16BE

ENC_UTF16BE = _ida_pro.ENC_UTF16BE

◆ ENC_UTF16LE

ENC_UTF16LE = _ida_pro.ENC_UTF16LE

◆ ENC_UTF32

ENC_UTF32 = _ida_pro.ENC_UTF32

◆ ENC_UTF32BE

ENC_UTF32BE = _ida_pro.ENC_UTF32BE

◆ ENC_UTF32LE

ENC_UTF32LE = _ida_pro.ENC_UTF32LE

◆ ENC_UTF8

ENC_UTF8 = _ida_pro.ENC_UTF8

◆ ENC_WIN1252

ENC_WIN1252 = _ida_pro.ENC_WIN1252

◆ FMT_64

FMT_64 = _ida_pro.FMT_64

◆ FMT_EA

FMT_EA = _ida_pro.FMT_EA

◆ FMT_Z

FMT_Z = _ida_pro.FMT_Z

◆ FMT_ZS

FMT_ZS = _ida_pro.FMT_ZS

◆ FMT_ZX

FMT_ZX = _ida_pro.FMT_ZX

◆ IDA_SDK_VERSION

IDA_SDK_VERSION = _ida_pro.IDA_SDK_VERSION

◆ IDBDEC_ESCAPE

IDBDEC_ESCAPE = _ida_pro.IDBDEC_ESCAPE

◆ IOREDIR_APPEND

IOREDIR_APPEND = _ida_pro.IOREDIR_APPEND

◆ IOREDIR_INPUT

IOREDIR_INPUT = _ida_pro.IOREDIR_INPUT

◆ IOREDIR_OUTPUT

IOREDIR_OUTPUT = _ida_pro.IOREDIR_OUTPUT

◆ IOREDIR_QUOTED

IOREDIR_QUOTED = _ida_pro.IOREDIR_QUOTED

◆ longlongvec_t

longlongvec_t = int64vec_t

◆ MAX_UTF8_SEQ_LEN

MAX_UTF8_SEQ_LEN = _ida_pro.MAX_UTF8_SEQ_LEN

◆ MAXSTR

MAXSTR = _ida_pro.MAXSTR

◆ NULL_PIPE_HANDLE

NULL_PIPE_HANDLE = cvar.NULL_PIPE_HANDLE

◆ QWCONTINUED

QWCONTINUED = _ida_pro.QWCONTINUED

◆ QWNOHANG

QWNOHANG = _ida_pro.QWNOHANG

◆ SUBSTCHAR

SUBSTCHAR = _ida_pro.SUBSTCHAR

◆ svalvec_t

svalvec_t = int64vec_t

◆ TCT_NOT_OWNER

TCT_NOT_OWNER = _ida_pro.TCT_NOT_OWNER

◆ TCT_OWNER

TCT_OWNER = _ida_pro.TCT_OWNER

◆ TCT_UNKNOWN

TCT_UNKNOWN = _ida_pro.TCT_UNKNOWN

◆ ulonglongvec_t

ulonglongvec_t = uint64vec_t

◆ UTF16BE_BOM

UTF16BE_BOM = _ida_pro.UTF16BE_BOM

◆ UTF16LE_BOM

UTF16LE_BOM = _ida_pro.UTF16LE_BOM

◆ UTF32BE_BOM

UTF32BE_BOM = _ida_pro.UTF32BE_BOM

◆ UTF32LE_BOM

UTF32LE_BOM = _ida_pro.UTF32LE_BOM

◆ UTF8_BOM

UTF8_BOM = _ida_pro.UTF8_BOM

◆ UTF8_ELLIPSIS

UTF8_ELLIPSIS = _ida_pro.UTF8_ELLIPSIS

◆ UTF8_REPLCHAR

UTF8_REPLCHAR = _ida_pro.UTF8_REPLCHAR

◆ uvalvec_t

uvalvec_t = uint64vec_t