coredump
Core Dump Analysis skill for the ikigai project
When & Why to Use This Skill
This Claude skill provides a comprehensive framework for post-mortem debugging using core dumps. It enables developers to analyze fatal application crashes—such as segmentation faults and aborts—that occur before live debuggers can attach. By guiding users through GDB commands, stack trace inspection, and environment configuration, it simplifies the process of identifying root causes in complex software systems.
Use Cases
- Early Startup Debugging: Diagnose crashes that occur during the initial boot sequence of an application before a live debugger can be attached.
- Production Crash Analysis: Perform offline analysis of core files generated in production environments to reproduce and fix bugs without impacting live services.
- Fatal Signal Investigation: Analyze the state of the CPU registers and memory at the exact moment of a SIGSEGV or SIGABRT to identify memory corruption or logic errors.
- Stack Trace Reconstruction: Utilize GDB backtrace commands to map out the execution path and inspect local variables across different stack frames.
| name | coredump |
|---|---|
| description | Core Dump Analysis skill for the ikigai project |
Core Dump Analysis
Description
Post-mortem debugging using core dumps for crashes that occur before gdbserver can catch them.
When to Use
- Crashes during very early startup
- Crashes before gdbserver fully initializes
- When you need to reproduce and analyze offline
- Segfaults, aborts, or other fatal signals
Enable Core Dumps
# Enable for current session
ulimit -c unlimited
# Verify
ulimit -c
Generate and Analyze
# Run until crash
./ikigai
# Produces: core or core.<pid>
# Analyze
gdb ./ikigai core
Key Commands
bt # Backtrace - where it crashed
bt full # Backtrace with local variables
frame N # Select stack frame
info locals # Variables in current frame
print var # Inspect variable
list # Source at crash point
info registers # CPU state at crash
x/20x $sp # Examine stack memory
Finding the Core File
# Check core pattern
cat /proc/sys/kernel/core_pattern
# Common locations
ls -la core*
ls -la /var/crash/
Workflow
- Enable core dumps:
ulimit -c unlimited - Run app until crash
- Load core:
gdb ./ikigai core - Get backtrace:
bt full - Inspect frames and variables
References
- GDB manual: https://sourceware.org/gdb/current/onlinedocs/gdb/
- See
gdbserver.mdfor live debugging