Skip to content

Commit 3434871

Browse files
committed
Update documentation
1 parent 61323cd commit 3434871

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

documentation/symbols/SSQP_Key_Conventions.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,26 @@ Example:
195195

196196
### WASM (WebAssembly) Modules
197197

198-
WebAssembly symbols, which can be used by browser developer tools to provide source-level debugging experiences, are based on the DWARF format. These are indexed by their DWARF Build ID
199-
(built with `-Wl,--build-id` arguments) and the name of the module being debugged via the
200-
[buildId property](https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#event-scriptParsed), and the symbol file itself is suffixed with `.s` to disambiguate from the WASM file.
198+
WebAssembly symbols, which can be used by browser developer tools to provide source-level debugging experiences, are based on the DWARF format. These are indexed by the Build ID stored in the `build_id` custom section of the Wasm binary. The Build ID is a byte sequence typically produced by the linker (e.g., with `-Wl,--build-id` arguments). Both the module and its corresponding symbol file contain the same `build_id` section, allowing them to be matched.
199+
200+
The key uses the actual filename of the file being indexed. For split symbol files, toolchains such as Emscripten produce a separate file (e.g., `foo.debug.wasm`) that contains the DWARF debug sections (`.debug_info`, `.debug_line`, etc.) stripped from the original module.
201+
202+
The final key is formatted as follows:
203+
204+
`<file_name>/<build_id_byte_sequence>/<file_name>`
205+
206+
Example (module):
201207

202208
**File name:** `main.wasm`
203209

204-
**Build ID of file:** `e3b0c44298fc1c149afbf4c8996fb92427ae41e4`
210+
**Build ID bytes:** `0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4`
211+
212+
**Lookup key:** `main.wasm/e3b0c44298fc1c149afbf4c8996fb92427ae41e4/main.wasm`
213+
214+
Example (split symbol file):
215+
216+
**File name:** `main.debug.wasm`
217+
218+
**Build ID bytes:** `(same as module)`
205219

206-
**Lookup key:**: `main.wasm.s/e3b0c44298fc1c149afbf4c8996fb92427ae41e4/main.wasm.s`
220+
**Lookup key:** `main.debug.wasm/e3b0c44298fc1c149afbf4c8996fb92427ae41e4/main.debug.wasm`

0 commit comments

Comments
 (0)