Module ida_dbg
[frames] | no frames]

Module ida_dbg

IDA Plugin SDK API wrapper: dbg

Classes
  bpt_vec_t
Proxy of C++ qvector<(bpt_t)> class
  memreg_infos_t
Proxy of C++ qvector<(memreg_info_t)> class
  bpt_location_t
Proxy of C++ bpt_location_t class
  bpt_t
Proxy of C++ bpt_t class
  tev_info_t
Proxy of C++ tev_info_t class
  memreg_info_t
Proxy of C++ memreg_info_t class
  eval_ctx_t
Proxy of C++ eval_ctx_t class
  DBG_Hooks
Proxy of C++ DBG_Hooks class
Functions
bool
load_debugger(nonnul_dbgname, use_remote)
 
set_debugger_event_cond(nonnul_cond)
bool
diff_trace_file(nonnul_filename)
int
set_bptloc_string(s)
char const *
get_bptloc_string(i)
dbg_event_code_t
wait_for_next_event(wfne, timeout_in_secs)
debug_event_t
get_debug_event()
uint
set_debugger_options(options)
 
set_remote_debugger(host, _pass, port=-1)
 
get_process_options(path, args, sdir, host, _pass, port)
 
set_process_options(path, args, sdir, host, _pass, port)
excvec_t
retrieve_exceptions()
bool
store_exceptions()
char const *
define_exception(code, name, desc, flags)
bool
have_set_options(_dbg)
char const
set_dbg_options(_dbg, keyword, pri, value_type, value)
set_dbg_options(keyword, pri, value_type, value) -> char const *
char const *
set_dbg_default_options(keyword, value_type, value)
char const *
set_int_dbg_options(keyword, value)
source_view_t *
create_source_viewer(out_ccv, parent, custview, sf, lines, lnnum, colnum, flags)
bool
get_dbg_byte(x, ea)
bool
put_dbg_byte(ea, x)
 
invalidate_dbgmem_config()
 
invalidate_dbgmem_contents(ea, size)
bool
is_debugger_on()
bool
is_debugger_memory(ea)
bool
run_requests()
ui_notification_t
get_running_request()
dbg_notification_t
get_running_notification()
 
clear_requests_queue()
int
get_process_state()
int
start_process(path, args, sdir)
int
request_start_process(path, args, sdir)
bool
suspend_process()
bool
request_suspend_process()
bool
continue_process()
bool
request_continue_process()
bool
exit_process()
bool
request_exit_process()
ssize_t
get_processes(proclist)
int
attach_process(pid, event_id)
int
request_attach_process(pid, event_id)
bool
detach_process()
bool
request_detach_process()
int
get_thread_qty()
thid_t
getn_thread(n)
bool
select_thread(tid)
bool
request_select_thread(tid)
bool
set_resume_mode(tid, mode)
bool
request_set_resume_mode(tid, mode)
bool
step_into()
bool
request_step_into()
bool
step_over()
bool
request_step_over()
bool
run_to(ea)
bool
request_run_to(ea)
bool
step_until_ret()
bool
request_step_until_ret()
bool
get_sp_val(out)
bool
get_ip_val(out)
bool
get_reg_val(regname, regval)
bool
request_set_reg_val(regname, regval)
int
get_bpt_qty()
bool
getn_bpt(n, bpt)
bool
get_bpt(ea, bpt)
bool
find_bpt(bptloc, bpt)
bool
add_bpt(ea, size, type)
add_bpt(bpt) -> bool
bool
request_add_bpt(ea, size, type)
request_add_bpt(bpt) -> bool
bool
del_bpt(ea)
del_bpt(bptloc) -> bool
bool
request_del_bpt(ea)
request_del_bpt(bptloc) -> bool
bool
update_bpt(bpt)
bool
enable_bpt(ea, enable)
enable_bpt(bptloc, enable) -> bool
bool
request_enable_bpt(ea, enable)
request_enable_bpt(bptloc, enable) -> bool
bool
set_trace_size(size)
 
clear_trace()
 
request_clear_trace()
bool
is_step_trace_enabled()
bool
enable_step_trace(enable)
bool
request_enable_step_trace(enable)
int
get_step_trace_options()
 
