Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

switch_break_at

Set a breakpoint at a specific offset relative to the main executable's base address for debugging Nintendo Switch applications in gdb-multiarch.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetYesOffset into main executable (hex, e.g. '0x3a5f10' or '3a5f10')

Implementation Reference

  • The handler logic for 'switch_break_at' in the `call_tool` function. It parses the 'OffsetArgs' input and executes the GDB command 'break_at' using the current session.
    elif name == "switch_break_at":
        a = OffsetArgs(**arguments)
        result = session.execute_command(f"break_at {a.offset}")
  • The Pydantic model 'OffsetArgs' defines the expected input schema for 'switch_break_at'.
    class OffsetArgs(BaseModel):
        offset: str = Field(
            ...,
            description="Offset into main executable (hex, e.g. '0x3a5f10' or '3a5f10')",
        )
  • Registration of the 'switch_break_at' tool in the `list_tools` function.
    Tool(
        name="switch_break_at",
        description=(
            "Set a breakpoint at an offset relative to the base of main ($main). "
            "Example: offset '0x3a5f10' sets a breakpoint at $main+0x3a5f10."
        ),
        inputSchema=OffsetArgs.model_json_schema(),
    ),

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