gdb_select_thread
Select a specific thread in gdb-multiarch debugging to focus on its execution and state during Nintendo Switch debugging sessions.
Instructions
Select a specific thread.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | Thread ID to select |
Implementation Reference
- The handler implementation for the `gdb_select_thread` tool, which calls `execute_command` with `-thread-select` using the GDB/MI protocol.
def select_thread(self, thread_id: int) -> dict[str, Any]: """ Select a specific thread to make it the current thread. Args: thread_id: Thread ID to select Returns: Dict with status and selected thread information """ result = self.execute_command(f"-thread-select {thread_id}") if result["status"] == "error": return result mi_result = self._extract_mi_result(result) or {} return { "status": "success", "thread_id": thread_id, "new_thread_id": mi_result.get("new-thread-id"), "frame": mi_result.get("frame"), } - src/gdb_multiarch_mcp/server.py:251-255 (registration)Tool registration for `gdb_select_thread` in `src/gdb_multiarch_mcp/server.py`.
Tool( name="gdb_select_thread", description="Select a specific thread.", inputSchema=ThreadSelectArgs.model_json_schema(), ), - src/gdb_multiarch_mcp/server.py:464-466 (handler)The execution path in the server loop that calls `session.select_thread`.
elif name == "gdb_select_thread": a = ThreadSelectArgs(**arguments) result = session.select_thread(thread_id=a.thread_id)