-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See #148
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
This document describes conventions regarding debugging. | ||
|
||
# DWARF | ||
|
||
It is a goal to support DWARF in WebAssembly, see | ||
[the proposed additions to DWARF](https://yurydelendik.github.io/webassembly-dwarf/) | ||
for how that is planned to work. | ||
|
||
## External DWARF | ||
|
||
That proposal allows keeping the DWARF information | ||
[external to the wasm](https://yurydelendik.github.io/webassembly-dwarf/#external-DWARF). | ||
When doing so, the main wasm file does not need to contain any debug info, and | ||
instead has a custom section with the name `external_debug_info`. That section | ||
contains: | ||
|
||
| Field | Type | Description | | ||
| ------------- | ----------- | ---------------------------------- | | ||
| path_name_len | `varuint32` | Length of `path_name_str` in bytes | | ||
| path_name_str | `bytes` | Path to debug info file | | ||
|
||
`path_name` is the location of a file containing DWARF debug info. Note that it | ||
may also contain the full wasm file as well, which can be simpler to handle | ||
(and tends to have little downside, as DWARF size tends to be much bigger than | ||
wasm size anyhow). |