dwarf-expert

Analyze and verify DWARF debug information in compiled binaries using dwarfdump and readelf.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TECH-HY/SKILLS --skill dwarf-expert-tech-hy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dwarf-expert
Source: https://github.com/TECH-HY/SKILLS/tree/main/skills/dwarf-expert
Command: npx skills add https://github.com/TECH-HY/SKILLS --skill dwarf-expert-tech-hy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with DWARF debug information requires deep knowledge of the DWARF standard (v3-v5), DIE node structures, and specialized tooling. This Skill provides the expertise to parse, search, verify, and write code against DWARF data without memorizing the specification. ## Core Features & Use Cases - DWARF Parsing & Search: Use dwarfdump and readelf to dump sections, search DIE nodes by name or address, and inspect parent/child relationships. - Integrity Verification: Validate DWARF data with llvm-dwarfdump --verify and measure debug info quality with --statistics. - Code Development Support: Write, modify, or review code that parses DWARF using libraries like pyelftools, libdwarf, gimli, or Go's debug/dwarf. - Use Case: A debugger crashes on a specific binary. Use this Skill to run llvm-dwarfdump --verify, locate the malformed DIE node, and confirm whether the compiler emitted invalid DWARF. ## Quick Start Use the dwarf-expert skill to verify the DWARF debug information in my compiled binary and find the DIE node for the function named main.

Frequently Asked Questions about dwarf-expert

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

FAQPage Schema
How do I parse DWARF debug information from a binary?▼

Use dwarfdump to dump DWARF sections and DIE node trees from a binary, which handles complex DWARF data better than readelf. For general ELF section information, readelf --debug-dump works, but dwarfdump is preferred for DWARF-specific tasks.

How do I search for a specific DIE node in DWARF data?▼

Use dwarfdump --find=<name> for a fast accelerator-table lookup, or --name <pattern> with --regex for exhaustive searches. If you know the address, use --lookup=<address>, optionally with --show-children or --show-parents for context.

dwarfdump vs llvm-dwarfdump: what is the difference?▼

Both are interchangeable implementations of the same utility: dwarfdump comes from libdwarf while llvm-dwarfdump comes from LLVM. They accept slightly different command-line options, so run dwarfdump --version to determine which implementation your system uses.

How do I verify DWARF data integrity in a compiled binary?▼

Run llvm-dwarfdump --verify <binary> to check compile unit chains, DIE relationships, and address ranges. Add --error-display=full for detailed output or --verify-json=errors.json for machine-readable results suitable for CI pipelines.

What Python library can parse DWARF debug information?▼

pyelftools is the recommended Python library for parsing DWARF data and ELF files in general. It is useful for scripted searches over DIE nodes when command-line filtering with dwarfdump and grep becomes too complex.

What are the limitations of this DWARF analysis approach?▼

Coverage is limited to DWARF versions 3, 4, and 5; versions 1 and 2 are not supported. It also does not cover runtime debugging (use gdb or lldb), binary reverse engineering (use Ghidra or IDA), or compiler-specific DWARF generation bugs.