gdb-cli

Analyzes C/C++ core: dumps and live processes to identify crashes, deadlocks, memory corruption via GDB and Python.

1|Updated May 10, 2026
One-click install
npx skills add https://github.com/Avihusitton/gil-therapy --skill gdb-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gdb-cli
Source: https://github.com/Avihusitton/gil-therapy/tree/main/.agents/skills/gdb-cli
Command: npx skills add https://github.com/Avihusitton/gil-therapy --skill gdb-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually debugging C/C++ crashes, core dumps, deadlocks, and memory issues requires correlating raw GDB output with source code, which is time-consuming and error-prone for developers. This skill automates that correlation to speed up root cause identification.

Core Features & Use Cases

  • Post-Mortem Crash Analysis: Load and analyze core dumps to pinpoint the exact line of code and variable state that caused a crash.
  • Live Process Debugging: Attach to running C/C++ processes to diagnose hangs, deadlocks, and memory leaks in real time.
  • Multi-Threaded Issue Resolution: Inspect all thread backtraces to identify race conditions and deadlock patterns in concurrent applications.
  • Use Case: A developer facing a random production server crash can use this skill to load the generated core dump, correlate the crash location with the relevant source code, and quickly identify a null pointer dereference as the root cause.

Quick Start

Use the gdb-cli skill to analyze the provided core dump file for the C++ application and identify the root cause of the crash.

Frequently Asked Questions about gdb-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a C++ core dump to find the exact line of code that caused a crash?

To debug a C++ core dump, you need a tool that correlates GDB runtime state inspection with source code. This skill automates that correlation, loading core dumps to pinpoint the exact crashing line and variable state for rapid root cause identification.

Can I attach GDB to a running C++ process to diagnose deadlocks and memory leaks?

Yes, you can attach GDB to a running C++ process for live debugging. This skill supports attaching to live processes to diagnose hangs, deadlocks, and memory leaks in real time by retrieving structured runtime data.

How do I inspect all thread backtraces in GDB to resolve multi-threaded race conditions?

Inspecting all thread backtraces in GDB helps resolve multi-threaded race conditions by revealing concurrency issue patterns. This skill inspects all thread states to identify race conditions and deadlock patterns in concurrent C and C++ applications.

Do I need a specific GDB version or operating system to analyze C++ core dumps?

Analyzing C++ core dumps requires GDB 9.0+ with Python support, the gdb-cli Python package, and a Linux operating system. These dependencies are necessary to execute debugging commands and retrieve structured runtime data for analysis.

What is the best way to automate correlating raw GDB output with source code during memory debugging?

The best way to automate correlating raw GDB output with source code during memory debugging is using an automated analysis skill. It combines GDB runtime state inspection with source code correlation to speed up root cause identification for memory corruption.

Why does manually debugging C++ memory corruption take so long and how can I speed it up?

Manually debugging C++ memory corruption is slow because correlating raw GDB output with source code is error-prone. Automating this correlation speeds up root cause identification by combining runtime state inspection with source code analysis.