Skip to content

Commit

Permalink
Add Debugging.md (#149)
Browse files Browse the repository at this point in the history
See #148
  • Loading branch information
kripken authored Oct 29, 2020
1 parent 9f12607 commit f2644b6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Debugging.md
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).

0 comments on commit f2644b6

Please sign in to comment.