b38c136948
It makes inspector tests a lot more readable if the opcode of the pause location is being printed. Since we already have a list of all opcodes available in wasm-module-builder.js, we can just reuse that to build a reverse lookup map. This CL implements this for single-byte opcodes only, which is enough for all tests that we currently have. It will have to be extended for prefixed opcodes once that is being used. R=thibaudm@chromium.org, kimanh@chromium.org Change-Id: I085fea99d2f5f2dc6cc084448e5f7444cce5c78b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2474789 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#70578}
392 lines
9.7 KiB
Plaintext
392 lines
9.7 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 0x01 (kExprNop)
|
|
Scope:
|
|
at wasm_A (0:38):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
- scope (wasm-expression-stack):
|
|
at wasm_B (0:56):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 3 (i32)
|
|
- scope (wasm-expression-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 0x01 (kExprNop)
|
|
Scope:
|
|
at wasm_A (0:39):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
- scope (wasm-expression-stack):
|
|
at wasm_B (0:56):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 3 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
|
|
Scope:
|
|
at wasm_B (0:45):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 3 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
|
|
Scope:
|
|
at wasm_B (0:47):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 3 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 3 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
|
|
Scope:
|
|
at wasm_B (0:49):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 3 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
|
|
Scope:
|
|
at wasm_B (0:51):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 3 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 3 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
|
|
Scope:
|
|
at wasm_B (0:53):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 3 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 3 (i32)
|
|
1: 1 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
|
|
Scope:
|
|
at wasm_B (0:54):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 3 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 2 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
|
|
Scope:
|
|
at wasm_A (0:38):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
- scope (wasm-expression-stack):
|
|
at wasm_B (0:56):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 2 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
|
|
Scope:
|
|
at wasm_A (0:39):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
- scope (wasm-expression-stack):
|
|
at wasm_B (0:56):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 2 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
|
|
Scope:
|
|
at wasm_B (0:45):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 2 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
|
|
Scope:
|
|
at wasm_B (0:47):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 2 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 2 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
|
|
Scope:
|
|
at wasm_B (0:49):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 2 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
|
|
Scope:
|
|
at wasm_B (0:51):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 2 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 2 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
|
|
Scope:
|
|
at wasm_B (0:53):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 2 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 2 (i32)
|
|
1: 1 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
|
|
Scope:
|
|
at wasm_B (0:54):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 2 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 1 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
|
|
Scope:
|
|
at wasm_A (0:38):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
- scope (wasm-expression-stack):
|
|
at wasm_B (0:56):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 1 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
|
|
Scope:
|
|
at wasm_A (0:39):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
- scope (wasm-expression-stack):
|
|
at wasm_B (0:56):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 1 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
|
|
Scope:
|
|
at wasm_B (0:45):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 1 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
|
|
Scope:
|
|
at wasm_B (0:47):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 1 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 1 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
|
|
Scope:
|
|
at wasm_B (0:49):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 1 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
|
|
Scope:
|
|
at wasm_B (0:51):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 1 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 1 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
|
|
Scope:
|
|
at wasm_B (0:53):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 1 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 1 (i32)
|
|
1: 1 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
|
|
Scope:
|
|
at wasm_B (0:54):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 1 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 0 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
|
|
Scope:
|
|
at wasm_A (0:38):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
- scope (wasm-expression-stack):
|
|
at wasm_B (0:56):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 0 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
|
|
Scope:
|
|
at wasm_A (0:39):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
- scope (wasm-expression-stack):
|
|
at wasm_B (0:56):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 0 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
|
|
Scope:
|
|
at wasm_B (0:45):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 0 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
|
|
Scope:
|
|
at wasm_B (0:47):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 0 (i32)
|
|
- scope (wasm-expression-stack):
|
|
0: 0 (i32)
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
Paused:
|
|
Script wasm://wasm/0c10a5fe byte offset 61: Wasm opcode 0x0b (kExprEnd)
|
|
Scope:
|
|
at wasm_B (0:61):
|
|
- scope (module):
|
|
instance: exports: "main" (Function)
|
|
- scope (local):
|
|
var0: 0 (i32)
|
|
- scope (wasm-expression-stack):
|
|
at (anonymous) (0:17):
|
|
-- skipped
|
|
exports.main returned!
|
|
Finished!
|