gdb_get_status
Retrieve the current status of an active GDB debugging session using the session ID obtained from gdb_start_session.
Instructions
Get the current status of the GDB session. Requires session_id parameter (obtained from gdb_start_session).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from gdb_start_session |
Implementation Reference
- src/gdb_mcp/gdb_interface.py:1325-1331 (handler)The get_status() method on GDBSession that returns the current session state (is_running, target_loaded, has_controller).
def get_status(self) -> dict[str, Any]: """Get the current status of the GDB session.""" return { "is_running": self.is_running, "target_loaded": self.target_loaded, "has_controller": self.controller is not None, } - src/gdb_mcp/server.py:240-247 (registration)Registration of the 'gdb_get_status' tool with MCP, using SessionIdArgs schema.
Tool( name="gdb_get_status", description=( "Get the current status of the GDB session. " "Requires session_id parameter (obtained from gdb_start_session)." ), inputSchema=SessionIdArgs.model_json_schema(), ), - src/gdb_mcp/server.py:181-184 (schema)SessionIdArgs Pydantic model used as input schema for gdb_get_status (requires session_id field).
class SessionIdArgs(BaseModel): """Arguments for tools that only need session_id.""" session_id: int = Field(..., description="Session ID from gdb_start_session") - src/gdb_mcp/server.py:491-492 (handler)Routing in server.py: calls session.get_status() when tool name is 'gdb_get_status'.
elif name == "gdb_get_status": result = session.get_status()