Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GDB_PATHNoPath to the gdb-multiarch binarygdb-multiarch
SWITCH_IPNoIP address of the Switch/Yuzu GDB stub192.168.1.235
SWITCH_PORTNoGDB stub port22225
GDB_MCP_LOG_LEVELNoLogging level (DEBUG, INFO, WARNING, ERROR)INFO

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
switch_start_session

Start gdb-multiarch and connect to the Switch/Yuzu GDB stub. This MUST be called before any other tool. Connects to the IP/port configured via SWITCH_IP and SWITCH_PORT environment variables (defaults: 192.168.1.235:22225). Automatically loads Switch debug commands, attaches to the game, and sets $main to the base address of cross2_Release.nss. Do NOT manually run 'target remote', 'attach', or 'set $main' — this tool handles all of that.

switch_stop_session

Stop the gdb-multiarch session and disconnect from Yuzu.

gdb_execute_command

Execute a raw GDB command (CLI or MI). For Switch-specific operations, prefer the dedicated switch_* tools. IMPORTANT: Do NOT use 'target remote' or 'target extended-remote' — the session auto-connects to the Switch on first use. Do NOT use 'attach' or 'monitor wait application' — handled automatically. $main is already set to the base address of the game executable.

gdb_get_status

Get the current status of the GDB session.

gdb_get_threads

Get information about all threads.

gdb_select_thread

Select a specific thread.

gdb_get_backtrace

Get the stack backtrace (standard GDB backtrace).

gdb_select_frame

Select a specific stack frame.

gdb_get_frame_info

Get information about the current stack frame.

gdb_set_breakpoint

Set a breakpoint at a function, file:line, or *address. For offset-from-main breakpoints, use switch_break_at instead.

gdb_list_breakpoints

List all breakpoints with structured data.

gdb_delete_breakpoint

Delete a breakpoint by number.

gdb_enable_breakpoint

Enable a breakpoint by number.

gdb_disable_breakpoint

Disable a breakpoint by number.

gdb_continue

Continue execution until next breakpoint or completion. Only use when program is PAUSED.

gdb_step

Step into the next instruction.

gdb_next

Step over to the next line.

gdb_interrupt

Interrupt (pause) a running program.

gdb_evaluate_expression

Evaluate a C/C++ expression.

gdb_get_variables

Get local variables for a stack frame.

gdb_get_registers

Get CPU register values.

gdb_call_function

Call a function in the target process. WARNING: executes code in the debugged program.

switch_break_at

Set a breakpoint at an offset relative to the base of main ($main). Example: offset '0x3a5f10' sets a breakpoint at $main+0x3a5f10.

switch_no_op

NOP the instruction at the given offset from main. Writes ARM64 NOP (0xD503201F) at $main+offset.

switch_stub

Stub the function at the given offset from main. Writes ARM64 RET (0xD65F03C0) at $main+offset, making the function return immediately.

switch_replace

Replace the instruction at an offset from main with a new instruction. Offset and instruction are both hex values.

switch_get_pc

Get the current PC as an offset relative to the base of main.

switch_localize

Convert an absolute address or register value to an offset relative to the base of main. Example: address '$x0' or '0x8012345'.

switch_my_bt

Print the backtrace as absolute addresses by walking the frame pointer chain. Often misses the first address — use 'p/x $lr' for that.

switch_my_bt2

Print the backtrace with offsets relative to the base of main. Walks the frame pointer chain and resolves each return address to a module-relative offset.

switch_print_trace

Combined trace: runs get_pc, localize $lr, and my_bt2 in one command. Returns the current PC offset, calling offset, and full backtrace with offsets relative to main.

switch_xxd

Print a hex dump (xxd-style) of memory at the given address.

switch_prepare_rehook

Dump the original instructions at an offset (4 instructions / 16 bytes) as 'replace' commands, so you can restore them after hooking.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sbergeron42/gdb-multiarch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server