Commit b38c1369 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm][inspector][test] Print opcode names

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: 's avatarKim-Anh Tran <kimanh@chromium.org>
Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70578}
parent 063d56e7
......@@ -3,7 +3,7 @@ Instantiating.
Waiting for wasm script (ignoring first non-wasm script).
Setting breakpoint.
Calling func.
Script wasm://wasm/8c388106 byte offset 33: Wasm opcode 0x01
Script wasm://wasm/8c388106 byte offset 33: Wasm opcode 0x01 (kExprNop)
func returned.
Restarting debugger.
Calling func.
......
......@@ -3,7 +3,7 @@ Waiting for wasm scripts to be parsed.
Ignoring script with url v8://test/instantiate
Got wasm script: wasm://wasm/7d022e0e
paused No 1
Script wasm://wasm/7d022e0e byte offset 35: Wasm opcode 0x20
Script wasm://wasm/7d022e0e byte offset 35: Wasm opcode 0x20 (kExprLocalGet)
Debugger.resume
exports.main returned!
Finished!
......@@ -4,11 +4,11 @@ Calling instantiate function for module A.
Waiting for wasm script to be parsed.
Got wasm script!
Setting breakpoint in line 1:
Script wasm://wasm/8c388106 byte offset 33: Wasm opcode 0x01
Script wasm://wasm/8c388106 byte offset 33: Wasm opcode 0x01 (kExprNop)
Calling instantiate function for module B.
Calling main function on module B.
Paused at 0:33.
Script wasm://wasm/8c388106 byte offset 33: Wasm opcode 0x01
Script wasm://wasm/8c388106 byte offset 33: Wasm opcode 0x01 (kExprNop)
Getting current stack trace via "new Error().stack".
Error
at v8://test/getStack:1:1
......
......@@ -10,7 +10,7 @@ Setting breakpoint on line 3 of wasm function
scriptId : <scriptId>
}
paused No 1
Script wasm://wasm/7d022e0e byte offset 39: Wasm opcode 0x6b
Script wasm://wasm/7d022e0e byte offset 39: Wasm opcode 0x6b (kExprI32Sub)
Remove breakpoint
Debugger.resume
exports.main returned!
......
......@@ -9,7 +9,7 @@ Setting breakpoint on first instruction of second function
scriptId : <scriptId>
}
Paused:
Script wasm://wasm/c723f83a byte offset 147: Wasm opcode 0x41
Script wasm://wasm/c723f83a byte offset 147: Wasm opcode 0x41 (kExprI32Const)
Scope:
at func (0:147):
- scope (module):
......@@ -43,7 +43,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 149: Wasm opcode 0x21
Script wasm://wasm/c723f83a byte offset 149: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at func (0:149):
- scope (module):
......@@ -78,7 +78,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 151: Wasm opcode 0x41
Script wasm://wasm/c723f83a byte offset 151: Wasm opcode 0x41 (kExprI32Const)
Scope:
at func (0:151):
- scope (module):
......@@ -112,7 +112,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 153: Wasm opcode 0x21
Script wasm://wasm/c723f83a byte offset 153: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at func (0:153):
- scope (module):
......@@ -147,7 +147,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 155: Wasm opcode 0x42
Script wasm://wasm/c723f83a byte offset 155: Wasm opcode 0x42 (kExprI64Const)
Scope:
at func (0:155):
- scope (module):
......@@ -181,7 +181,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 166: Wasm opcode 0x21
Script wasm://wasm/c723f83a byte offset 166: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at func (0:166):
- scope (module):
......@@ -216,7 +216,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 168: Wasm opcode 0x42
Script wasm://wasm/c723f83a byte offset 168: Wasm opcode 0x42 (kExprI64Const)
Scope:
at func (0:168):
- scope (module):
......@@ -250,7 +250,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 179: Wasm opcode 0x21
Script wasm://wasm/c723f83a byte offset 179: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at func (0:179):
- scope (module):
......@@ -285,7 +285,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 181: Wasm opcode 0x41
Script wasm://wasm/c723f83a byte offset 181: Wasm opcode 0x41 (kExprI32Const)
Scope:
at func (0:181):
- scope (module):
......@@ -319,7 +319,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 183: Wasm opcode 0xb8
Script wasm://wasm/c723f83a byte offset 183: Wasm opcode 0xb8 (kExprF64UConvertI32)
Scope:
at func (0:183):
- scope (module):
......@@ -354,7 +354,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 184: Wasm opcode 0x41
Script wasm://wasm/c723f83a byte offset 184: Wasm opcode 0x41 (kExprI32Const)
Scope:
at func (0:184):
- scope (module):
......@@ -389,7 +389,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 186: Wasm opcode 0xb8
Script wasm://wasm/c723f83a byte offset 186: Wasm opcode 0xb8 (kExprF64UConvertI32)
Scope:
at func (0:186):
- scope (module):
......@@ -425,7 +425,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 187: Wasm opcode 0xa3
Script wasm://wasm/c723f83a byte offset 187: Wasm opcode 0xa3 (kExprF64Div)
Scope:
at func (0:187):
- scope (module):
......@@ -461,7 +461,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 188: Wasm opcode 0x21
Script wasm://wasm/c723f83a byte offset 188: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at func (0:188):
- scope (module):
......@@ -496,7 +496,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 190: Wasm opcode 0x41
Script wasm://wasm/c723f83a byte offset 190: Wasm opcode 0x41 (kExprI32Const)
Scope:
at func (0:190):
- scope (module):
......@@ -530,7 +530,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 192: Wasm opcode 0xfd
Script wasm://wasm/c723f83a byte offset 192: Wasm opcode 0xfd (kSimdPrefix)
Scope:
at func (0:192):
- scope (module):
......@@ -565,7 +565,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 194: Wasm opcode 0x21
Script wasm://wasm/c723f83a byte offset 194: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at func (0:194):
- scope (module):
......@@ -600,7 +600,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 196: Wasm opcode 0x41
Script wasm://wasm/c723f83a byte offset 196: Wasm opcode 0x41 (kExprI32Const)
Scope:
at func (0:196):
- scope (module):
......@@ -634,7 +634,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 198: Wasm opcode 0xb3
Script wasm://wasm/c723f83a byte offset 198: Wasm opcode 0xb3 (kExprF32UConvertI32)
Scope:
at func (0:198):
- scope (module):
......@@ -669,7 +669,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 199: Wasm opcode 0x21
Script wasm://wasm/c723f83a byte offset 199: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at func (0:199):
- scope (module):
......@@ -704,7 +704,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 201: Wasm opcode 0x41
Script wasm://wasm/c723f83a byte offset 201: Wasm opcode 0x41 (kExprI32Const)
Scope:
at func (0:201):
- scope (module):
......@@ -738,7 +738,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 203: Wasm opcode 0x24
Script wasm://wasm/c723f83a byte offset 203: Wasm opcode 0x24 (kExprGlobalSet)
Scope:
at func (0:203):
- scope (module):
......@@ -773,7 +773,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 205: Wasm opcode 0x0b
Script wasm://wasm/c723f83a byte offset 205: Wasm opcode 0x0b (kExprEnd)
Scope:
at func (0:205):
- scope (module):
......@@ -807,7 +807,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/c723f83a byte offset 134: Wasm opcode 0x0b
Script wasm://wasm/c723f83a byte offset 134: Wasm opcode 0x0b (kExprEnd)
Scope:
at call_func (0:134):
- scope (module):
......
......@@ -9,7 +9,7 @@ Setting breakpoint on line 2 (first instruction) of third function
scriptId : <scriptId>
}
Paused:
Script wasm://wasm/e33badc2 byte offset 169: Wasm opcode 0x20
Script wasm://wasm/e33badc2 byte offset 169: Wasm opcode 0x20 (kExprLocalGet)
Scope:
at C (interpreted) (0:169):
- scope (module):
......@@ -55,7 +55,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/e33badc2 byte offset 171: Wasm opcode 0x24
Script wasm://wasm/e33badc2 byte offset 171: Wasm opcode 0x24 (kExprGlobalSet)
Scope:
at C (interpreted) (0:171):
- scope (module):
......@@ -102,7 +102,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/e33badc2 byte offset 173: Wasm opcode 0x41
Script wasm://wasm/e33badc2 byte offset 173: Wasm opcode 0x41 (kExprI32Const)
Scope:
at C (interpreted) (0:173):
- scope (module):
......@@ -148,7 +148,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/e33badc2 byte offset 175: Wasm opcode 0x21
Script wasm://wasm/e33badc2 byte offset 175: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at C (interpreted) (0:175):
- scope (module):
......@@ -195,7 +195,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/e33badc2 byte offset 177: Wasm opcode 0x0b
Script wasm://wasm/e33badc2 byte offset 177: Wasm opcode 0x0b (kExprEnd)
Scope:
at C (interpreted) (0:177):
- scope (module):
......@@ -241,7 +241,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/e33badc2 byte offset 160: Wasm opcode 0x1a
Script wasm://wasm/e33badc2 byte offset 160: Wasm opcode 0x1a (kExprDrop)
Scope:
at B (liftoff) (0:160):
- scope (module):
......@@ -275,7 +275,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/e33badc2 byte offset 161: Wasm opcode 0x1a
Script wasm://wasm/e33badc2 byte offset 161: Wasm opcode 0x1a (kExprDrop)
Scope:
at B (liftoff) (0:161):
- scope (module):
......@@ -308,7 +308,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/e33badc2 byte offset 162: Wasm opcode 0x0b
Script wasm://wasm/e33badc2 byte offset 162: Wasm opcode 0x0b (kExprEnd)
Scope:
at B (liftoff) (0:162):
- scope (module):
......@@ -340,7 +340,7 @@ at (anonymous) (0:17):
-- skipped globals
Paused:
Script wasm://wasm/e33badc2 byte offset 130: Wasm opcode 0x0b
Script wasm://wasm/e33badc2 byte offset 130: Wasm opcode 0x0b (kExprEnd)
Scope:
at A (liftoff) (0:130):
- scope (module):
......
......@@ -4,7 +4,7 @@ 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
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
Scope:
at wasm_A (0:38):
- scope (module):
......@@ -29,7 +29,7 @@ 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
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
Scope:
at wasm_A (0:39):
- scope (module):
......@@ -45,7 +45,7 @@ at wasm_B (0:56):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
Scope:
at wasm_B (0:45):
- scope (module):
......@@ -56,7 +56,7 @@ at wasm_B (0:45):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
Scope:
at wasm_B (0:47):
- scope (module):
......@@ -68,7 +68,7 @@ at wasm_B (0:47):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
Scope:
at wasm_B (0:49):
- scope (module):
......@@ -79,7 +79,7 @@ at wasm_B (0:49):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
Scope:
at wasm_B (0:51):
- scope (module):
......@@ -91,7 +91,7 @@ at wasm_B (0:51):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
Scope:
at wasm_B (0:53):
- scope (module):
......@@ -104,7 +104,7 @@ at wasm_B (0:53):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at wasm_B (0:54):
- scope (module):
......@@ -116,7 +116,7 @@ at wasm_B (0:54):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
Scope:
at wasm_A (0:38):
- scope (module):
......@@ -132,7 +132,7 @@ at wasm_B (0:56):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
Scope:
at wasm_A (0:39):
- scope (module):
......@@ -148,7 +148,7 @@ at wasm_B (0:56):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
Scope:
at wasm_B (0:45):
- scope (module):
......@@ -159,7 +159,7 @@ at wasm_B (0:45):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
Scope:
at wasm_B (0:47):
- scope (module):
......@@ -171,7 +171,7 @@ at wasm_B (0:47):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
Scope:
at wasm_B (0:49):
- scope (module):
......@@ -182,7 +182,7 @@ at wasm_B (0:49):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
Scope:
at wasm_B (0:51):
- scope (module):
......@@ -194,7 +194,7 @@ at wasm_B (0:51):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
Scope:
at wasm_B (0:53):
- scope (module):
......@@ -207,7 +207,7 @@ at wasm_B (0:53):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at wasm_B (0:54):
- scope (module):
......@@ -219,7 +219,7 @@ at wasm_B (0:54):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
Scope:
at wasm_A (0:38):
- scope (module):
......@@ -235,7 +235,7 @@ at wasm_B (0:56):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
Scope:
at wasm_A (0:39):
- scope (module):
......@@ -251,7 +251,7 @@ at wasm_B (0:56):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
Scope:
at wasm_B (0:45):
- scope (module):
......@@ -262,7 +262,7 @@ at wasm_B (0:45):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
Scope:
at wasm_B (0:47):
- scope (module):
......@@ -274,7 +274,7 @@ at wasm_B (0:47):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
Scope:
at wasm_B (0:49):
- scope (module):
......@@ -285,7 +285,7 @@ at wasm_B (0:49):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
Scope:
at wasm_B (0:51):
- scope (module):
......@@ -297,7 +297,7 @@ at wasm_B (0:51):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
Scope:
at wasm_B (0:53):
- scope (module):
......@@ -310,7 +310,7 @@ at wasm_B (0:53):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
Scope:
at wasm_B (0:54):
- scope (module):
......@@ -322,7 +322,7 @@ at wasm_B (0:54):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
Scope:
at wasm_A (0:38):
- scope (module):
......@@ -338,7 +338,7 @@ at wasm_B (0:56):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
Scope:
at wasm_A (0:39):
- scope (module):
......@@ -354,7 +354,7 @@ at wasm_B (0:56):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
Scope:
at wasm_B (0:45):
- scope (module):
......@@ -365,7 +365,7 @@ at wasm_B (0:45):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
Scope:
at wasm_B (0:47):
- scope (module):
......@@ -377,7 +377,7 @@ at wasm_B (0:47):
at (anonymous) (0:17):
-- skipped
Paused:
Script wasm://wasm/0c10a5fe byte offset 61: Wasm opcode 0x0b
Script wasm://wasm/0c10a5fe byte offset 61: Wasm opcode 0x0b (kExprEnd)
Scope:
at wasm_B (0:61):
- scope (module):
......
......@@ -3,7 +3,7 @@ Instantiating.
Calling div function.
Paused at:
--- 0 ---
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d (kExprI32DivS)
scope at div (0:46):
a: 1
b: 0
......@@ -33,7 +33,7 @@ Paused at:
-> resume
Paused at:
--- 0 ---
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d
Script wasm://wasm/a9a86c5e byte offset 46: Wasm opcode 0x6d (kExprI32DivS)
scope at div (0:46):
a: -2147483648
b: -1
......
......@@ -3,10 +3,10 @@ Setting up global instance variable.
Got wasm script: wasm://wasm/4658c40e
Setting breakpoint on offset 44
Running main function.
Script wasm://wasm/4658c40e byte offset 44: Wasm opcode 0x10
Script wasm://wasm/4658c40e byte offset 44: Wasm opcode 0x10 (kExprCallFunction)
Debugger.stepInto called
Script wasm://wasm/4658c40e byte offset 40: Wasm opcode 0x0b
Script wasm://wasm/4658c40e byte offset 40: Wasm opcode 0x0b (kExprEnd)
Debugger.stepInto called
Script wasm://wasm/4658c40e byte offset 41: Wasm opcode 0x0b
Script wasm://wasm/4658c40e byte offset 41: Wasm opcode 0x0b (kExprEnd)
Debugger.resume called
exports.main returned.
......@@ -7,51 +7,51 @@ Setting breakpoint on offset 72 (should be propagated to 73, the offset of the c
lineNumber : 0
scriptId : <scriptId>
}
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10 (kExprCallFunction)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01 (kExprNop)
Debugger.stepOver called
Script wasm://wasm/42af3c82 byte offset 53: Wasm opcode 0x01
Script wasm://wasm/42af3c82 byte offset 53: Wasm opcode 0x01 (kExprNop)
Debugger.stepOut called
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c (kExprBr)
Debugger.stepOut called
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10 (kExprCallFunction)
Debugger.stepOver called
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c (kExprBr)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20 (kExprLocalGet)
Debugger.resume called
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10 (kExprCallFunction)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01 (kExprNop)
Debugger.stepOut called
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c (kExprBr)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20 (kExprLocalGet)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 61: Wasm opcode 0x04
Script wasm://wasm/42af3c82 byte offset 61: Wasm opcode 0x04 (kExprIf)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 63: Wasm opcode 0x20
Script wasm://wasm/42af3c82 byte offset 63: Wasm opcode 0x20 (kExprLocalGet)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 65: Wasm opcode 0x41
Script wasm://wasm/42af3c82 byte offset 65: Wasm opcode 0x41 (kExprI32Const)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 67: Wasm opcode 0x6b
Script wasm://wasm/42af3c82 byte offset 67: Wasm opcode 0x6b (kExprI32Sub)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 68: Wasm opcode 0x21
Script wasm://wasm/42af3c82 byte offset 68: Wasm opcode 0x21 (kExprLocalSet)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 70: Wasm opcode 0x41
Script wasm://wasm/42af3c82 byte offset 70: Wasm opcode 0x41 (kExprI32Const)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10 (kExprCallFunction)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01 (kExprNop)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 53: Wasm opcode 0x01
Script wasm://wasm/42af3c82 byte offset 53: Wasm opcode 0x01 (kExprNop)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 54: Wasm opcode 0x0b
Script wasm://wasm/42af3c82 byte offset 54: Wasm opcode 0x0b (kExprEnd)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c (kExprBr)
Debugger.stepInto called
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20 (kExprLocalGet)
Debugger.resume called
exports.main returned!
Test stepping over a recursive call
......@@ -61,9 +61,9 @@ Setting breakpoint on the recursive call instruction @+93, url wasm://wasm/42af3
lineNumber : 0
scriptId : <scriptId>
}
Script wasm://wasm/42af3c82 byte offset 93: Wasm opcode 0x10
Script wasm://wasm/42af3c82 byte offset 93: Wasm opcode 0x10 (kExprCallFunction)
Removing breakpoint
Debugger.stepOver called
Script wasm://wasm/42af3c82 byte offset 95: Wasm opcode 0x20
Script wasm://wasm/42af3c82 byte offset 95: Wasm opcode 0x20 (kExprLocalGet)
Debugger.resume called
Finished!
......@@ -22,10 +22,10 @@ paused
Debugger.stepInto
paused
Script wasm://wasm/7d022e0e byte offset 35: Wasm opcode 0x20
Script wasm://wasm/7d022e0e byte offset 35: Wasm opcode 0x20 (kExprLocalGet)
Debugger.resume
paused
Script wasm://wasm/7d022e0e byte offset 37: Wasm opcode 0x41
Script wasm://wasm/7d022e0e byte offset 37: Wasm opcode 0x41 (kExprI32Const)
Debugger.resume
exports.main returned!
Finished!
......@@ -17,7 +17,7 @@ function test() {
Debugger.resume
paused
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 (kExprNop)
Debugger.stepOut
paused
instance.exports.main();
......@@ -36,10 +36,10 @@ function test() {
Debugger.resume
paused
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 (kExprNop)
Debugger.stepOver
paused
Script wasm://wasm/242f4a16 byte offset 34: Wasm opcode 0x0b
Script wasm://wasm/242f4a16 byte offset 34: Wasm opcode 0x0b (kExprEnd)
Debugger.resume
exports.main returned!
Finished run 2!
......@@ -52,10 +52,10 @@ function test() {
Debugger.resume
paused
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 (kExprNop)
Debugger.stepInto
paused
Script wasm://wasm/242f4a16 byte offset 34: Wasm opcode 0x0b
Script wasm://wasm/242f4a16 byte offset 34: Wasm opcode 0x0b (kExprEnd)
Debugger.resume
exports.main returned!
Finished run 3!
......
......@@ -7,83 +7,83 @@ Got wasm script: wasm://wasm/befe41aa
scriptId : <scriptId>
}
Test with valid skip lists
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping over without skip list
Testing stepOver with skipList: []
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 (kExprCallFunction)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping over with skip list
Testing stepOver with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":48},"end":{"lineNumber":0,"columnNumber":50}},{"scriptId":"4","start":{"lineNumber":0,"columnNumber":60},"end":{"lineNumber":0,"columnNumber":62}}]
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping over start location is inclusive
Testing stepOver with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":48},"end":{"lineNumber":0,"columnNumber":61}}]
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping over end location is exclusive
Testing stepOver with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":49},"end":{"lineNumber":0,"columnNumber":62}}]
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping into without skip list
Testing stepInto with skipList: []
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10
Script wasm://wasm/befe41aa byte offset 39: Wasm opcode 0x01
Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x01
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 (kExprCallFunction)
Script wasm://wasm/befe41aa byte offset 39: Wasm opcode 0x01 (kExprNop)
Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x01 (kExprNop)
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b (kExprEnd)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping into with skip list, while call itself is skipped
Testing stepInto with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":39},"end":{"lineNumber":0,"columnNumber":41}},{"scriptId":"4","start":{"lineNumber":0,"columnNumber":50},"end":{"lineNumber":0,"columnNumber":62}}]
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b (kExprEnd)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping into start location is inclusive
Testing stepInto with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":39},"end":{"lineNumber":0,"columnNumber":40}}]
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10
Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x01
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 (kExprCallFunction)
Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x01 (kExprNop)
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b (kExprEnd)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping into end location is exclusive
Testing stepInto with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":38},"end":{"lineNumber":0,"columnNumber":41}}]
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 (kExprCallFunction)
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b (kExprEnd)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test with invalid skip lists
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: start position has invalid column number
Testing stepOver with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":-1},"end":{"lineNumber":0,"columnNumber":62}}]
Position missing 'column' or 'column' < 0.
......
......@@ -9,7 +9,7 @@ Setting breakpoint on offset 54 (on the setlocal before the call), url wasm://wa
lineNumber : 0
scriptId : <scriptId>
}
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
at wasm_B (0:54):
- scope (module):
-- skipped
......@@ -21,7 +21,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10 (kExprCallFunction)
at wasm_B (0:56):
- scope (module):
-- skipped
......@@ -33,7 +33,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01 (kExprNop)
at wasm_A (0:38):
- scope (module):
-- skipped
......@@ -52,7 +52,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepOver called
Script wasm://wasm/9b4bf87e byte offset 39: Wasm opcode 0x01
Script wasm://wasm/9b4bf87e byte offset 39: Wasm opcode 0x01 (kExprNop)
at wasm_A (0:39):
- scope (module):
-- skipped
......@@ -71,7 +71,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepOut called
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c (kExprBr)
at wasm_B (0:58):
- scope (module):
-- skipped
......@@ -83,7 +83,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepOut called
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
at wasm_B (0:54):
- scope (module):
-- skipped
......@@ -95,7 +95,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepOver called
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10 (kExprCallFunction)
at wasm_B (0:56):
- scope (module):
-- skipped
......@@ -107,7 +107,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepOver called
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c (kExprBr)
at wasm_B (0:58):
- scope (module):
-- skipped
......@@ -119,7 +119,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.resume called
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
at wasm_B (0:54):
- scope (module):
-- skipped
......@@ -131,7 +131,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10 (kExprCallFunction)
at wasm_B (0:56):
- scope (module):
-- skipped
......@@ -143,7 +143,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01 (kExprNop)
at wasm_A (0:38):
- scope (module):
-- skipped
......@@ -162,7 +162,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepOut called
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c (kExprBr)
at wasm_B (0:58):
- scope (module):
-- skipped
......@@ -174,7 +174,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 45: Wasm opcode 0x20
Script wasm://wasm/9b4bf87e byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
at wasm_B (0:45):
- scope (module):
-- skipped
......@@ -186,7 +186,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 47: Wasm opcode 0x04
Script wasm://wasm/9b4bf87e byte offset 47: Wasm opcode 0x04 (kExprIf)
at wasm_B (0:47):
- scope (module):
-- skipped
......@@ -198,7 +198,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 49: Wasm opcode 0x20
Script wasm://wasm/9b4bf87e byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
at wasm_B (0:49):
- scope (module):
-- skipped
......@@ -210,7 +210,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 51: Wasm opcode 0x41
Script wasm://wasm/9b4bf87e byte offset 51: Wasm opcode 0x41 (kExprI32Const)
at wasm_B (0:51):
- scope (module):
-- skipped
......@@ -222,7 +222,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 53: Wasm opcode 0x6b
Script wasm://wasm/9b4bf87e byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
at wasm_B (0:53):
- scope (module):
-- skipped
......@@ -234,7 +234,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
at wasm_B (0:54):
- scope (module):
-- skipped
......@@ -246,7 +246,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10 (kExprCallFunction)
at wasm_B (0:56):
- scope (module):
-- skipped
......@@ -258,7 +258,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01 (kExprNop)
at wasm_A (0:38):
- scope (module):
-- skipped
......@@ -277,7 +277,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 39: Wasm opcode 0x01
Script wasm://wasm/9b4bf87e byte offset 39: Wasm opcode 0x01 (kExprNop)
at wasm_A (0:39):
- scope (module):
-- skipped
......@@ -296,7 +296,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 40: Wasm opcode 0x0b
Script wasm://wasm/9b4bf87e byte offset 40: Wasm opcode 0x0b (kExprEnd)
at wasm_A (0:40):
- scope (module):
-- skipped
......@@ -315,7 +315,7 @@ at (anonymous) (0:17):
- scope (global):
-- skipped
Debugger.stepInto called
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c (kExprBr)
at wasm_B (0:58):
- scope (module):
-- skipped
......
......@@ -299,9 +299,14 @@ InspectorTest.Session = class {
if (location.lineNumber != 0) {
InspectorTest.log('Unexpected wasm line number: ' + location.lineNumber);
}
let wasm_opcode = script.bytecode[location.columnNumber].toString(16);
if (wasm_opcode.length % 2) wasm_opcode = '0' + wasm_opcode;
InspectorTest.log(`Script ${script.url} byte offset ${location.columnNumber}: Wasm opcode 0x${wasm_opcode}`);
let wasm_opcode = script.bytecode[location.columnNumber];
let opcode_str = wasm_opcode.toString(16);
if (opcode_str.length % 2) opcode_str = `0${opcode_str}`;
if (InspectorTest.getWasmOpcodeName) {
opcode_str += ` (${InspectorTest.getWasmOpcodeName(wasm_opcode)})`;
}
InspectorTest.log(`Script ${script.url} byte offset ${
location.columnNumber}: Wasm opcode 0x${opcode_str}`);
} else {
var lines = script.scriptSource.split('\n');
var line = lines[location.lineNumber];
......
......@@ -5,6 +5,7 @@
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
WasmInspectorTest = {}
InspectorTest.getWasmOpcodeName = getOpcodeName;
WasmInspectorTest.evalWithUrl = (code, url) =>
Protocol.Runtime
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment