Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

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
NameRequiredDescriptionDefault
thread_idYesThread 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"),
        }
  • 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(),
    ),
  • 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sbergeron42/gdb-multiarch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server