set_step_trace_options(options)
 
request_set_step_trace_options(options)
bool
is_insn_trace_enabled()
bool
enable_insn_trace(enable)
bool
request_enable_insn_trace(enable)
int
get_insn_trace_options()
 
set_insn_trace_options(options)
 
request_set_insn_trace_options(options)
bool
is_func_trace_enabled()
bool
enable_func_trace(enable)
bool
request_enable_func_trace(enable)
int
get_func_trace_options()
 
set_func_trace_options(options)
 
request_set_func_trace_options(options)
 
set_highlight_trace_options(hilight, color, diff)
bool
is_bblk_trace_enabled()
bool
enable_bblk_trace(enable)
bool
request_enable_bblk_trace(enable)
int
get_bblk_trace_options()
 
set_bblk_trace_options(options)
 
request_set_bblk_trace_options(options)
int
get_tev_qty()
bool
get_tev_info(n, tev_info)
bool
get_insn_tev_reg_val(n, regname, regval)
bool
get_insn_tev_reg_mem(n, memmap)
bool
get_insn_tev_reg_result(n, regname, regval)
ea_t
get_call_tev_callee(n)
ea_t
get_ret_tev_return(n)
ea_t
get_bpt_tev_ea(n)
bool
get_tev_memory_info(n, mi)
bool
get_tev_event(n, d)
ea_t
get_tev_ea(n)
int
get_tev_type(n)
int
get_tev_tid(n)
ea_t
get_trace_base_address()
bool
load_trace_file(filename)
bool
save_trace_file(filename, description)
bool
is_valid_trace_file(filename)
bool
set_trace_file_desc(filename, description)
bool
get_trace_file_desc(filename)
bool
choose_trace_file()
 
set_trace_platform(platform)
char const *
get_trace_platform()
bool
graph_trace()
 
set_trace_base_address(ea)
 
dbg_add_thread(tid)
 
dbg_del_thread(tid)
 
dbg_add_tev(type, tid, address)
bool
dbg_add_many_tevs(new_tevs)
bool
dbg_add_insn_tev(tid, ea, save)
bool
dbg_add_bpt_tev(tid, ea, bp)
 
dbg_add_call_tev(tid, caller, callee)
 
dbg_add_ret_tev(tid, ret_insn, return_to)
 
dbg_add_debug_event(event)
bool
is_reg_integer(regname)
bool
is_reg_float(regname)
bool
is_reg_custom(regname)
bool
get_first_module(modinfo)
bool
get_next_module(modinfo)
 
bring_debugger_to_front()
thid_t
get_current_thread()
char const *
get_debugger_event_cond()
int
suspend_thread(tid)
int
request_suspend_thread(tid)
int
resume_thread(tid)
int
request_resume_thread(tid)
int
check_bpt(ea)
int
set_process_state(newstate, p_thid, dbginv)
 
edit_manual_regions()
 
enable_manual_regions(enable)
bool
is_debugger_busy()
int
hide_all_bpts()
int
handle_debug_event(ev, rqflags)
bool
add_virt_module(mod)
bool
del_virt_module(base)
int
internal_ioctl(fn, buf, poutbuf, poutsize)
ssize_t
read_dbg_memory(ea, buffer, size)
ssize_t
write_dbg_memory(ea, buffer, size)
int
get_reg_vals(tid, clsmask, values)
bool
set_reg_val(regname, regval)
set_reg_val(tid, regidx, value) -> int
int
get_dbg_memory_info(ranges)
 
set_bpt_group(bpt, grp_name)
bool
set_bptloc_group(bptloc, grp_name)
bool
get_bpt_group(bptloc)
bool
rename_bptgrp(old_name, new_name)
bool
del_bptgrp(name)
ssize_t
get_grp_bpts(bpts, grp_name)
PyObject *
get_manual_regions()
Returns the manual memory regions
bool
dbg_is_loaded()
Checks if a debugger is loaded
PyObject *
refresh_debugger_memory()
Refreshes the debugger memory
size_t
list_bptgrps(bptgrps)
list_bptgrps() -> PyObject *
 
