IDA C++ SDK 9.2
|
Contains definition of the interface to IDD modules. More...
Go to the source code of this file.
Classes | |
struct | process_info_t |
Process information. More... | |
struct | debapp_attrs_t |
Runtime attributes of the debugger/process. More... | |
struct | register_info_t |
Debuggee register information. More... | |
struct | dynamic_register_set_t |
struct | memory_info_t |
Used by debugger modules to report memory are information to IDA kernel. More... | |
struct | meminfo_vec_t |
vector of memory info objects More... | |
struct | scattered_segm_t |
Used by debugger modules to keep track of images that are not mapped uniformly into memory. More... | |
struct | launch_env_t |
Used by debugger modules to launching processes with environment variables. More... | |
struct | modinfo_t |
Describes a module load event. More... | |
struct | bptaddr_t |
Describes a breakpoint event. More... | |
struct | excinfo_t |
Describes an exception. More... | |
struct | debug_event_t |
This structure is used only when detailed information about a debug event is needed. More... | |
struct | exception_info_t |
Exception information. More... | |
struct | regval_t |
Structure to hold a register value. More... | |
struct | idd_opinfo_t |
Instruction operand information. More... | |
struct | call_stack_info_t |
Call stack trace information. More... | |
struct | call_stack_t |
defined as struct so it can be forward-declared More... | |
struct | update_bpt_info_t |
Input argument for update_bpts() More... | |
struct | lowcnd_t |
Input argument for update_lowcnds(). More... | |
struct | thread_name_t |
Output argument for ev_suspended New thread names. More... | |
struct | debugger_t |
This structure describes a debugger API module. More... |
Typedefs | |
typedef int | pid_t |
process id | |
typedef int | thid_t |
thread id | |
typedef qvector< process_info_t > | procinfo_vec_t |
typedef unsigned char | register_class_t |
Each register is associated to a register class. | |
typedef qvector< register_info_t > | register_info_vec_t |
typedef qvector< scattered_segm_t > | scattered_image_t |
vector of scattered segments | |
typedef qvector< modinfo_t > | modinfovec_t |
typedef int | bpttype_t |
hardware breakpoint type (see Hardware breakpoint ids) | |
typedef qvector< exception_info_t > | excvec_t |
vector of exception info objects | |
typedef qvector< regval_t > | regvals_t |
vector register value objects | |
typedef qvector< update_bpt_info_t > | update_bpt_vec_t |
vector of update breakpoint info objects | |
typedef qvector< lowcnd_t > | lowcnd_vec_t |
vector of low-level breakpoint conditions | |
typedef qvector< thread_name_t > | thread_name_vec_t |
vector of thread names |
Enumerations | |
enum | event_id_t { NO_EVENT = 0 , PROCESS_STARTED = 1 , PROCESS_EXITED = 2 , THREAD_STARTED = 3 , THREAD_EXITED = 4 , BREAKPOINT = 5 , STEP = 6 , EXCEPTION = 7 , LIB_LOADED = 8 , LIB_UNLOADED = 9 , INFORMATION = 10 , PROCESS_ATTACHED = 11 , PROCESS_DETACHED = 12 , PROCESS_SUSPENDED = 13 , TRACE_FULL = 14 , STATUS_MASK = 0xF0000000 , BITNESS_CHANGED = 0x80000000 } |
Debug event codes. More... | |
enum | gdecode_t { GDE_ERROR = -1 , GDE_NO_EVENT , GDE_ONE_EVENT , GDE_MANY_EVENTS } |
Return values for get_debug_event() More... | |
enum | resume_mode_t { RESMOD_NONE , RESMOD_INTO , RESMOD_OVER , RESMOD_OUT , RESMOD_SRCINTO , RESMOD_SRCOVER , RESMOD_SRCOUT , RESMOD_USER , RESMOD_HANDLE , RESMOD_BACKINTO , RESMOD_MAX } |
How to resume the application. More... | |
enum | drc_t { DRC_EVENTS = 3 , DRC_CRC = 2 , DRC_OK = 1 , DRC_NONE = 0 , DRC_FAILED = -1 , DRC_NETERR = -2 , DRC_NOFILE = -3 , DRC_IDBSEG = -4 , DRC_NOPROC = -5 , DRC_NOCHG = -6 , DRC_ERROR = -7 } |
Debugger return codes. More... |
Functions | |
DECLARE_TYPE_AS_MOVABLE (process_info_t) | |
DECLARE_TYPE_AS_MOVABLE (register_info_t) | |
idaman THREAD_SAFE void ida_export | serialize_dynamic_register_set (bytevec_t *buf, dynamic_register_set_t &idaregs) |
idaman THREAD_SAFE void ida_export | deserialize_dynamic_register_set (dynamic_register_set_t *idaregs, memory_deserializer_t &mmdsr) |
idaman THREAD_SAFE void ida_export | serialize_insn (bytevec_t *s, const insn_t &insn) |
idaman THREAD_SAFE void ida_export | deserialize_insn (insn_t *insn, memory_deserializer_t &mmdsr) |
DECLARE_TYPE_AS_MOVABLE (memory_info_t) | |
DECLARE_TYPE_AS_MOVABLE (scattered_segm_t) | |
idaman THREAD_SAFE void ida_export | free_debug_event (debug_event_t *ev) |
idaman THREAD_SAFE void ida_export | copy_debug_event (debug_event_t *ev, const debug_event_t &r) |
idaman THREAD_SAFE void ida_export | set_debug_event_code (debug_event_t *ev, event_id_t id) |
DECLARE_TYPE_AS_MOVABLE (modinfo_t) | |
DECLARE_TYPE_AS_MOVABLE (debug_event_t) | |
const char * | get_debug_event_name (const debug_event_t &dev) |
get debug event name | |
DECLARE_TYPE_AS_MOVABLE (exception_info_t) | |
DECLARE_TYPE_AS_MOVABLE (regval_t) | |
DECLARE_TYPE_AS_MOVABLE (call_stack_info_t) | |
THREAD_SAFE void | append_regval (bytevec_t &s, const regval_t &value) |
template<class T> | |
THREAD_SAFE void | extract_regval (regval_t *out, T &v) |
template<class T> | |
THREAD_SAFE void | extract_regvals (regval_t *values, int n, T &v, const uchar *regmap) |
THREAD_SAFE void | unpack_regvals (regval_t *values, int n, const uchar *regmap, memory_deserializer_t &mmdsr) |
idaman error_t ida_export | dbg_appcall (idc_value_t *retval, ea_t func_ea, thid_t tid, const tinfo_t *ptif, idc_value_t *argv, size_t argnum) |
Call a function from the debugged application. | |
idaman error_t ida_export | cleanup_appcall (thid_t tid) |
Cleanup after manual appcall. | |
DECLARE_TYPE_AS_MOVABLE (update_bpt_info_t) | |
idaman int ida_export | cpu2ieee (fpvalue_t *ieee_out, const void *cpu_fpval, int size) |
Convert a floating point number in CPU native format to IDA's internal format. | |
idaman int ida_export | ieee2cpu (void *cpu_fpval_out, const fpvalue_t &ieee, int size) |
Convert a floating point number in IDA's internal format to CPU native format. |
Variables | |
const bpttype_t | BPT_WRITE = 1 |
Write access. | |
const bpttype_t | BPT_READ = 2 |
Read access. | |
const bpttype_t | BPT_RDWR = 3 |
Read/write access. | |
const bpttype_t | BPT_SOFT = 4 |
Software breakpoint. | |
const bpttype_t | BPT_EXEC = 8 |
Execute instruction. | |
const bpttype_t | BPT_DEFAULT = (BPT_SOFT|BPT_EXEC) |
Choose bpt type automatically. |
Contains definition of the interface to IDD modules.
The interface consists of structures describing the target debugged processor and a debugging API.
typedef int pid_t |
process id
typedef int thid_t |
thread id
typedef qvector<process_info_t> procinfo_vec_t |
typedef unsigned char register_class_t |
Each register is associated to a register class.
example: "segment", "mmx", ...
typedef qvector<register_info_t> register_info_vec_t |
typedef qvector<scattered_segm_t> scattered_image_t |
vector of scattered segments
typedef qvector<modinfo_t> modinfovec_t |
typedef int bpttype_t |
hardware breakpoint type (see Hardware breakpoint ids)
typedef qvector<exception_info_t> excvec_t |
vector of exception info objects
typedef qvector<update_bpt_info_t> update_bpt_vec_t |
vector of update breakpoint info objects
typedef qvector<lowcnd_t> lowcnd_vec_t |
vector of low-level breakpoint conditions
typedef qvector<thread_name_t> thread_name_vec_t |
vector of thread names
enum event_id_t |
Debug event codes.
Enumerator | |
---|---|
NO_EVENT | Not an interesting event. This event can be used if the debugger module needs to return an event but there are no valid events. |
PROCESS_STARTED | New process has been started. |
PROCESS_EXITED | Process has been stopped. |
THREAD_STARTED | New thread has been started. |
THREAD_EXITED | Thread has been stopped. |
BREAKPOINT | Breakpoint has been reached. IDA will complain about unknown breakpoints, they should be reported as exceptions. |
STEP | One instruction has been executed. Spurious events of this kind are silently ignored by IDA. |
EXCEPTION | Exception. |
LIB_LOADED | New library has been loaded. |
LIB_UNLOADED | Library has been unloaded. |
INFORMATION | User-defined information. This event can be used to return empty information This will cause IDA to call get_debug_event() immediately once more. |
PROCESS_ATTACHED | Successfully attached to running process. |
PROCESS_DETACHED | Successfully detached from process. |
PROCESS_SUSPENDED | Process has been suspended. This event can be used by the debugger module to signal if the process spontaneously gets suspended (not because of an exception, breakpoint, or single step). IDA will silently switch to the 'suspended process' mode without displaying any messages. |
TRACE_FULL | The trace buffer of the tracer module is full and IDA needs to read it before continuing. |
STATUS_MASK | additional info about process state |
BITNESS_CHANGED | Debugger detected the process bitness changing. |
enum gdecode_t |
Return values for get_debug_event()
Enumerator | |
---|---|
GDE_ERROR | error |
GDE_NO_EVENT | no debug events are available |
GDE_ONE_EVENT | got one event, no more available yet |
GDE_MANY_EVENTS | got one event, more events available |
enum resume_mode_t |
How to resume the application.
The corresponding bit for Debugger module features must be set in order to use a resume mode.
enum drc_t |
Debugger return codes.
Success if positive (> DRC_NONE).
DECLARE_TYPE_AS_MOVABLE | ( | process_info_t | ) |
DECLARE_TYPE_AS_MOVABLE | ( | register_info_t | ) |
idaman THREAD_SAFE void ida_export serialize_dynamic_register_set | ( | bytevec_t * | buf, |
dynamic_register_set_t & | idaregs ) |
idaman THREAD_SAFE void ida_export deserialize_dynamic_register_set | ( | dynamic_register_set_t * | idaregs, |
memory_deserializer_t & | mmdsr ) |
idaman THREAD_SAFE void ida_export deserialize_insn | ( | insn_t * | insn, |
memory_deserializer_t & | mmdsr ) |
DECLARE_TYPE_AS_MOVABLE | ( | memory_info_t | ) |
DECLARE_TYPE_AS_MOVABLE | ( | scattered_segm_t | ) |
idaman THREAD_SAFE void ida_export free_debug_event | ( | debug_event_t * | ev | ) |
idaman THREAD_SAFE void ida_export copy_debug_event | ( | debug_event_t * | ev, |
const debug_event_t & | r ) |
idaman THREAD_SAFE void ida_export set_debug_event_code | ( | debug_event_t * | ev, |
event_id_t | id ) |
DECLARE_TYPE_AS_MOVABLE | ( | modinfo_t | ) |
DECLARE_TYPE_AS_MOVABLE | ( | debug_event_t | ) |
|
inline |
get debug event name
DECLARE_TYPE_AS_MOVABLE | ( | exception_info_t | ) |
DECLARE_TYPE_AS_MOVABLE | ( | regval_t | ) |
DECLARE_TYPE_AS_MOVABLE | ( | call_stack_info_t | ) |
|
inline |
|
inline |
idaman error_t ida_export dbg_appcall | ( | idc_value_t * | retval, |
ea_t | func_ea, | ||
thid_t | tid, | ||
const tinfo_t * | ptif, | ||
idc_value_t * | argv, | ||
size_t | argnum ) |
Call a function from the debugged application.
[out] | retval | function return value
|
func_ea | address to call | |
tid | thread to use. #NO_THREAD means to use the current thread | |
ptif | pointer to type of the function to call | |
argv | array of arguments | |
argnum | number of actual arguments |
Cleanup after manual appcall.
tid | thread to use. #NO_THREAD means to use the current thread The application state is restored as it was before calling the last appcall(). Nested appcalls are supported. |
DECLARE_TYPE_AS_MOVABLE | ( | update_bpt_info_t | ) |
Convert a floating point number in CPU native format to IDA's internal format.
ieee_out | output buffer |
cpu_fpval | floating point number in CPU native format |
size | size of cpu_fpval in bytes (size of the input buffer) |
Convert a floating point number in IDA's internal format to CPU native format.
cpu_fpval_out | output buffer |
ieee | floating point number of IDA's internal format |
size | size of cpu_fpval in bytes (size of the output buffer) |