GDB debugger workflows for C and C++ covering breakpoints, inspection, crash analysis, and remote debugging.
- CCM score
- 62 of 100
- skills.sh installs
- 1.3K
- GitHub stars
- 303
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the session lifecycle: launching or attaching, stepping, breakpoints and watchpoints, state inspection, and reverse record/replay
- Includes a command reference table, a common-problems troubleshooting table, a
~/.gdbinittemplate, and links to a cheatsheet and scripting guide - Provides multi-thread inspection with
thread apply all btandset scheduler-locking on, plusgdbserverremote setup for embedded targets - Designed for diagnosing segfaults, hangs, and crashes in C/C++ builds compiled with
-g
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill gdb -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
GDB
Purpose
Walk agents through GDB sessions from first launch to advanced workflows: crash diagnosis, reverse debugging, remote debugging, and multi-thread inspection.
Triggers
- "My program segfaults / crashes — how do I debug it?"
- "How do I set a breakpoint on condition X?"
- "How do I inspect memory / variables in GDB?"
- "How do I debug a remote embedded target?"
- "GDB shows
??frames / no source" - "How do I replay a bug deterministically?" (record/replay)
Workflow
1. Prerequisite: compile with debug info
Always compile with -g (GCC/Clang). Use -Og or -O0 for most debuggable code.
gcc -g -Og -o prog main.c
For release builds: use -g -O2 and keep the binary with symbols (strip separately with objcopy).
2. Start GDB
gdb ./prog # load binary
gdb ./prog core # load with core dump
gdb -p 12345 # attach to running process
gdb --args ./prog arg1 arg2 # pass arguments
gdb -batch -ex 'run' -ex 'bt' ./prog # non-interactive (CI)
3. Essential commands
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- Debugging, CLI & Terminal
- First seen
- Jun 3, 2026
Questions
What does the gdb skill for Claude Code cover?
The gdb skill walks an agent through GDB sessions for C and C++ programs, from first launch to crash diagnosis, reverse debugging, remote debugging with gdbserver and multi-thread inspection. It also covers breakpoints, watchpoints, pretty-printers and Python GDB scripting.
How do I install the gdb skill?
Run npx -y skills add mohitmishra786/low-level-dev-skills --skill gdb -y in your project. After that, the agent can use the skill when you ask about GDB commands, segfaults, hangs or core dumps.
Can the gdb skill help me debug a segfault or hang?
Yes, the skill targets crashes and hangs directly, covering segfaults, core dumps and programs that hang on run. It explains how to read backtraces and inspect variables and registers at the point of failure.
Where does the gdb skill stand in the Debugging category?
The gdb skill sits in the Debugging category on Claude Marketplaces, alongside diagnosing-bugs, safe-debug, systematic-debugging and sentry-cli. It is the one focused on GDB itself for C and C++ work.
Does the gdb skill support record and replay debugging?
Yes, the skill covers reverse debugging with record and replay, including software recording and Intel Processor Trace. It also explains how to step backwards and continue to an earlier breakpoint.
More from mohitmishra786/low-level-dev-skills
All 54- Llvm1K
- Sanitizers1K
- Core Dumps948
- Assembly X86947
- Linux Perf916
- Clang904
- Valgrind851
- Gcc842
- Cross Gcc837
- Flamegraphs837
- Strace Ltrace822
- Cpu Cache Opt820
- Rust Profiling810
- Elf Inspection806
- Simd Intrinsics802
- Assembly Arm800
- Lldb800
- Memory Model800
- Make789
- Heaptrack779
- Ninja778
- Freertos774
- Linux Kernel Modules772
- Msvc Cl772
Similar to Gdb
More Debugginglldbmohitmishra786/low-level-dev-skills800 installsLLDB debugging skill that maps GDB commands to LLDB equivalents for C, C++, Swift, and Objective-C programs.
core-dumpsmohitmishra786/low-level-dev-skills948 installsPractical crash triage for production core dumps: enabling collection, loading in GDB or LLDB, and resolving symbols.
dbgtheodo-group/debug-that675 installsInteractive CLI debugger for Node.js, Bun, Python, Java, and native code via LLDB and DAP.
dynamic-debuggerrysweet/amplihack145 installsInteractive debugger that drives DAP-MCP to set breakpoints and inspect state via natural language.
debuggerzhaono1/agent-playbook759 installsSystematic debugging workflow that reproduces, isolates, and verifies fixes across JavaScript, Python, and Go.
debugging-wizardjeffallan/claude-skills5.7K installsSystematic, hypothesis-driven debugger that reproduces, isolates, and verifies fixes for bugs and crashes.