一键导入
gdb-cli
GDB debugging assistant for AI agents - analyze core dumps, debug live processes, investigate crashes and deadlocks with source code correlation
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
GDB debugging assistant for AI agents - analyze core dumps, debug live processes, investigate crashes and deadlocks with source code correlation
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Apply Alex Finn's Vibe Coding Academy methodology when working on features, debugging, or planning. Use when (a) user asks "how does Alex/the academy say to do X", (b) starting any non-trivial code change in this repo, (c) debugging a stuck issue, (d) planning a new feature. Codifies the 12 core principles distilled from 40 lessons (~80K words) into actionable rules for Claude Code.
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.
Advogado criminalista especializado em Maria da Penha, violencia domestica, feminicidio, direito penal brasileiro, medidas protetivas, inquerito policial e acao penal.
Advogado especialista em todas as areas do Direito brasileiro: familia, criminal, trabalhista, tributario, consumidor, imobiliario, empresarial, civil e constitucional.
Meta-skill que orquestra todos os agentes do ecossistema. Scan automatico de skills, match por capacidades, coordenacao de workflows multi-skill e registry management.
| name | gdb-cli |
| description | GDB debugging assistant for AI agents - analyze core dumps, debug live processes, investigate crashes and deadlocks with source code correlation |
| category | development |
| risk | critical |
| source | community |
| date_added | 2026-03-22 |
| author | Cerdore |
| tags | ["debugging","gdb","core-dump","crash-analysis","c++","c"] |
| tools | ["claude-code","cursor","gemini-cli","codex-cli","claude-code"] |
A GDB debugging skill designed for AI agents. Combines source code analysis with runtime state inspection using gdb-cli to provide intelligent debugging assistance for C/C++ programs.
# Install gdb-cli
pip install gdb-cli
# Or from GitHub
pip install git+https://github.com/Cerdore/gdb-cli.git
# Verify GDB has Python support
gdb -nx -q -batch -ex "python print('OK')"
Requirements:
For core dump analysis:
gdb-cli load --binary <binary_path> --core <core_path> [--gdb-path <gdb_path>]
For live process debugging:
gdb-cli attach --pid <pid> [--binary <binary_path>]
Output: A session_id like "session_id": "a1b2c3". Store this for subsequent commands.
SESSION="<session_id>"
# List all threads
gdb-cli threads -s $SESSION
# Get backtrace (with local variables)
gdb-cli bt -s $SESSION --full
# Get registers
gdb-cli registers -s $SESSION
For each frame in the backtrace:
{file}:{line} in {function}gdb-cli locals-cmd -s $SESSION --frame <N>Example correlation:
Frame #0: process_data() at src/worker.c:87
Source code shows:
85: Node* node = get_node(id);
86: if (node == NULL) return;
87: node->data = value; <- Crash here
Variables show:
node = 0x0 (NULL)
Analysis: The NULL check on line 86 didn't catch the issue.
# Examine variables
gdb-cli eval-cmd -s $SESSION "variable_name"
gdb-cli eval-cmd -s $SESSION "ptr->field"
gdb-cli ptype -s $SESSION "struct_name"
# Memory inspection
gdb-cli memory -s $SESSION "0x7fffffffe000" --size 64
# Disassembly
gdb-cli disasm -s $SESSION --count 20
# Check all threads (for deadlock analysis)
gdb-cli thread-apply -s $SESSION bt --all
# View shared libraries
gdb-cli sharedlibs -s $SESSION
# List active sessions
gdb-cli sessions
# Check session status
gdb-cli status -s $SESSION
# Stop session (cleanup)
gdb-cli stop -s $SESSION
Indicators:
Investigation:
gdb-cli registers -s $SESSION # Check RIP
gdb-cli eval-cmd -s $SESSION "ptr" # Check pointer value
Indicators:
pthread_mutex_lock in backtraceInvestigation:
gdb-cli thread-apply -s $SESSION bt --all
# Look for circular wait patterns
Indicators:
Investigation:
gdb-cli memory -s $SESSION "&variable" --size 128
gdb-cli registers -s $SESSION
# Load core dump
gdb-cli load --binary ./myapp --core /tmp/core.1234
# Get crash location
gdb-cli bt -s a1b2c3 --full
# Examine crash frame
gdb-cli locals-cmd -s a1b2c3 --frame 0
# Attach to stuck server
gdb-cli attach --pid 12345
# Check all threads
gdb-cli threads -s b2c3d4
# Get all backtraces
gdb-cli thread-apply -s b2c3d4 bt --all
--range for pagination on large thread counts or deep backtracesptype to understand complex data structures before examining values@systematic-debugging - General debugging methodology@test-driven-development - Write tests before implementation