move_bpt_to_grp(bpt, grp_name)
Sets new group for the breakpoint
ea_t
internal_get_sreg_base(tid, sreg_value)
Get the sreg base, for the given thread.
 
get_tev_reg_val(tev, reg)
 
get_tev_reg_mem_qty(tev)
 
get_tev_reg_mem(tev, idx)
 
get_tev_reg_mem_ea(tev, idx)
 
send_dbg_command(command)
Send a direct command to the debugger backend, and retrieve the result as a string.
Variables
  BPLT_ABS = 0
  BPLT_REL = 1
  BPLT_SYM = 2
  BPLT_SRC = 3
  BPT_BRK = 1
  BPT_TRACE = 2
  BPT_UPDMEM = 4
  BPT_ENABLED = 8
  BPT_LOWCND = 16
  BPT_TRACEON = 32
  BPT_TRACE_INSN = 64
  BPT_TRACE_FUNC = 128
  BPT_TRACE_BBLK = 256
  BPT_TRACE_TYPES = 448
  BPT_ELANG_MASK = 4026531840
  BPT_ELANG_SHIFT = 28
  BKPT_BADBPT = 1
  BKPT_LISTBPT = 2
  BKPT_TRACE = 4
  BKPT_ACTIVE = 8
  BKPT_PARTIAL = 16
  BKPT_CNDREADY = 32
  BKPT_FAKEPEND = 64
  BKPT_PAGE = 128
  MOVBPT_OK = 0
  MOVBPT_NOT_FOUND = 1
  MOVBPT_DEST_BUSY = 2
  MOVBPT_BAD_TYPE = 3
  tev_none = 0
  tev_insn = 1
  tev_call = 2
  tev_ret = 3
  tev_bpt = 4
  tev_mem = 5
  tev_event = 6
  tev_max = 7
  DEC_NOTASK = -2
  DEC_ERROR = -1
  DEC_TIMEOUT = 0
  WFNE_ANY = 1
  WFNE_SUSP = 2
  WFNE_SILENT = 4
  WFNE_CONT = 8
  WFNE_NOWAIT = 16
  WFNE_USEC = 32
  DOPT_SEGM_MSGS = 1
  DOPT_START_BPT = 2
  DOPT_THREAD_MSGS = 4
  DOPT_THREAD_BPT = 8
  DOPT_BPT_MSGS = 16
  DOPT_LIB_MSGS = 64
  DOPT_LIB_BPT = 128
  DOPT_INFO_MSGS = 256
  DOPT_INFO_BPT = 512
  DOPT_REAL_MEMORY = 1024
  DOPT_REDO_STACK = 2048
  DOPT_ENTRY_BPT = 4096
  DOPT_EXCDLG = 24576
  EXCDLG_NEVER = 0
  EXCDLG_UNKNOWN = 8192
  EXCDLG_ALWAYS = 24576
  DOPT_LOAD_DINFO = 32768
  DOPT_END_BPT = 65536
  DOPT_TEMP_HWBPT = 131072
  SRCIT_NONE = 0
  SRCIT_MODULE = 1
  SRCIT_FUNC = 2
  SRCIT_STMT = 3
  SRCIT_EXPR = 4
  SRCIT_STTVAR = 5
  SRCIT_LOCVAR = 6
  SRCDBG_PROV_VERSION = 4
  __package__ = None
Function Details

get_manual_regions()

 

Returns the manual memory regions

Returns: PyObject *
list(start_ea, end_ea, name, sclass, sbase, bitness, perm)

dbg_is_loaded()

 

Checks if a debugger is loaded

Returns: bool
Boolean

refresh_debugger_memory()

 

Refreshes the debugger memory

Returns: PyObject *
Nothing

internal_get_sreg_base(tid, sreg_value)

 

Get the sreg base, for the given thread.

Returns: ea_t
The sreg base, or BADADDR on failure.

send_dbg_command(command)

 

Send a direct command to the debugger backend, and retrieve the result as a string.

Note: any double-quotes in 'command' must be backslash-escaped. Note: this only works with some debugger backends: Bochs, WinDbg, GDB.

Returns: (True, <result string>) on success, or (False, <Error message string>) on failure