Control the debugging of a process.
More...
Control the debugging of a process.
Debugger functions complete either SYNCHRONOUSLY or ASYNCHRONOUSLY:
- SYNCHRONOUS FUNCTIONS execute the entire action before the function returns.
- ASYNCHRONOUS FUNCTIONS return before the action has executed in its entirety. They simply start the action, but the result of the action will only be available later. For example, run_to() can execute a lot of instructions before terminating. Such functions provide a notification code to indicate the end of their execution (see the 'Notification' keyword in the function documentation). Install a callback using hook_to_notification_point() to be notified when the action is terminated.
DEBUGGER COMMANDS are functions who influence the execution of the debugged process. They are available in 2 forms:
- COMMAND(): (e.g. suspend_process()) In this mode, the command will be directly executed. However, it is forbidden to use asynchronous commands in this mode from a debugger notification handler (see dbg_notification_t).
- request_COMMAND(): (e.g. request_suspend_process()) In this mode, a REQUEST to run the command will be memorized at the end of the REQUEST QUEUE (see below). This is mandatory to use this mode for asynchronous commands from a debugger notification handler (see dbg_notification_t).
The REQUEST QUEUE contains a list of planned debugger commands. These commands will be started only in the following cases:
- the previous command terminated, and no call to suspend_process() or continue_process() occurred in the asynchronous function result notification handler (if any).
- run_requests() was called. Please note that when called from a debugger notification handler the queued requests will only be started after the execution of all notification handlers.
A request which fails to start (by returning 0) will generate a dbg_request_error notification.
◆ run_requests()
bool idaapi run_requests |
( |
void |
| ) |
|
|
inline |
Execute requests until all requests are processed or an asynchronous function is called.
Type | Synchronous function |
Notification | none (synchronous function) |
- Returns
- false if not all requests could be processed (indicates an asynchronous function was started)
- Note
- If called from a notification handler, the execution of requests will be postponed to the end of the execution of all notification handlers.
◆ get_running_request()
Get the current running request.
Type | Synchronous function |
Notification | none (synchronous function) |
- Returns
- ui_null if no running request
◆ get_running_notification()
Get the notification associated (if any) with the current running request.
Type | Synchronous function |
Notification | none (synchronous function) |
- Returns
- dbg_null if no running request
◆ clear_requests_queue()
void idaapi clear_requests_queue |
( |
void |
| ) |
|
|
inline |
Clear the queue of waiting requests.
Type | Synchronous function |
Notification | none (synchronous function) |
- Note
- If a request is currently running, this one isn't stopped.