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
| Name | Required | Description | Default |
|---|---|---|---|
| offset | Yes | Offset into main executable (hex, e.g. '0x3a5f10' or '3a5f10') |
Implementation Reference
- src/gdb_multiarch_mcp/server.py:528-531 (handler)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')", ) - src/gdb_multiarch_mcp/server.py:344-351 (registration)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(), ),