Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

gdb_list_breakpoints

Display all active breakpoints with structured details for debugging Nintendo Switch executables in gdb-multiarch.

Instructions

List all breakpoints with structured data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `list_breakpoints` method in the `GDBSession` class executes the `-break-list` GDB/MI command and parses the structured response.
    def list_breakpoints(self) -> dict[str, Any]:
        """
        List all breakpoints with structured data.
    
        Returns:
            Dict with array of breakpoint objects containing:
            - number: Breakpoint number
            - type: Type (breakpoint, watchpoint, etc.)
            - enabled: Whether enabled (y/n)
            - addr: Memory address
            - func: Function name (if available)
            - file: Source file (if available)
            - fullname: Full path to source file (if available)
            - line: Line number (if available)
            - times: Number of times hit
            - original-location: Original location string
        """
        # Use MI command for structured output
        result = self.execute_command("-break-list")
    
        if result["status"] == "error":
            return result
    
        # Extract breakpoint table from MI result
        mi_result = self._extract_mi_result(result) or {}
    
        # The MI response has a BreakpointTable with body containing array of bkpt objects
        bp_table = mi_result.get("BreakpointTable", {})
        breakpoints = bp_table.get("body", [])
    
        return {"status": "success", "breakpoints": breakpoints, "count": len(breakpoints)}
  • Registration of the `gdb_list_breakpoints` tool in `server.py` using a `Tool` definition.
    Tool(
        name="gdb_list_breakpoints",
        description="List all breakpoints with structured data.",
        inputSchema=NO_ARGS_SCHEMA,
    ),
  • The tool handler implementation in `server.py` which calls `session.list_breakpoints()`.
    elif name == "gdb_list_breakpoints":
        result = session.list_breakpoints()

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