v8/test/inspector/debugger/wasm-step-after-trap-expected.txt
Benedikt Meurer 85fdbd910f [inspector][wasm] Unify locals, stack, and globals objects.
This change unifies the locals, stack, and globals objects exposed for
WebAssembly frames via the Scope view and via DebugEvaluate to use the
same underlying objects (implemented via interceptors). This also
means that for locals and globals we now consistently expose names
prefixed by a dollar symbol everywhere.

Drive-by-fix: Move the debug::ScopeIterator implementation for WasmFrame
into debug-wasm-support.cc, so WebAssembly scope details are all found
in one place instead of scattered around the code.

Drive-by-cleanup: Rename GetJSDebugProxy to GetWasmDebugProxy for
consistency. GetJSDebugProxy is a bit misleading, since the debug proxy
is not about JavaScript, but just exposed to JavaScript.

Doc: http://bit.ly/devtools-wasm-entities
Bug: chromium:1159307, chromium:1127914, chromium:1162229
Change-Id: If932bd06bbce72542823f63dac1bd976ab33937a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615348
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72009}
2021-01-11 14:50:40 +00:00

66 lines
1.1 KiB
Plaintext

Test scope inspection and stepping after a trap.
Running test: test
Instantiating.
Calling div function.
Paused at:
--- 0 ---
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d (kExprI32DivS)
scope at div (0:46):
$a: 1
$b: 0
$unused: 4711
$local_zero: 0
$local_const_11: 11
--- 1 ---
try {
instance.exports.#div(1, 0, 4711); // traps (div by zero)
} catch (e) {
--- 2 ---
#call_div()
-------------
-> stepInto
Paused at:
--- 0 ---
} catch (e) {
#e.stack; // step target of first pause
}
--- 1 ---
#call_div()
-------------
-> resume
Paused at:
--- 0 ---
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d (kExprI32DivS)
scope at div (0:46):
$a: -2147483648
$b: -1
$unused: 4711
$local_zero: 0
$local_const_11: 11
--- 1 ---
try {
instance.exports.#div(0x80000000, -1, 4711); // traps (unrepresentable)
} catch (e) {
--- 2 ---
#call_div()
-------------
-> stepInto
Paused at:
--- 0 ---
} catch (e) {
#e.stack; // step target of second pause
}
--- 1 ---
#call_div()
-------------
-> resume