DWARF Expert

VerifiedSafe

Provides expertise for analyzing DWARF debug files and understanding the DWARF standard (v3-v5). Triggered when working with DWARF data, parsing libraries, or verification tools.

Sby Skills Guide Bot
DevelopmentAdvanced
8/6/2026
Claude CodeCursorWindsurfCopilotCodex
#dwarf#debug-info#binary-analysis#llvm#elf

Recommended for

Automated summary

This skill provides technical expertise on the DWARF standard (v3-v5) and on analyzing debug files, especially using tools like dwarfdump and llvm-dwarfdump.

Strengths

  • Covers DWARF 3, 4, and 5 in detail, including key structures and attributes.
  • Provides practical verification workflows with llvm-dwarfdump --verify and --statistics.
  • Relies on authoritative sources such as the official DWARF website and LLVM/libdwarf reference implementations.
  • Includes concrete command examples for inspecting and validating debug information.

Limitations

  • Does not support DWARF versions 1 and 2.
  • Does not cover compiler-specific DWARF generation issues.
  • Limited to DWARF analysis, not general binary reverse engineering.
When to use it

Use this skill when you need to understand, parse, validate, or manipulate DWARF debug information in compiled binaries.

When not to use it

Do not use it for runtime debugging with gdb/lldb, general binary reverse engineering, or ELF analysis that doesn't require DWARF data.

Security analysis

Safe
Quality score95/100

The skill exclusively uses standard, well-documented tools (llvm-dwarfdump, dwarfdump, readelf) for inspecting and validating DWARF debug information. There are no destructive commands, network-based payloads, or exfiltration risks. The recommended bash commands are solely for debug data integrity checks.

No concerns found

How this analysis is made

Examples

Check DWARF integrity of a binary
Run llvm-dwarfdump --verify on this binary and explain any errors or warnings it reports about the DWARF data.
Explain DWARF tag semantics
What is the difference between DW_TAG_structure_type, DW_TAG_class_type, and DW_TAG_union_type in DWARF 5? Give an example of each.
Extract DWARF line table info
Write a Python script using pyelftools to parse the .debug_line section of this ELF file and print the source line-to-address mappings.

name: dwarf-expert description: Provides expertise for analyzing DWARF debug files and understanding the DWARF debug format/standard (v3-v5). Triggers when understanding DWARF information, interacting with DWARF files, answering DWARF-related questions, or working with code that parses DWARF data. allowed-tools:

  • Read
  • Bash
  • Grep
  • Glob
  • WebSearch risk: unknown source: community

Overview

This skill provides technical knowledge and expertise about the DWARF standard and how to interact with DWARF files. Tasks include answering questions about the DWARF standard, providing examples of various DWARF features, parsing and/or creating DWARF files, and writing/modifying/analyzing code that interacts with DWARF data.

When to Use This Skill

  • Understanding or parsing DWARF debug information from compiled binaries
  • Answering questions about the DWARF standard (v3, v4, v5)
  • Writing or reviewing code that interacts with DWARF data
  • Using dwarfdump or readelf to extract debug information
  • Verifying DWARF data integrity with llvm-dwarfdump --verify
  • Working with DWARF parsing libraries (libdwarf, pyelftools, gimli, etc.)

When NOT to Use This Skill

  • DWARF v1/v2 Analysis: Expertise limited to versions 3, 4, and 5.
  • General ELF Parsing: Use standard ELF tools if DWARF data isn't needed.
  • Executable Debugging: Use dedicated debugging tools (gdb, lldb, etc) for debugging executable code/runtime behavior.
  • Binary Reverse Engineering: Use dedicated RE tools (Ghidra, IDA) unless specifically analyzing DWARF sections.
  • Compiler Debugging: DWARF generation issues are compiler-specific, not covered here.

Authoritative Sources

