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
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Absolute address or register name (e.g. '0x8012345' or '$x0') |
Implementation Reference
- src/gdb_multiarch_mcp/server.py:547-549 (handler)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')", - src/gdb_multiarch_mcp/server.py:382-389 (registration)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(), ),