Skip to main content
Glama

debugger_list_sessions

View active debugging sessions to monitor and manage ongoing program analysis with the GDB debugger.

Instructions

List all active debugging sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.py:65-70 (handler)
    Main MCP tool handler decorated with @mcp.tool() that calls debugger_tools.list_sessions() to list active debugging sessions
    @mcp.tool()
    def debugger_list_sessions() -> str:
        """List all active debugging sessions."""
        if not debugger_tools:
            return "Error: No debuggers are available on this system"
        return debugger_tools.list_sessions()
  • GDB-specific implementation that retrieves session list from session manager and formats it as a human-readable string
    def list_sessions(self) -> str:
        sessions = self.sessionManager.list_sessions()
        if not sessions:
            return "No active GDB sessions"
        return "Active GDB sessions:\n" + "\n".join(f"- {sid}" for sid in sessions)
  • LLDB-specific implementation that retrieves session list from session manager and formats it as a human-readable string
    def list_sessions(self) -> str:
        sessions = self.session_manager.list_sessions()
        if not sessions:
            return "No active LLDB sessions"
        return "Active LLDB sessions:\n" + "\n".join(f"- {sid}" for sid in sessions)
  • Abstract base class definition that declares the list_sessions() method signature returning a string
    @abstractmethod
    def list_sessions(self) -> str:
        """List all active debugging sessions."""
        pass
  • GDB session manager helper that returns list of active session IDs after cleaning up dead sessions
    def list_sessions(self) -> list:
        self._cleanup_dead_sessions()
        return list(self.sessions.keys())

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/smadi0x86/GDB-MCP'

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