When specific DWARF standard information is needed, use these authoritative sources:

  1. Official DWARF Standards (dwarfstd.org): Use web search to find specific sections of the official DWARF specification at dwarfstd.org. Search queries like "DWARF5 DW_TAG_subprogram attributes site:dwarfstd.org" are effective.

  2. LLVM DWARF Implementation: The LLVM project's DWARF handling code at llvm/lib/DebugInfo/DWARF/ serves as a reliable reference implementation. Key files include:

    • DWARFDie.cpp - DIE handling and attribute access
    • DWARFUnit.cpp - Compilation unit parsing
    • DWARFDebugLine.cpp - Line number information
    • DWARFVerifier.cpp - Validation logic
  3. libdwarf: The reference C implementation at github.com/davea42/libdwarf-code provides detailed handling of DWARF data structures.

Verification Workflows

Use llvm-dwarfdump verification options to validate DWARF data integrity:

Structural Validation

# Verify DWARF structure (compile units, DIE relationships, address ranges)
llvm-dwarfdump --verify <binary>

# Detailed error output with summary
llvm-dwarfdump --verify --error-display=full <binary>

# Machine-readable JSON error summary
llvm-dwarfdump --verify --verify-json=errors.json <binary>

Quality Metrics

# Output debug info quality metrics as JSON
llvm-dwarfdump --statistics <binary>

The --statistics output helps compare debug info quality across compiler versions and optimization levels.

Common Verification Patterns

  • After compilation: Verify binaries have valid DWARF before distribution
  • Comparing builds: Use --statistics to detect debug info quality regressions
  • Debugging debuggers: Identify malformed DWARF causing debugger issues
  • DWARF tool development: Validate parser output against known-good binaries

Parsing DWARF Debug Information

readelf

ELF files can be parsed via the readelf command ({baseDir}/reference/readelf.md). Use this for general ELF information, but prefer dwarfdump for DWARF-specific parsing.

dwarfdump

DWARF files can be parsed via the dwarfdump command, which is more effective at parsing and displaying complex DWARF information than readelf and should be used for most DWARF parsing tasks ({baseDir}/reference/dwarfdump.md).

Working With Code

This skill supports writing, modifying, and reviewing code that interacts with DWARF data. This may involve code that parses DWARF debug data from scratch or code that leverages libraries to parse and interact with DWARF data ({baseDir}/reference/coding.md).

Choosing Your Approach

┌─ Need to verify DWARF data integrity?
│   └─ Use `llvm-dwarfdump --verify` (see Verification Workflows above)
├─ Need to answer questions about the DWARF standard?
│   └─ Search dwarfstd.org or reference LLVM/libdwarf source
├─ Need simple section dump or general ELF info?
│   └─ Use `readelf` ({baseDir}/reference/readelf.md)
├─ Need to parse, search, and/or dump DWARF DIE nodes?
│   └─ Use `dwarfdump` ({baseDir}/reference/dwarfdump.md)
└─ Need to write, modify, or review code that interacts with DWARF data?
    └─ Refer to the coding reference ({baseDir}/reference/coding.md)

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/dwarf-expert-msh3ut50/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/dwarf-expert-msh3ut50' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/dwarf-expert-msh3ut50/download' --output '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md.part' && mv '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md.part' '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md' && test -s '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/dwarf-expert' && cp -R '.skill-downloads/dwarf-expert-msh3ut50' '.claude/skills/dwarf-expert'

Cursor
test -f '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md' && test -s '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/dwarf-expert' && cp -R '.skill-downloads/dwarf-expert-msh3ut50' '.cursor/skills/dwarf-expert'

Codex
test -f '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md' && test -s '.skill-downloads/dwarf-expert-msh3ut50/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/dwarf-expert' && cp -R '.skill-downloads/dwarf-expert-msh3ut50' '.agents/skills/dwarf-expert'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/dwarf-expert-msh3ut50'

openskills read 'dwarf-expert-msh3ut50'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/dwarf-expert-msh3ut50/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills