Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

gdb_get_frame_info

Retrieve current stack frame details for debugging Nintendo Switch executables in gdb-multiarch, enabling precise analysis of program execution state.

Instructions

Get information about the current stack frame.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_frame_info method in the GDBSession class communicates with GDB using the -stack-info-frame command to retrieve information about the currently selected stack frame.
    def get_frame_info(self) -> dict[str, Any]:
        """
        Get information about the current stack frame.
    
        Returns:
            Dict with current frame information
        """
        result = self.execute_command("-stack-info-frame")
    
        if result["status"] == "error":
            return result
    
        mi_result = self._extract_mi_result(result) or {}
        frame = mi_result.get("frame", {})
    
        return {"status": "success", "frame": frame}
  • The gdb_get_frame_info tool is registered with the MCP server, defining its name and input schema (which is empty in this case).
    Tool(
        name="gdb_get_frame_info",
        description="Get information about the current stack frame.",
        inputSchema=NO_ARGS_SCHEMA,
    ),
  • The server.py file contains the tool handling logic that maps the gdb_get_frame_info command to the session.get_frame_info() method call.
    elif name == "gdb_get_frame_info":
        result = session.get_frame_info()

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