GDB MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| gdb_initA | 启动指定架构的GDB进程,默认使用aarch64交叉编译器。 参数:
示例:
|
| gdb_connectA | 通过TCP连接到目标板的gdbserver或QEMU。 参数:
示例:
|
| gdb_disconnectA | 优雅地断开与目标板的连接并终止GDB进程。会先发送detach命令通知gdbserver。 |
| gdb_load_programA | 加载要调试的可执行文件及其符号表。 参数:
必须在连接目标板后调用此命令。 |
| gdb_runA | 从程序入口点开始执行。程序将运行直到遇到断点或异常。 |
| gdb_continueA | 从当前位置继续执行程序。程序将运行直到遇到断点或异常。 |
| gdb_stepA | 执行一行代码。如果当前行包含函数调用,将进入该函数内部。 |
| gdb_nextA | 执行一行代码。如果当前行包含函数调用,将跳过该函数(不进入内部)。 |
| gdb_finishA | 继续执行直到当前函数返回。在返回点暂停。 |
| gdb_interruptA | 中断正在运行的程序。程序将暂停在当前位置。 |
| gdb_set_breakpointA | 在指定位置设置断点,支持条件断点和临时断点。 参数:
示例:
|
| gdb_delete_breakpointA | 删除指定编号的断点。 |
| gdb_list_breakpointsA | 列出当前设置的所有断点及其详细信息(包括条件)。 |
| gdb_enable_breakpointA | 启用指定编号的断点。 |
| gdb_disable_breakpointA | 禁用指定编号的断点。 |
| gdb_set_conditionA | 为已有断点设置或修改条件表达式。 参数:
示例:
|
| gdb_read_memoryA | 从指定地址读取内存内容。 参数:
|
| gdb_list_registersA | 获取目标架构的所有寄存器名称列表。 |
| gdb_read_registersB | 读取指定寄存器的值,默认读取所有寄存器。 参数:
|
| gdb_write_registerA | 修改指定寄存器的值。 参数:
警告: 此操作可能影响程序执行状态。 |
| gdb_list_framesA | 列出当前的调用栈帧信息。 |
| gdb_select_frameA | 选择指定编号的栈帧,用于查看该层的局部变量。 参数:
|
| gdb_list_localsA | 列出当前栈帧的局部变量及其值。 |
| gdb_list_argumentsA | 列出当前函数的参数及其值。 |
| gdb_evaluate_expressionA | 计算并返回表达式的值。 参数:
示例:
|
| gdb_list_threadsA | 列出当前程序的所有线程信息。 |
| gdb_select_threadA | 切换到指定线程进行调试。 |
| gdb_get_current_locationA | 获取程序当前位置(源文件和行号)。 |
| gdb_list_source_filesA | 列出调试程序的所有源文件。 |
| gdb_disassembleA | 反汇编当前函数或指定地址范围。 参数:
默认反汇编当前函数。 |
| gdb_commandA | 直接执行GDB Machine Interface (MI)命令。 参数:
示例:
高级用法:当其他工具不支持特定操作时使用。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 31 tools
Most tools have clear distinct purposes, but some overlap exists between gdb_run/gdb_continue and gdb_next/gdb_step. The descriptions help differentiate, but an agent might still confuse similar actions.
All tools follow a consistent 'gdb_verb_noun' pattern in snake_case, making the naming predictable and easy to interpret for both agents and humans.
31 tools is high for typical MCP server coherence; while GDB debugging is complex, the count exceeds the 25-tool threshold for 'too many' and could be streamlined (e.g., combining some list operations).
The tool set covers most core GDB workflows (breakpoints, stepping, memory, registers, expressions, threads). Minor gaps like watchpoints or variable modification exist, but overall it's comprehensive.