c7848612d8
This addition will allow to experiment with parsing DWARF information from WebAssembly on the frontend side for improved debugging. The frontend must explicitly opt-in to this experiment by setting `supportsWasmDwarf: true` in `Debugger.enable` params. When this option is present, and Wasm appears to contain DWARF information (heuristic: `.debug_info` custom section is present), V8 will not try to disassemble and report each WebAssembly function as a separate fake script, but instead will report Wasm module as a whole. Note that V8 already does this when Wasm is associated with a source map. Additionally, this CL adds a dedicated `Debugger.getWasmBytecode` command that accepts scriptId and returns raw wire bytes of the chosen WebAssembly module. Change-Id: I7a6e80daf8d91ffaaba04fa15688f2ba9552870f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809375 Commit-Queue: Ingvar Stepanyan <rreverser@google.com> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#63969}
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
Tests how wasm scripts are reported
|
|
Check that each inspector gets two wasm scripts at module creation time.
|
|
Session #1: Script #0 parsed. URL: wasm://wasm/wasm-77a937ae/wasm-77a937ae-0
|
|
Session #1: Script #1 parsed. URL: wasm://wasm/wasm-77a937ae/wasm-77a937ae-1
|
|
Session #2: Script #0 parsed. URL: wasm://wasm/wasm-77a937ae/wasm-77a937ae-0
|
|
Session #2: Script #1 parsed. URL: wasm://wasm/wasm-77a937ae/wasm-77a937ae-1
|
|
Session #3: Script #0 parsed. URL: wasm-77a937ae
|
|
Session #1: Source for wasm://wasm/wasm-77a937ae/wasm-77a937ae-0:
|
|
func $nopFunction
|
|
nop
|
|
end
|
|
|
|
Session #1: Source for wasm://wasm/wasm-77a937ae/wasm-77a937ae-1:
|
|
func $main
|
|
block
|
|
i32.const 2
|
|
drop
|
|
end
|
|
end
|
|
|
|
Session #2: Source for wasm://wasm/wasm-77a937ae/wasm-77a937ae-0:
|
|
func $nopFunction
|
|
nop
|
|
end
|
|
|
|
Session #2: Source for wasm://wasm/wasm-77a937ae/wasm-77a937ae-1:
|
|
func $main
|
|
block
|
|
i32.const 2
|
|
drop
|
|
end
|
|
end
|
|
|
|
Session #3: Source for wasm-77a937ae:
|
|
Raw: 00 61 73 6d 01 00 00 00 01 07 02 60 00 00 60 00 00 03 03 02 00 01 07 08 01 04 6d 61 69 6e 00 01 0a 0e 02 03 00 01 0b 08 00 02 40 41 02 1a 0b 0b 00 0c 0b 2e 64 65 62 75 67 5f 69 6e 66 6f 00 1b 04 6e 61 6d 65 01 14 02 00 0b 6e 6f 70 46 75 6e 63 74 69 6f 6e 01 04 6d 61 69 6e
|
|
Imports: []
|
|
Exports: [main: function]
|