Trees | Indices | Help |
|
---|
|
IDA Plugin SDK API wrapper: dbg
Classes | |
DBG_Hooks Proxy of C++ DBG_Hooks class. |
|
bpt_location_t Proxy of C++ bpt_location_t class. |
|
bpt_t Proxy of C++ bpt_t class. |
|
bpt_vec_t Proxy of C++ qvector< bpt_t > class. |
|
eval_ctx_t Proxy of C++ eval_ctx_t class. |
|
memreg_info_t Proxy of C++ memreg_info_t class. |
|
memreg_infos_t Proxy of C++ qvector< memreg_info_t > class. |
|
tev_info_reg_t Proxy of C++ tev_info_reg_t class. |
|
tev_info_t Proxy of C++ tev_info_t class. |
|
tev_reg_value_t Proxy of C++ tev_reg_value_t class. |
|
tev_reg_values_t Proxy of C++ qvector< tev_reg_value_t > class. |
|
tevinforeg_vec_t Proxy of C++ qvector< tev_info_reg_t > class. |
Functions | |||
bool |
|
||
|
|||
bool |
|
||
int |
|
||
|
|||
int |
|
||
str |
|
||
|
|||
|
|||
bool |
|
||
bool |
|
||
source_view_t * |
|
||
bool |
|
||
|
|||
|
|||
bool |
|
||
bool |
|
||
|
|||
|
|||
|
|||
str |
|
||
bool |
|
||
|
|||
bool |
|
||
char const * |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
|
|||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
|
|||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
int |
|
||
bool |
|
||
str |
|
||
int |
|
||
ea_t |
|
||
char const * |
|
||
ea_t |
|
||
bool |
|
||
int |
|
||
thid_t |
|
||
bool |
|
||
int |
|
||
bool |
|
||
debug_event_t |
|
||
char const * |
|
||
bool |
|
||
int |
|
||
bool |
|
||
ssize_t |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
int |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
|
|||
bool |
|
||
bool |
|
||
|
|||
int |
|
||
ssize_t |
|
||
bool |
|
||
int |
|
||
ea_t |
|
||
dbg_notification_t |
|
||
ui_notification_t |
|
||
bool |
|
||
srcinfo_provider_t * |
|
||
int |
|
||
ea_t |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
int |
|
||
|
|||
|
|||
|
|||
|
|||
int |
|
||
int |
|
||
int |
|
||
ea_t |
|
||
str |
|
||
char const * |
|
||
bool |
|
||
thid_t |
|
||
char const * |
|
||
bool |
|
||
int |
|
||
int |
|
||
ea_t |
|
||
int |
|
||
int |
|
||
|
|||
|
|||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
size_t |
|
||
bool |
|
||
str |
|
||
|
|||
bool |
|
||
ssize_t |
|
||
PyObject * |
|
||
bool |
|
||
bool |
|
||
int |
|
||
|
|||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
int |
|
||
bool |
|
||
bool |
|
||
|
|||
|
|||
|
|||
PyObject * |
|
||
bool |
|
||
|
|||
int |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
int |
|
||
int |
|
||
excvec_t |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
|
|||
|
|||
|
|||
bool |
|
||
int |
|
||
|
|||
uint |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
int |
|
||
PyObject |
|
||
|
|||
bool |
|
||
|
|||
|
|||
bool |
|
||
|
|||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
int |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
bool |
|
||
int |
|
||
bool |
|
||
dbg_event_code_t |
|
||
ssize_t |
|
Function Details |
add_bpt(bpt) -> bool Add a new breakpoint in the debugged process. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}Only one breakpoint can exist at a given address.
|
Attach the debugger to a running process. \sq{Type, Asynchronous function - available as Request, Notification, 'dbg_process_attach' }This function shouldn't be called as a request if 'NO_PROCESS' is used.
|
Check the breakpoint at the specified address.
|
Clear the queue of waiting requests. \sq{Type, Synchronous function, Notification, none (synchronous function)}If a request is currently running, this one isn't stopped. |
Clear all events in the trace buffer. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} |
Continue the execution of the process in the debugger. \sq{Type, Synchronous function - available as Request, Notification, none (synchronous function)}The 'continue_process()' function can be called from a notification handler to force the continuation of the process. In this case the request queue will not be examined, IDA will simply resume execution. Usually it makes sense to call 'request_continue_process()' followed by 'run_requests()' , so that IDA will first start a queued request (if any) and then resume the application.
|
Create a source code view.
|
Add a new breakpoint trace element to the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Add a new call trace element to the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Add a new debug event to the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Add a new instruction trace element to the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Add many new trace elements to the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Add a new return trace element to the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Add a new trace element to the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Add a thread to the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
This function can be used to check if the debugger can be queried:
|
Delete a thread from the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Checks if a debugger is loaded
|
Convenience function: define new exception code.
|
del_bpt(bptloc) -> bool Delete an existing breakpoint in the debugged process. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}
|
Detach the debugger from the debugged process. \sq{Type, Asynchronous function - available as Request, Notification, 'dbg_process_detach' }
|
Does a breakpoint exist at the given location?
|
Terminate the debugging of the current process. \sq{Type, Asynchronous function - available as Request, Notification, 'dbg_process_exit' }
|
Find a breakpoint by location. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}
|
Get current basic block tracing options. Also see 'BT_LOG_INSTS' \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the characteristics of a breakpoint. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get number of breakpoints. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the address associated to a read, read/write or execution trace event. \sq{Type, Synchronous function, Notification, none (synchronous function)}Usually, a breakpoint is associated with a read, read/write or execution trace event. However, the returned address could be any address in the range of this breakpoint. If the breakpoint was deleted after the trace event, the address no longer corresponds to a valid breakpoint.
|
Helper function for 'bpt_location_t' .
|
Get the called function from a function call trace event. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get current thread ID. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get one byte of the debugged process memory.
|
Get register information \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get current function tracing options. Also see 'FT_LOG_RET' \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Read the memory pointed by register values from an instruction trace event. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Read the resulting register value from an instruction trace event. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Read a register value from an instruction trace event. \sq{Type, Synchronous function, Notification, none (synchronous function)}This is the value of the register before the execution of the instruction.
|
Get current instruction tracing options. Also see 'IT_LOG_SAME_IP' \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get value of the IP (program counter) register for the current thread. Requires a suspended debugger.
|
get_manual_regions() -> PyObject * Returns the manual memory regions
|
Get process options. Any of the arguments may be NULL
|
Return the state of the currently debugged process. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Take a snapshot of running processes and return their description. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
get_reg_val(regname, ival) -> bool get_reg_val(regname) -> PyObject * Read a register value from the current thread. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the return address from a function return trace event. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the notification associated (if any) with the current running request. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the current running request. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get value of the SP register for the current thread. Requires a suspended debugger.
|
Get current step tracing options. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the corresponding debug event, if any, for the specified tev object. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get main information about a trace event. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the memory layout, if any, for the specified tev object. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get number of trace events available in trace buffer. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get number of threads. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the base address of the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the file header of the specified trace file.
|
Get the characteristics of a breakpoint. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the ID of a thread. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the NAME of a thread \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get the sreg base, for the given thread.
|
Invalidate cached debugger information. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Invalidate the debugged process memory configuration. Call this function if the debugged process might have changed its memory layout (allocated more memory, for example) |
Invalidate the debugged process memory contents. Call this function each time the process has been stopped or the process memory is modified. If ea == 'BADADDR' , then the whole memory contents will be invalidated
|
Is the debugger busy?. Some debuggers do not accept any commands while the debugged application is running. For such a debugger, it is unsafe to do anything with the database (even simple queries like get_byte may lead to undesired consequences). Returns: true if the debugged application is running under such a debugger
|
Is the address mapped to debugger memory?
|
Get current state of functions tracing. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get current state of instructions tracing. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Does a register contain a value of a custom data type? \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Does a register contain a floating point value? \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Does a register contain an integer value? \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Get current state of step tracing. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Is the specified file a valid trace file for the current database?
|
Load a recorded trace file in the trace window. If the call succeeds and 'buf' is not null, the description of the trace stored in the binary trace file will be returned in 'buf'
|
Change one byte of the debugged process memory.
|
Refreshes the debugger memory
|
request_add_bpt(bpt) -> bool Post an 'add_bpt(ea_t, asize_t, bpttype_t)' request.
|
Post an 'attach_process()' request.
|
request_del_bpt(bptloc) -> bool Post a 'del_bpt(ea_t)' request.
|
Post a 'resume_thread()' request.
|
Post a 'run_to()' request.
|
Post a 'select_thread()' request.
|
Post a 'set_bblk_trace_options()' request.
|
Post a 'set_func_trace_options()' request.
|
Post a 'set_insn_trace_options()' request.
|
Post a 'set_reg_val()' request.
|
Post a 'set_resume_mode()' request.
|
Post a 'set_step_trace_options()' request.
|
Post a 'start_process()' request.
|
Post a 'suspend_thread()' request.
|
Resume thread. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}
|
Retrieve the exception information. You may freely modify the returned vector and add/edit/delete exceptions You must call 'store_exceptions()' after any modifications Note: exceptions with code zero, multiple exception codes or names are prohibited
|
Execute requests until all requests are processed or an asynchronous function is called. \sq{Type, Synchronous function, Notification, none (synchronous function)}If called from a notification handler, the execution of requests will be postponed to the end of the execution of all notification handlers.
|
Execute the process until the given address is reached. If no process is active, a new process is started. Technically, the debugger sets up a temporary breakpoint at the given address, and continues (or starts) the execution of the whole process. So, all threads continue their execution! \sq{Type, Asynchronous function - available as Request, Notification, 'dbg_run_to' }
|
Save the current trace in the specified file.
|
Select the given thread as the current debugged thread. All thread related execution functions will work on this thread. The process must be suspended to select a new thread. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}
|
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 |
Modify basic block tracing options (see 'BT_LOG_INSTS' )
|
Helper function for 'bpt_location_t' .
|
Set debugger options. Replaces debugger options with the specification combination 'Debugger options'
|
Modify function tracing options. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}
|
Set highlight trace parameters.
|
Modify instruction tracing options. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}
|
Set process options. Any of the arguments may be NULL, which means 'do not modify'
|
Set new state for the debugged process. Notifies the IDA kernel about the change of the debugged process state. For example, a debugger module could call this function when it knows that the process is suspended for a short period of time. Some IDA API calls can be made only when the process is suspended. The process state is usually restored before returning control to the caller. You must know that it is ok to change the process state, doing it at arbitrary moments may crash the application or IDA. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
set_reg_val(tid, regidx, o) -> PyObject * Write a register value to the current thread. \sq{Type, Synchronous function - available as Request, Notification, none (synchronous function)}
|
Set remote debugging options. Should be used before starting the debugger.
|
How to resume the application. Set resume mode but do not resume process.
|
Modify step tracing options. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}
|
Set the base address of the current trace. \sq{Type, Synchronous function, Notification, none (synchronous function)}
|
Change the description of the specified trace file.
|
Set platform name of current trace.
|
Specify the new size of the circular buffer. \sq{Type, Synchronous function, Notification, none (synchronous function)}If you specify 0, all available memory can be quickly used !!!
|
Start a process in the debugger. \sq{Type, Asynchronous function - available as Request, Notification, 'dbg_process_start' }You can also use the 'run_to()' function to easily start the execution of a process until a given address is reached.For all parameters, a NULL value indicates the debugger will take the value from the defined Process Options.
|
Execute one instruction in the current thread. Other threads are kept suspended. \sq{Type, Asynchronous function - available as Request, Notification, 'dbg_step_into' }
|
Execute one instruction in the current thread, but without entering into functions. Others threads keep suspended. \sq{Type, Asynchronous function - available as Request, Notification, 'dbg_step_over' }
|
Execute instructions in the current thread until a function return instruction is executed (aka "step out"). Other threads are kept suspended. \sq{Type, Asynchronous function - available as Request, Notification, 'dbg_step_until_ret' }
|
Suspend the process in the debugger. \sq{ Type,Synchronous function (if in a notification handler)Asynchronous function (everywhere else)available as Request, Notification,none (if in a notification handler) 'dbg_suspend_process' (everywhere else) }The 'suspend_process()' function can be called from a notification handler to force the stopping of the process. In this case, no notification will be generated. When you suspend a process, the running command is always aborted.
|
Suspend thread. Suspending a thread may deadlock the whole application if the suspended was owning some synchronization objects. \sq{Type, Synchronous function - available as request, Notification, none (synchronous function)}
|
Update modifiable characteristics of an existing breakpoint. To update the breakpoint location, use 'change_bptlocs()' \sq{Type, Synchronous function, Notification, none (synchronous function)}Only the following fields can be modified: 'bpt_t::cndbody' 'bpt_t::pass_count' 'bpt_t::flags' 'bpt_t::size' 'bpt_t::type' Changing some properties will require removing and then re-adding the breakpoint to the process memory (or the debugger backend), which can lead to race conditions (i.e., breakpoint(s) can be missed) in case the process is not suspended. Here are a list of scenarios that will require the breakpoint to be removed & then re-added: 'bpt_t::size' is modified 'bpt_t::type' is modified 'bpt_t::flags' 's BPT_ENABLED is modified 'bpt_t::flags' 's BPT_LOWCND is changed 'bpt_t::flags' 's BPT_LOWCND remains set, but cndbody changed
|
Wait for the next event.This function (optionally) resumes the process execution, and waits for a debugger event until a possible timeout occurs.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Oct 11 15:05:11 2019 | http://epydoc.sourceforge.net |