diagnose_crash_site
Combine GDB backtrace with LSP static analysis from clangd to diagnose program crashes like SIGSEGV.
Instructions
Diagnose a crash by combining GDB backtrace with LSP static analysis.
When the program has stopped (e.g., SIGSEGV), this tool gathers:
Full backtrace from GDB
Local variables at the crash frame
Type information at each frame from clangd
Static diagnostics (warnings/errors) for relevant source files
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"gdb_session_id": "<gdb_session_id>",
"lsp_session_id": "<lsp_session_id>"
},
"name": "diagnose_crash_site"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gdb_session_id | Yes | Active GDB session (program must be stopped at crash). | |
| lsp_session_id | Yes | Active LSP session for the project. | |
| max_frames | No | Maximum backtrace frames to analyze. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |