Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
trailofbits avatar

Dwarf Expert

  • 3.8k installs
  • 6.3k repo stars
  • Updated July 27, 2026
  • trailofbits/skills

Technical expertise in DWARF debug format standards (v3-v5), debug info parsing, validation workflows, and code that interacts with DWARF data structures.

About

dwarf-expert provides technical knowledge for analyzing DWARF debug files and understanding the DWARF standard across versions 3, 4, and 5. Developers use this skill when parsing debug information from compiled binaries, validating DWARF data integrity with llvm-dwarfdump, or writing code that interacts with DWARF data structures. Key workflows include using dwarfdump or readelf to extract debug sections, running structural validation on binaries before distribution, comparing debug info quality across builds with --statistics output, leveraging DWARF parsing libraries (libdwarf, pyelftools, gimli), and reviewing code that handles DWARF data. The skill covers answering DWARF standard questions by referencing dwarfstd.org and LLVM's reference implementation, but excludes v1/v2 analysis, general ELF parsing, runtime debugging, and compiler-specific DWARF generation issues. Verify DWARF structural integrity and detect malformed debug info using llvm-dwarfdump --verify with detailed error reporting.

  • Verify DWARF structural integrity and detect malformed debug info using llvm-dwarfdump --verify with detailed error repo
  • Parse and dump DWARF DIE nodes with dwarfdump for complex debug information inspection and search
  • Write, modify, and review code using DWARF parsing libraries (libdwarf, pyelftools, gimli, LLVM DebugInfo)
  • Compare debug info quality across compiler versions and optimization levels using --statistics metrics
  • Reference authoritative sources: DWARF standard (dwarfstd.org), LLVM DebugInfo implementation, and libdwarf for correctn

Dwarf Expert by the numbers

  • 3,806 all-time installs (skills.sh)
  • +121 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #21 of 610 Debugging skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

dwarf-expert capabilities & compatibility

Capabilities
verify dwarf structural integrity in binaries · parse and dump dwarf die nodes with dwarfdump · answer dwarf standard specification questions · review code that handles dwarf data · compare debug info quality metrics across builds · reference llvm and libdwarf implementations
Use cases
debugging · code review · testing
Platforms
macOS · Linux · Windows
Runs
Runs locally
From the docs

What dwarf-expert says it does

Provides expertise for analyzing DWARF debug files and understanding the DWARF debug format/standard (v3-v5).
skill description
npx skills add https://github.com/trailofbits/skills --skill dwarf-expert

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.8k
repo stars6.3k
Security audit3 / 3 scanners passed
Last updatedJuly 27, 2026
Repositorytrailofbits/skills

What it does

Parse, validate, and analyze DWARF debug information (v3-v5) in compiled binaries using command-line tools and code libraries.

Who is it for?

Verifying compiled binaries have valid debug info, parsing debug symbols from ELF files, writing DWARF parsers, debugging debugger issues, comparing debug quality across builds.

Skip if: DWARF v1/v2 analysis, general ELF parsing without debug concerns, runtime executable debugging, binary reverse engineering, compiler DWARF generation problems.

When should I use this skill?

Understanding DWARF information, interacting with DWARF files, answering DWARF-related questions, parsing DWARF data in code, verifying debug info integrity.

What you get

Analyze DWARF sections, validate debug info integrity, parse DIE nodes, write correct DWARF-handling code, and answer DWARF standard questions.

  • DWARF section analysis
  • Validated binary debug info
  • DWARF parsing code

By the numbers

  • Supports DWARF versions 3, 4, 5
  • Covers llvm-dwarfdump, dwarfdump, readelf, and three major parsing libraries

Files

SKILL.mdMarkdownGitHub ↗

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)

Related skills

Forks & variants (1)

Dwarf Expert has 1 known copy in the catalog totaling 1 installs. They canonicalize to this original listing.

How it compares

Pick dwarf-expert for interactive secure-coding guidance during smart-contract development; pick a dedicated scanner skill when you only need automated pre-deployment findings.

FAQ

When should I use dwarfdump vs readelf?

Use readelf for general ELF info; use dwarfdump for DWARF-specific parsing and dumping DIE nodes - dwarfdump is more effective at displaying complex DWARF information.

How do I verify DWARF data before shipping binaries?

Run llvm-dwarfdump --verify <binary> to check structural validity (compile units, DIE relationships, address ranges) and detect issues that cause debugger failures.

What DWARF versions does this skill support?

Expertise covers DWARF v3, v4, and v5. DWARF v1/v2 analysis is out of scope. Reference dwarfstd.org for official specification sections.

Is Dwarf Expert safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Debuggingbackenddevops

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.