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
| Name | Required | Description | Default |
|---|---|---|---|
| instructions | No | Step by instructions instead of source lines (optional) | |
| sessionId | Yes | GDB session ID |
Implementation Reference
- src/index.ts:892-934 (handler)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);
- src/index.ts:240-252 (schema)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']