Skip to main content
Glama

gdb_next

Step over function calls in a GDB debugging session to continue execution without entering nested functions. Adjust settings to step by instructions or source lines for precise debugging control.

Instructions

Step over function calls

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instructionsNoStep by instructions instead of source lines (optional)
sessionIdYesGDB session ID

Implementation Reference

  • Main handler function that implements the gdb_next tool logic. Checks for active GDB session, determines 'next' or 'nexti' command based on instructions flag, executes via executeGdbCommand helper, and formats response with output.
    private async handleGdbNext(args: any) { const { sessionId, instructions = false } = args; if (!activeSessions.has(sessionId)) { return { content: [ { type: 'text', text: `No active GDB session with ID: ${sessionId}` } ], isError: true }; } const session = activeSessions.get(sessionId)!; try { // Use nexti for instruction-level stepping, otherwise next const command = instructions ? "nexti" : "next"; const output = await this.executeGdbCommand(session, command); return { content: [ { type: 'text', text: `Stepped over ${instructions ? 'instruction' : 'function call'}\n\nOutput:\n${output}` } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: 'text', text: `Failed to step over: ${errorMessage}` } ], isError: true }; } }
  • src/index.ts:237-254 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining name, description, and input schema for 'gdb_next'.
    { name: 'gdb_next', description: 'Step over function calls', inputSchema: { type: 'object', properties: { sessionId: { type: 'string', description: 'GDB session ID' }, instructions: { type: 'boolean', description: 'Step by instructions instead of source lines (optional)' } }, required: ['sessionId'] } },
  • src/index.ts:379-380 (registration)
    Dispatch registration in the CallToolRequestSchema switch statement, routing 'gdb_next' tool calls to the handleGdbNext method.
    case 'gdb_next': return await this.handleGdbNext(request.params.arguments);
  • Input schema for the gdb_next tool, defining required sessionId and optional instructions boolean.
    inputSchema: { type: 'object', properties: { sessionId: { type: 'string', description: 'GDB session ID' }, instructions: { type: 'boolean', description: 'Step by instructions instead of source lines (optional)' } }, required: ['sessionId']

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/signal-slot/mcp-gdb'

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