# Remote GDB Debugger

Remote GDB Debugger module allows for debugging code using the GDB remote serial protocol. For this, the debuggee must contain a so-called "GDB stub" that controls the execution and handles the remote protocol commands. There are many implementations of such stubs available with different capabilities. The module has been tested with the following GDB stubs: [gdbserver](/core/debugger/concepts/remote-debugging/remote-gdb-debugger/debugging-with-gdbserver.md): Windows (Cygwin), Linux (ARM, MIPS, PowerPC) [VMWare](/core/debugger/concepts/remote-debugging/remote-gdb-debugger/debugging-with-vmware.md): x86 (16/32 bit) [QEMU](/core/debugger/concepts/remote-debugging/remote-gdb-debugger/debugging-with-qemu.md): x86 (16/32 bit), ARM, MIPS, PowerPC [OpenOCD](/core/debugger/concepts/remote-debugging/remote-gdb-debugger/debugging-with-openocd.md): ARM It is quite possible that the module will work with other stubs. Note that only x86, ARM, MIPS and PowerPC processors are supported at the moment.

Some GDB stubs support so-called "monitor" commands. For example, VMWare stub can return extra info about system registers. Use the command line at the bottom of the main IDA window to send such commands. The output will be displayed in the message window. Hint: most stubs have a "help" command (if they support any commands at all).

The module also makes the following function available from IDC: string [send\_dbg\_command](https://idc.docs.hex-rays.com/send_dbg_command.html)(string command);

## CPU Configuration for Instant Debugging

When using [instant debugging](/core/debugger/concepts/instant-debugger.md), you will need to tell IDA on which CPU the target is running. This is done in the [Remote GDB Debugger options](/core/debugger/concepts/remote-debugging/remote-gdb-debugger/remote-gdb-debugger-options.md) dialog, available via "Debugger specific options" button in the Process options dialog shown when you choose Remote GDB Debugger from the Run or Attach menu.

## Hardware Breakpoint Limitations

Many GDB stubs do not report the address that triggered a hardware breakpoint. In this case, IDA will report a memory breakpoint hit as a generic TRAP signal. Examine the previous instruction to see if it referenced a memory location with breakpoint. When continuing from such a breakpoint, choose not to pass the signal to the program.

{% hint style="info" %}
IDA can be used together with a J-Link debug probe from SEGGER Microcontroller GmbH: <https://segger.com/jlink-debug-probes.html>
{% endhint %}

**See also**

* [Remote GDB Debugger options](/core/debugger/concepts/remote-debugging/remote-gdb-debugger/remote-gdb-debugger-options.md)
* [Debugger submenu](/core/user-interface/reference/menu-bar-actions/common-actions-3.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/core/debugger/concepts/remote-debugging/remote-gdb-debugger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
