| IDA SDK

Modules | Functions
Debugger functions

## Detailed Description

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.

## Modules
| Process commands
| Use these functions to manipulate the debugged process.
| Threads
| Inspect/Manipulate threads of debugged process.
| Modules
| Functions to enumerate modules loaded into the process.
| Execution flow control
| Use these functions to run instructions in the debugged process.
| Registers
| Inspect/Manipulate registers for debugged process.
| Breakpoints
| Work with debugger breakpoints.
| Tracing
| Trace instructions/functions/basic blocks.
| High level functions
| These functions can be used from scripts.
| Source information providers
| These providers supply information about the source files and lines to the source level debugger.
| Debugger memory functions for UI
| Inspect debugged process memory.
| Misc
| Convenience functions offered by the user interface.

## Functions
bool idaapi | run_requests (void)
| Execute requests until all requests are processed or an asynchronous function is called. More...
ui_notification_t idaapi | get_running_request (void)
| Get the current running request. More...
bool | is_request_running (void)
| Is a request currently running?
dbg_notification_t idaapi | get_running_notification (void)
| Get the notification associated (if any) with the current running request. More...
void idaapi | clear_requests_queue (void)
| Clear the queue of waiting requests. More...

## Function Documentation

## ◆ 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()

ui_notification_t idaapi get_running_request | ( | void |  | ) |
| inline

Get the current running request.

Type | Synchronous function
Notification | none (synchronous function)

Returns
  ui_null if no running request

## ◆ get_running_notification()

dbg_notification_t idaapi get_running_notification | ( | void |  | ) |
| inline

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.