dwarf-expert by trailofbits/skills
npx skills add https://github.com/trailofbits/skills --skill dwarf-expert本技能提供关于 DWARF 标准以及如何与 DWARF 文件交互的技术知识和专业能力。任务包括回答关于 DWARF 标准的问题、提供各种 DWARF 特性的示例、解析和/或创建 DWARF 文件,以及编写/修改/分析与 DWARF 数据交互的代码。
dwarfdump 或 readelf 提取调试信息llvm-dwarfdump --verify 验证 DWARF 数据完整性当需要特定的 DWARF 标准信息时,请使用以下权威来源:
官方 DWARF 标准 (dwarfstd.org):使用网络搜索在 dwarfstd.org 的官方 DWARF 规范中查找特定章节。像 "DWARF5 DW_TAG_subprogram attributes site:dwarfstd.org" 这样的搜索查询是有效的。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
LLVM DWARF 实现:LLVM 项目在 llvm/lib/DebugInfo/DWARF/ 的 DWARF 处理代码可作为可靠的参考实现。关键文件包括:
DWARFDie.cpp - DIE 处理和属性访问DWARFUnit.cpp - 编译单元解析DWARFDebugLine.cpp - 行号信息DWARFVerifier.cpp - 验证逻辑libdwarf:位于 github.com/davea42/libdwarf-code 的参考 C 实现提供了对 DWARF 数据结构的详细处理。
使用 llvm-dwarfdump 的验证选项来验证 DWARF 数据完整性:
# 验证 DWARF 结构(编译单元、DIE 关系、地址范围)
llvm-dwarfdump --verify <binary>
# 带有摘要的详细错误输出
llvm-dwarfdump --verify --error-display=full <binary>
# 机器可读的 JSON 错误摘要
llvm-dwarfdump --verify --verify-json=errors.json <binary>
# 以 JSON 格式输出调试信息质量指标
llvm-dwarfdump --statistics <binary>
--statistics 输出有助于比较不同编译器版本和优化级别下的调试信息质量。
--statistics 检测调试信息质量退化ELF 文件可以通过 readelf 命令解析({baseDir}/reference/readelf.md)。对于通用的 ELF 信息请使用此命令,但对于 DWARF 特定的解析,建议使用 dwarfdump。
DWARF 文件可以通过 dwarfdump 命令解析,它比 readelf 更有效地解析和显示复杂的 DWARF 信息,对于大多数 DWARF 解析任务应使用此命令({baseDir}/reference/dwarfdump.md)。
本技能支持编写、修改和审查与 DWARF 数据交互的代码。这可能涉及从头开始解析 DWARF 调试数据的代码,或者利用库来解析和与 DWARF 数据交互的代码({baseDir}/reference/coding.md)。
┌─ 需要验证 DWARF 数据完整性?
│ └─ 使用 `llvm-dwarfdump --verify`(参见上面的验证工作流)
├─ 需要回答关于 DWARF 标准的问题?
│ └─ 搜索 dwarfstd.org 或参考 LLVM/libdwarf 源代码
├─ 需要简单的节区转储或通用 ELF 信息?
│ └─ 使用 `readelf`({baseDir}/reference/readelf.md)
├─ 需要解析、搜索和/或转储 DWARF DIE 节点?
│ └─ 使用 `dwarfdump`({baseDir}/reference/dwarfdump.md)
└─ 需要编写、修改或审查与 DWARF 数据交互的代码?
└─ 参考编码指南({baseDir}/reference/coding.md)
每周安装量
1.1K
代码仓库
GitHub 星标数
3.9K
首次出现
2026年1月19日
安全审计
已安装于
claude-code981
opencode929
gemini-cli912
codex907
cursor888
github-copilot855
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.
dwarfdump or readelf to extract debug informationllvm-dwarfdump --verifyWhen specific DWARF standard information is needed, use these authoritative sources:
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.
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 accessDWARFUnit.cpp - Compilation unit parsingDWARFDebugLine.cpp - Line number informationDWARFVerifier.cpp - Validation logiclibdwarf : The reference C implementation at github.com/davea42/libdwarf-code provides detailed handling of DWARF data structures.
Use llvm-dwarfdump verification options to validate DWARF data integrity:
# 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>
# 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.
--statistics to detect debug info quality regressionsELF 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.
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).
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).
┌─ 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)
Weekly Installs
1.1K
Repository
GitHub Stars
3.9K
First Seen
Jan 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code981
opencode929
gemini-cli912
codex907
cursor888
github-copilot855
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
marimo Python笔记本教程:交互式数据科学工具,替代Jupyter的响应式开发
1,000 周安装
RivetKit多人游戏开发模式:大逃杀、竞技场、IO游戏等10类模板与物理引擎指南
1,000 周安装
Flutter 缓存与性能优化指南:实现离线优先数据持久化与渲染加速
1,000 周安装
React Sentry 安装配置指南:错误监控、日志记录与性能追踪
1,000 周安装
Next.js 16.1.1 生产模式指南:App Router、缓存、Turbopack 与安全更新
1,000 周安装
Railway部署管理指南:列出、查看日志、重新部署与移除部署操作详解
1,000 周安装