Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

switch_localize

Convert absolute addresses or register values to offsets relative to the main executable's base address for debugging Nintendo Switch applications in GDB.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesAbsolute address or register name (e.g. '0x8012345' or '$x0')

Implementation Reference

  • The handler for 'switch_localize' in the 'call_tool' function, which extracts the address from arguments and executes a 'localize' command on the GDB session.
    elif name == "switch_localize":
        a = LocalizeArgs(**arguments)
        result = session.execute_command(f"localize {a.address}")
  • Input schema definition for the 'switch_localize' tool.
    class LocalizeArgs(BaseModel):
        address: str = Field(
            ...,
            description="Absolute address or register name (e.g. '0x8012345' or '$x0')",
  • Registration of the 'switch_localize' tool in the MCP server setup.
    Tool(
        name="switch_localize",
        description=(
            "Convert an absolute address or register value to an offset relative "
            "to the base of main. Example: address '$x0' or '0x8012345'."
        ),
        inputSchema=LocalizeArgs.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