WebAssembly / WebAssembly/binaryen

Split-dwarf support

Open
#3,518 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

Currently Binaryen supports rewriting DWARF information embedded in custom sections in a finally-linked wasm binary. LLVM recently added support for split-dwarf (i.e. putting some of the debug info in .dwo files) and creating dwarf packages (i.e. combining the .dwo files into a .dwp file).
Currently our preferred debugging workflow is to use the correct options to avoid using Binaryen at all (i.e. enable wasm-bigint and linktime-optlevel at 1 or 0); this makes linking much faster. But when using ASYNCIFY or other features which require Binaryen, this isn't an option.
If split-dwarf ends up being a recommended or preferred way of creating debug info (which currently seems likely to happen?) then Binaryen should support updating split-dwarf info in dwo and/or dwp form as well as fully-linked.

This should not be as involved as e.g. supporting object files (there are no relocations), but will be a bit of work, as some of the fields are interpreted differently in split-dwarf mode (and of course Binaryen will have to open other files to find the debug info)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by comparing Binaryen's current fully linked DWARF rewriting with LLVM's split-DWARF .dwo and .dwp formats. Determine which fields differ and how the related files would be located; done means updating split-DWARF information while preserving existing support for fully linked binaries and workflows that require Binaryen.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.