switch_stub
Patch Nintendo Switch executables to make functions return immediately by writing ARM64 RET instructions at specified offsets from main, useful for debugging in gdb-multiarch.
Instructions
Stub the function at the given offset from main. Writes ARM64 RET (0xD65F03C0) at $main+offset, making the function return immediately.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"offset": "<offset>"
},
"name": "switch_stub"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offset | Yes | Offset into main executable (hex, e.g. '0x3a5f10' or '3a5f10') |