ae03752fd9
This implements inspection of live registers on breakpoints in Liftoff. To that end, the frame pointer of the WasmDebugBreak frame is remembered when iterating the stack. Based on a platform-specific implementation of {WasmDebugBreakFrameConstants}, the offset of the respective register within that frame is computed, and the value is read from the frame. As a drive-by, the wasm debug side table is storing register codes as liftoff codes, which can also store register pairs (needed for i64 on 32-bit platforms, and for SIMD, which is not supported yet). R=jkummerow@chromium.org CC=thibaudm@chromium.org Bug: v8:10222 Change-Id: I01b669baf56430e100cd46cc46f210121ea679da Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2102574 Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66719}
339 lines
7.4 KiB
Plaintext
339 lines
7.4 KiB
Plaintext
Tests stepping through wasm scripts.
|
|
Instantiating.
|
|
Waiting for wasm script (ignoring first non-wasm script).
|
|
Setting breakpoint at offset 38 on script wasm://wasm/0c10a5fe
|
|
Calling main(4)
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x1
|
|
Scope:
|
|
at wasm_A (0:38):
|
|
- scope (global):
|
|
- scope (local):
|
|
stack:
|
|
at wasm_B (0:56):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 3 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Setting breakpoint at offset 39 on script v8://test/runWasm
|
|
Setting breakpoint at offset 61 on script v8://test/runWasm
|
|
Setting breakpoint at offset 60 on script v8://test/runWasm
|
|
Setting breakpoint at offset 54 on script v8://test/runWasm
|
|
Setting breakpoint at offset 53 on script v8://test/runWasm
|
|
Setting breakpoint at offset 51 on script v8://test/runWasm
|
|
Setting breakpoint at offset 49 on script v8://test/runWasm
|
|
Setting breakpoint at offset 45 on script v8://test/runWasm
|
|
Setting breakpoint at offset 47 on script v8://test/runWasm
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x1
|
|
Scope:
|
|
at wasm_A (0:39):
|
|
- scope (global):
|
|
- scope (local):
|
|
stack:
|
|
at wasm_B (0:56):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 3 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20
|
|
Scope:
|
|
at wasm_B (0:45):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 3 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x4
|
|
Scope:
|
|
at wasm_B (0:47):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 3 (number)
|
|
stack: "0": 3 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20
|
|
Scope:
|
|
at wasm_B (0:49):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 3 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41
|
|
Scope:
|
|
at wasm_B (0:51):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 3 (number)
|
|
stack: "0": 3 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b
|
|
Scope:
|
|
at wasm_B (0:53):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 3 (number)
|
|
stack: "0": 3 (number), "1": 1 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21
|
|
Scope:
|
|
at wasm_B (0:54):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 3 (number)
|
|
stack: "0": 2 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x1
|
|
Scope:
|
|
at wasm_A (0:38):
|
|
- scope (global):
|
|
- scope (local):
|
|
stack:
|
|
at wasm_B (0:56):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 2 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x1
|
|
Scope:
|
|
at wasm_A (0:39):
|
|
- scope (global):
|
|
- scope (local):
|
|
stack:
|
|
at wasm_B (0:56):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 2 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20
|
|
Scope:
|
|
at wasm_B (0:45):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 2 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x4
|
|
Scope:
|
|
at wasm_B (0:47):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 2 (number)
|
|
stack: "0": 2 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20
|
|
Scope:
|
|
at wasm_B (0:49):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 2 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41
|
|
Scope:
|
|
at wasm_B (0:51):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 2 (number)
|
|
stack: "0": 2 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b
|
|
Scope:
|
|
at wasm_B (0:53):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 2 (number)
|
|
stack: "0": 2 (number), "1": 1 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21
|
|
Scope:
|
|
at wasm_B (0:54):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 2 (number)
|
|
stack: "0": 1 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x1
|
|
Scope:
|
|
at wasm_A (0:38):
|
|
- scope (global):
|
|
- scope (local):
|
|
stack:
|
|
at wasm_B (0:56):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 1 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x1
|
|
Scope:
|
|
at wasm_A (0:39):
|
|
- scope (global):
|
|
- scope (local):
|
|
stack:
|
|
at wasm_B (0:56):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 1 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20
|
|
Scope:
|
|
at wasm_B (0:45):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 1 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x4
|
|
Scope:
|
|
at wasm_B (0:47):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 1 (number)
|
|
stack: "0": 1 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20
|
|
Scope:
|
|
at wasm_B (0:49):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 1 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41
|
|
Scope:
|
|
at wasm_B (0:51):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 1 (number)
|
|
stack: "0": 1 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b
|
|
Scope:
|
|
at wasm_B (0:53):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 1 (number)
|
|
stack: "0": 1 (number), "1": 1 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21
|
|
Scope:
|
|
at wasm_B (0:54):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 1 (number)
|
|
stack: "0": 0 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x1
|
|
Scope:
|
|
at wasm_A (0:38):
|
|
- scope (global):
|
|
- scope (local):
|
|
stack:
|
|
at wasm_B (0:56):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 0 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x1
|
|
Scope:
|
|
at wasm_A (0:39):
|
|
- scope (global):
|
|
- scope (local):
|
|
stack:
|
|
at wasm_B (0:56):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 0 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20
|
|
Scope:
|
|
at wasm_B (0:45):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 0 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x4
|
|
Scope:
|
|
at wasm_B (0:47):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 0 (number)
|
|
stack: "0": 0 (number)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 61: Wasm opcode 0xb
|
|
Scope:
|
|
at wasm_B (0:61):
|
|
- scope (global):
|
|
- scope (local):
|
|
locals: "var0": 0 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
exports.main returned!
|
|
Finished!
|