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. ...@@ -3,7 +3,7 @@ Instantiating.
Waiting for wasm script (ignoring first non-wasm script). Waiting for wasm script (ignoring first non-wasm script).
Setting breakpoint. Setting breakpoint.
Calling func. 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. func returned.
Restarting debugger. Restarting debugger.
Calling func. Calling func.
......
...@@ -3,7 +3,7 @@ Waiting for wasm scripts to be parsed. ...@@ -3,7 +3,7 @@ Waiting for wasm scripts to be parsed.
Ignoring script with url v8://test/instantiate Ignoring script with url v8://test/instantiate
Got wasm script: wasm://wasm/7d022e0e Got wasm script: wasm://wasm/7d022e0e
paused No 1 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 Debugger.resume
exports.main returned! exports.main returned!
Finished! Finished!
...@@ -4,11 +4,11 @@ Calling instantiate function for module A. ...@@ -4,11 +4,11 @@ Calling instantiate function for module A.
Waiting for wasm script to be parsed. Waiting for wasm script to be parsed.
Got wasm script! Got wasm script!
Setting breakpoint in line 1: 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 instantiate function for module B.
Calling main function on module B. Calling main function on module B.
Paused at 0:33. 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". Getting current stack trace via "new Error().stack".
Error Error
at v8://test/getStack:1:1 at v8://test/getStack:1:1
......
...@@ -10,7 +10,7 @@ Setting breakpoint on line 3 of wasm function ...@@ -10,7 +10,7 @@ Setting breakpoint on line 3 of wasm function
scriptId : <scriptId> scriptId : <scriptId>
} }
paused No 1 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 Remove breakpoint
Debugger.resume Debugger.resume
exports.main returned! exports.main returned!
......
...@@ -9,7 +9,7 @@ Setting breakpoint on first instruction of second function ...@@ -9,7 +9,7 @@ Setting breakpoint on first instruction of second function
scriptId : <scriptId> scriptId : <scriptId>
} }
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 147: Wasm opcode 0x41 Script wasm://wasm/c723f83a byte offset 147: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at func (0:147): at func (0:147):
- scope (module): - scope (module):
...@@ -43,7 +43,7 @@ at (anonymous) (0:17): ...@@ -43,7 +43,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 149: Wasm opcode 0x21 Script wasm://wasm/c723f83a byte offset 149: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at func (0:149): at func (0:149):
- scope (module): - scope (module):
...@@ -78,7 +78,7 @@ at (anonymous) (0:17): ...@@ -78,7 +78,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 151: Wasm opcode 0x41 Script wasm://wasm/c723f83a byte offset 151: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at func (0:151): at func (0:151):
- scope (module): - scope (module):
...@@ -112,7 +112,7 @@ at (anonymous) (0:17): ...@@ -112,7 +112,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 153: Wasm opcode 0x21 Script wasm://wasm/c723f83a byte offset 153: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at func (0:153): at func (0:153):
- scope (module): - scope (module):
...@@ -147,7 +147,7 @@ at (anonymous) (0:17): ...@@ -147,7 +147,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 155: Wasm opcode 0x42 Script wasm://wasm/c723f83a byte offset 155: Wasm opcode 0x42 (kExprI64Const)
Scope: Scope:
at func (0:155): at func (0:155):
- scope (module): - scope (module):
...@@ -181,7 +181,7 @@ at (anonymous) (0:17): ...@@ -181,7 +181,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 166: Wasm opcode 0x21 Script wasm://wasm/c723f83a byte offset 166: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at func (0:166): at func (0:166):
- scope (module): - scope (module):
...@@ -216,7 +216,7 @@ at (anonymous) (0:17): ...@@ -216,7 +216,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 168: Wasm opcode 0x42 Script wasm://wasm/c723f83a byte offset 168: Wasm opcode 0x42 (kExprI64Const)
Scope: Scope:
at func (0:168): at func (0:168):
- scope (module): - scope (module):
...@@ -250,7 +250,7 @@ at (anonymous) (0:17): ...@@ -250,7 +250,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 179: Wasm opcode 0x21 Script wasm://wasm/c723f83a byte offset 179: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at func (0:179): at func (0:179):
- scope (module): - scope (module):
...@@ -285,7 +285,7 @@ at (anonymous) (0:17): ...@@ -285,7 +285,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 181: Wasm opcode 0x41 Script wasm://wasm/c723f83a byte offset 181: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at func (0:181): at func (0:181):
- scope (module): - scope (module):
...@@ -319,7 +319,7 @@ at (anonymous) (0:17): ...@@ -319,7 +319,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 183: Wasm opcode 0xb8 Script wasm://wasm/c723f83a byte offset 183: Wasm opcode 0xb8 (kExprF64UConvertI32)
Scope: Scope:
at func (0:183): at func (0:183):
- scope (module): - scope (module):
...@@ -354,7 +354,7 @@ at (anonymous) (0:17): ...@@ -354,7 +354,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 184: Wasm opcode 0x41 Script wasm://wasm/c723f83a byte offset 184: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at func (0:184): at func (0:184):
- scope (module): - scope (module):
...@@ -389,7 +389,7 @@ at (anonymous) (0:17): ...@@ -389,7 +389,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 186: Wasm opcode 0xb8 Script wasm://wasm/c723f83a byte offset 186: Wasm opcode 0xb8 (kExprF64UConvertI32)
Scope: Scope:
at func (0:186): at func (0:186):
- scope (module): - scope (module):
...@@ -425,7 +425,7 @@ at (anonymous) (0:17): ...@@ -425,7 +425,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 187: Wasm opcode 0xa3 Script wasm://wasm/c723f83a byte offset 187: Wasm opcode 0xa3 (kExprF64Div)
Scope: Scope:
at func (0:187): at func (0:187):
- scope (module): - scope (module):
...@@ -461,7 +461,7 @@ at (anonymous) (0:17): ...@@ -461,7 +461,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 188: Wasm opcode 0x21 Script wasm://wasm/c723f83a byte offset 188: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at func (0:188): at func (0:188):
- scope (module): - scope (module):
...@@ -496,7 +496,7 @@ at (anonymous) (0:17): ...@@ -496,7 +496,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 190: Wasm opcode 0x41 Script wasm://wasm/c723f83a byte offset 190: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at func (0:190): at func (0:190):
- scope (module): - scope (module):
...@@ -530,7 +530,7 @@ at (anonymous) (0:17): ...@@ -530,7 +530,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 192: Wasm opcode 0xfd Script wasm://wasm/c723f83a byte offset 192: Wasm opcode 0xfd (kSimdPrefix)
Scope: Scope:
at func (0:192): at func (0:192):
- scope (module): - scope (module):
...@@ -565,7 +565,7 @@ at (anonymous) (0:17): ...@@ -565,7 +565,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 194: Wasm opcode 0x21 Script wasm://wasm/c723f83a byte offset 194: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at func (0:194): at func (0:194):
- scope (module): - scope (module):
...@@ -600,7 +600,7 @@ at (anonymous) (0:17): ...@@ -600,7 +600,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 196: Wasm opcode 0x41 Script wasm://wasm/c723f83a byte offset 196: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at func (0:196): at func (0:196):
- scope (module): - scope (module):
...@@ -634,7 +634,7 @@ at (anonymous) (0:17): ...@@ -634,7 +634,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 198: Wasm opcode 0xb3 Script wasm://wasm/c723f83a byte offset 198: Wasm opcode 0xb3 (kExprF32UConvertI32)
Scope: Scope:
at func (0:198): at func (0:198):
- scope (module): - scope (module):
...@@ -669,7 +669,7 @@ at (anonymous) (0:17): ...@@ -669,7 +669,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 199: Wasm opcode 0x21 Script wasm://wasm/c723f83a byte offset 199: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at func (0:199): at func (0:199):
- scope (module): - scope (module):
...@@ -704,7 +704,7 @@ at (anonymous) (0:17): ...@@ -704,7 +704,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 201: Wasm opcode 0x41 Script wasm://wasm/c723f83a byte offset 201: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at func (0:201): at func (0:201):
- scope (module): - scope (module):
...@@ -738,7 +738,7 @@ at (anonymous) (0:17): ...@@ -738,7 +738,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 203: Wasm opcode 0x24 Script wasm://wasm/c723f83a byte offset 203: Wasm opcode 0x24 (kExprGlobalSet)
Scope: Scope:
at func (0:203): at func (0:203):
- scope (module): - scope (module):
...@@ -773,7 +773,7 @@ at (anonymous) (0:17): ...@@ -773,7 +773,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 205: Wasm opcode 0x0b Script wasm://wasm/c723f83a byte offset 205: Wasm opcode 0x0b (kExprEnd)
Scope: Scope:
at func (0:205): at func (0:205):
- scope (module): - scope (module):
...@@ -807,7 +807,7 @@ at (anonymous) (0:17): ...@@ -807,7 +807,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/c723f83a byte offset 134: Wasm opcode 0x0b Script wasm://wasm/c723f83a byte offset 134: Wasm opcode 0x0b (kExprEnd)
Scope: Scope:
at call_func (0:134): at call_func (0:134):
- scope (module): - scope (module):
......
...@@ -9,7 +9,7 @@ Setting breakpoint on line 2 (first instruction) of third function ...@@ -9,7 +9,7 @@ Setting breakpoint on line 2 (first instruction) of third function
scriptId : <scriptId> scriptId : <scriptId>
} }
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 169: Wasm opcode 0x20 Script wasm://wasm/e33badc2 byte offset 169: Wasm opcode 0x20 (kExprLocalGet)
Scope: Scope:
at C (interpreted) (0:169): at C (interpreted) (0:169):
- scope (module): - scope (module):
...@@ -55,7 +55,7 @@ at (anonymous) (0:17): ...@@ -55,7 +55,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 171: Wasm opcode 0x24 Script wasm://wasm/e33badc2 byte offset 171: Wasm opcode 0x24 (kExprGlobalSet)
Scope: Scope:
at C (interpreted) (0:171): at C (interpreted) (0:171):
- scope (module): - scope (module):
...@@ -102,7 +102,7 @@ at (anonymous) (0:17): ...@@ -102,7 +102,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 173: Wasm opcode 0x41 Script wasm://wasm/e33badc2 byte offset 173: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at C (interpreted) (0:173): at C (interpreted) (0:173):
- scope (module): - scope (module):
...@@ -148,7 +148,7 @@ at (anonymous) (0:17): ...@@ -148,7 +148,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 175: Wasm opcode 0x21 Script wasm://wasm/e33badc2 byte offset 175: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at C (interpreted) (0:175): at C (interpreted) (0:175):
- scope (module): - scope (module):
...@@ -195,7 +195,7 @@ at (anonymous) (0:17): ...@@ -195,7 +195,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 177: Wasm opcode 0x0b Script wasm://wasm/e33badc2 byte offset 177: Wasm opcode 0x0b (kExprEnd)
Scope: Scope:
at C (interpreted) (0:177): at C (interpreted) (0:177):
- scope (module): - scope (module):
...@@ -241,7 +241,7 @@ at (anonymous) (0:17): ...@@ -241,7 +241,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 160: Wasm opcode 0x1a Script wasm://wasm/e33badc2 byte offset 160: Wasm opcode 0x1a (kExprDrop)
Scope: Scope:
at B (liftoff) (0:160): at B (liftoff) (0:160):
- scope (module): - scope (module):
...@@ -275,7 +275,7 @@ at (anonymous) (0:17): ...@@ -275,7 +275,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 161: Wasm opcode 0x1a Script wasm://wasm/e33badc2 byte offset 161: Wasm opcode 0x1a (kExprDrop)
Scope: Scope:
at B (liftoff) (0:161): at B (liftoff) (0:161):
- scope (module): - scope (module):
...@@ -308,7 +308,7 @@ at (anonymous) (0:17): ...@@ -308,7 +308,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 162: Wasm opcode 0x0b Script wasm://wasm/e33badc2 byte offset 162: Wasm opcode 0x0b (kExprEnd)
Scope: Scope:
at B (liftoff) (0:162): at B (liftoff) (0:162):
- scope (module): - scope (module):
...@@ -340,7 +340,7 @@ at (anonymous) (0:17): ...@@ -340,7 +340,7 @@ at (anonymous) (0:17):
-- skipped globals -- skipped globals
Paused: Paused:
Script wasm://wasm/e33badc2 byte offset 130: Wasm opcode 0x0b Script wasm://wasm/e33badc2 byte offset 130: Wasm opcode 0x0b (kExprEnd)
Scope: Scope:
at A (liftoff) (0:130): at A (liftoff) (0:130):
- scope (module): - scope (module):
......
...@@ -4,7 +4,7 @@ Waiting for wasm script (ignoring first non-wasm script). ...@@ -4,7 +4,7 @@ Waiting for wasm script (ignoring first non-wasm script).
Setting breakpoint at offset 38 on script wasm://wasm/0c10a5fe Setting breakpoint at offset 38 on script wasm://wasm/0c10a5fe
Calling main(4) Calling main(4)
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
Scope: Scope:
at wasm_A (0:38): at wasm_A (0:38):
- scope (module): - scope (module):
...@@ -29,7 +29,7 @@ Setting breakpoint at offset 49 on script v8://test/runWasm ...@@ -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 45 on script v8://test/runWasm
Setting breakpoint at offset 47 on script v8://test/runWasm Setting breakpoint at offset 47 on script v8://test/runWasm
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
Scope: Scope:
at wasm_A (0:39): at wasm_A (0:39):
- scope (module): - scope (module):
...@@ -45,7 +45,7 @@ at wasm_B (0:56): ...@@ -45,7 +45,7 @@ at wasm_B (0:56):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
Scope: Scope:
at wasm_B (0:45): at wasm_B (0:45):
- scope (module): - scope (module):
...@@ -56,7 +56,7 @@ at wasm_B (0:45): ...@@ -56,7 +56,7 @@ at wasm_B (0:45):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
Scope: Scope:
at wasm_B (0:47): at wasm_B (0:47):
- scope (module): - scope (module):
...@@ -68,7 +68,7 @@ at wasm_B (0:47): ...@@ -68,7 +68,7 @@ at wasm_B (0:47):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
Scope: Scope:
at wasm_B (0:49): at wasm_B (0:49):
- scope (module): - scope (module):
...@@ -79,7 +79,7 @@ at wasm_B (0:49): ...@@ -79,7 +79,7 @@ at wasm_B (0:49):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at wasm_B (0:51): at wasm_B (0:51):
- scope (module): - scope (module):
...@@ -91,7 +91,7 @@ at wasm_B (0:51): ...@@ -91,7 +91,7 @@ at wasm_B (0:51):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
Scope: Scope:
at wasm_B (0:53): at wasm_B (0:53):
- scope (module): - scope (module):
...@@ -104,7 +104,7 @@ at wasm_B (0:53): ...@@ -104,7 +104,7 @@ at wasm_B (0:53):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at wasm_B (0:54): at wasm_B (0:54):
- scope (module): - scope (module):
...@@ -116,7 +116,7 @@ at wasm_B (0:54): ...@@ -116,7 +116,7 @@ at wasm_B (0:54):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
Scope: Scope:
at wasm_A (0:38): at wasm_A (0:38):
- scope (module): - scope (module):
...@@ -132,7 +132,7 @@ at wasm_B (0:56): ...@@ -132,7 +132,7 @@ at wasm_B (0:56):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
Scope: Scope:
at wasm_A (0:39): at wasm_A (0:39):
- scope (module): - scope (module):
...@@ -148,7 +148,7 @@ at wasm_B (0:56): ...@@ -148,7 +148,7 @@ at wasm_B (0:56):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
Scope: Scope:
at wasm_B (0:45): at wasm_B (0:45):
- scope (module): - scope (module):
...@@ -159,7 +159,7 @@ at wasm_B (0:45): ...@@ -159,7 +159,7 @@ at wasm_B (0:45):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
Scope: Scope:
at wasm_B (0:47): at wasm_B (0:47):
- scope (module): - scope (module):
...@@ -171,7 +171,7 @@ at wasm_B (0:47): ...@@ -171,7 +171,7 @@ at wasm_B (0:47):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
Scope: Scope:
at wasm_B (0:49): at wasm_B (0:49):
- scope (module): - scope (module):
...@@ -182,7 +182,7 @@ at wasm_B (0:49): ...@@ -182,7 +182,7 @@ at wasm_B (0:49):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at wasm_B (0:51): at wasm_B (0:51):
- scope (module): - scope (module):
...@@ -194,7 +194,7 @@ at wasm_B (0:51): ...@@ -194,7 +194,7 @@ at wasm_B (0:51):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
Scope: Scope:
at wasm_B (0:53): at wasm_B (0:53):
- scope (module): - scope (module):
...@@ -207,7 +207,7 @@ at wasm_B (0:53): ...@@ -207,7 +207,7 @@ at wasm_B (0:53):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at wasm_B (0:54): at wasm_B (0:54):
- scope (module): - scope (module):
...@@ -219,7 +219,7 @@ at wasm_B (0:54): ...@@ -219,7 +219,7 @@ at wasm_B (0:54):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
Scope: Scope:
at wasm_A (0:38): at wasm_A (0:38):
- scope (module): - scope (module):
...@@ -235,7 +235,7 @@ at wasm_B (0:56): ...@@ -235,7 +235,7 @@ at wasm_B (0:56):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
Scope: Scope:
at wasm_A (0:39): at wasm_A (0:39):
- scope (module): - scope (module):
...@@ -251,7 +251,7 @@ at wasm_B (0:56): ...@@ -251,7 +251,7 @@ at wasm_B (0:56):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
Scope: Scope:
at wasm_B (0:45): at wasm_B (0:45):
- scope (module): - scope (module):
...@@ -262,7 +262,7 @@ at wasm_B (0:45): ...@@ -262,7 +262,7 @@ at wasm_B (0:45):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
Scope: Scope:
at wasm_B (0:47): at wasm_B (0:47):
- scope (module): - scope (module):
...@@ -274,7 +274,7 @@ at wasm_B (0:47): ...@@ -274,7 +274,7 @@ at wasm_B (0:47):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 Script wasm://wasm/0c10a5fe byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
Scope: Scope:
at wasm_B (0:49): at wasm_B (0:49):
- scope (module): - scope (module):
...@@ -285,7 +285,7 @@ at wasm_B (0:49): ...@@ -285,7 +285,7 @@ at wasm_B (0:49):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 Script wasm://wasm/0c10a5fe byte offset 51: Wasm opcode 0x41 (kExprI32Const)
Scope: Scope:
at wasm_B (0:51): at wasm_B (0:51):
- scope (module): - scope (module):
...@@ -297,7 +297,7 @@ at wasm_B (0:51): ...@@ -297,7 +297,7 @@ at wasm_B (0:51):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b Script wasm://wasm/0c10a5fe byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
Scope: Scope:
at wasm_B (0:53): at wasm_B (0:53):
- scope (module): - scope (module):
...@@ -310,7 +310,7 @@ at wasm_B (0:53): ...@@ -310,7 +310,7 @@ at wasm_B (0:53):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 Script wasm://wasm/0c10a5fe byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
Scope: Scope:
at wasm_B (0:54): at wasm_B (0:54):
- scope (module): - scope (module):
...@@ -322,7 +322,7 @@ at wasm_B (0:54): ...@@ -322,7 +322,7 @@ at wasm_B (0:54):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 Script wasm://wasm/0c10a5fe byte offset 38: Wasm opcode 0x01 (kExprNop)
Scope: Scope:
at wasm_A (0:38): at wasm_A (0:38):
- scope (module): - scope (module):
...@@ -338,7 +338,7 @@ at wasm_B (0:56): ...@@ -338,7 +338,7 @@ at wasm_B (0:56):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 Script wasm://wasm/0c10a5fe byte offset 39: Wasm opcode 0x01 (kExprNop)
Scope: Scope:
at wasm_A (0:39): at wasm_A (0:39):
- scope (module): - scope (module):
...@@ -354,7 +354,7 @@ at wasm_B (0:56): ...@@ -354,7 +354,7 @@ at wasm_B (0:56):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 Script wasm://wasm/0c10a5fe byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
Scope: Scope:
at wasm_B (0:45): at wasm_B (0:45):
- scope (module): - scope (module):
...@@ -365,7 +365,7 @@ at wasm_B (0:45): ...@@ -365,7 +365,7 @@ at wasm_B (0:45):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 Script wasm://wasm/0c10a5fe byte offset 47: Wasm opcode 0x04 (kExprIf)
Scope: Scope:
at wasm_B (0:47): at wasm_B (0:47):
- scope (module): - scope (module):
...@@ -377,7 +377,7 @@ at wasm_B (0:47): ...@@ -377,7 +377,7 @@ at wasm_B (0:47):
at (anonymous) (0:17): at (anonymous) (0:17):
-- skipped -- skipped
Paused: Paused:
Script wasm://wasm/0c10a5fe byte offset 61: Wasm opcode 0x0b Script wasm://wasm/0c10a5fe byte offset 61: Wasm opcode 0x0b (kExprEnd)
Scope: Scope:
at wasm_B (0:61): at wasm_B (0:61):
- scope (module): - scope (module):
......
...@@ -3,7 +3,7 @@ Instantiating. ...@@ -3,7 +3,7 @@ Instantiating.
Calling div function. Calling div function.
Paused at: Paused at:
--- 0 --- --- 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): scope at div (0:46):
a: 1 a: 1
b: 0 b: 0
...@@ -33,7 +33,7 @@ Paused at: ...@@ -33,7 +33,7 @@ Paused at:
-> resume -> resume
Paused at: Paused at:
--- 0 --- --- 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): scope at div (0:46):
a: -2147483648 a: -2147483648
b: -1 b: -1
......
...@@ -3,10 +3,10 @@ Setting up global instance variable. ...@@ -3,10 +3,10 @@ Setting up global instance variable.
Got wasm script: wasm://wasm/4658c40e Got wasm script: wasm://wasm/4658c40e
Setting breakpoint on offset 44 Setting breakpoint on offset 44
Running main function. 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 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 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 Debugger.resume called
exports.main returned. exports.main returned.
...@@ -7,51 +7,51 @@ Setting breakpoint on offset 72 (should be propagated to 73, the offset of the c ...@@ -7,51 +7,51 @@ Setting breakpoint on offset 72 (should be propagated to 73, the offset of the c
lineNumber : 0 lineNumber : 0
scriptId : <scriptId> 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 Debugger.resume called
exports.main returned! exports.main returned!
Test stepping over a recursive call Test stepping over a recursive call
...@@ -61,9 +61,9 @@ Setting breakpoint on the recursive call instruction @+93, url wasm://wasm/42af3 ...@@ -61,9 +61,9 @@ Setting breakpoint on the recursive call instruction @+93, url wasm://wasm/42af3
lineNumber : 0 lineNumber : 0
scriptId : <scriptId> 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 Removing breakpoint
Debugger.stepOver called 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 Debugger.resume called
Finished! Finished!
...@@ -22,10 +22,10 @@ paused ...@@ -22,10 +22,10 @@ paused
Debugger.stepInto Debugger.stepInto
paused paused
Script wasm://wasm/7d022e0e byte offset 35: Wasm opcode 0x20 Script wasm://wasm/7d022e0e byte offset 35: Wasm opcode 0x20 (kExprLocalGet)
Debugger.resume Debugger.resume
paused paused
Script wasm://wasm/7d022e0e byte offset 37: Wasm opcode 0x41 Script wasm://wasm/7d022e0e byte offset 37: Wasm opcode 0x41 (kExprI32Const)
Debugger.resume Debugger.resume
exports.main returned! exports.main returned!
Finished! Finished!
...@@ -17,7 +17,7 @@ function test() { ...@@ -17,7 +17,7 @@ function test() {
Debugger.resume Debugger.resume
paused paused
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 (kExprNop)
Debugger.stepOut Debugger.stepOut
paused paused
instance.exports.main(); instance.exports.main();
...@@ -36,10 +36,10 @@ function test() { ...@@ -36,10 +36,10 @@ function test() {
Debugger.resume Debugger.resume
paused paused
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 (kExprNop)
Debugger.stepOver Debugger.stepOver
paused paused
Script wasm://wasm/242f4a16 byte offset 34: Wasm opcode 0x0b Script wasm://wasm/242f4a16 byte offset 34: Wasm opcode 0x0b (kExprEnd)
Debugger.resume Debugger.resume
exports.main returned! exports.main returned!
Finished run 2! Finished run 2!
...@@ -52,10 +52,10 @@ function test() { ...@@ -52,10 +52,10 @@ function test() {
Debugger.resume Debugger.resume
paused paused
Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 Script wasm://wasm/242f4a16 byte offset 33: Wasm opcode 0x01 (kExprNop)
Debugger.stepInto Debugger.stepInto
paused paused
Script wasm://wasm/242f4a16 byte offset 34: Wasm opcode 0x0b Script wasm://wasm/242f4a16 byte offset 34: Wasm opcode 0x0b (kExprEnd)
Debugger.resume Debugger.resume
exports.main returned! exports.main returned!
Finished run 3! Finished run 3!
......
...@@ -7,83 +7,83 @@ Got wasm script: wasm://wasm/befe41aa ...@@ -7,83 +7,83 @@ Got wasm script: wasm://wasm/befe41aa
scriptId : <scriptId> scriptId : <scriptId>
} }
Test with valid skip lists 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 Test: Stepping over without skip list
Testing stepOver with skipList: [] Testing stepOver with skipList: []
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 (kExprCallFunction)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping over with skip list 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}}] 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 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping over start location is inclusive Test: Stepping over start location is inclusive
Testing stepOver with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":48},"end":{"lineNumber":0,"columnNumber":61}}] 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 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping over end location is exclusive Test: Stepping over end location is exclusive
Testing stepOver with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":49},"end":{"lineNumber":0,"columnNumber":62}}] 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 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping into without skip list Test: Stepping into without skip list
Testing stepInto with skipList: [] Testing stepInto with skipList: []
Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 (kExprCallFunction)
Script wasm://wasm/befe41aa byte offset 39: Wasm opcode 0x01 Script wasm://wasm/befe41aa byte offset 39: Wasm opcode 0x01 (kExprNop)
Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x01 Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x01 (kExprNop)
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b (kExprEnd)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping into with skip list, while call itself is skipped 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}}] 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 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b (kExprEnd)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping into start location is inclusive Test: Stepping into start location is inclusive
Testing stepInto with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":39},"end":{"lineNumber":0,"columnNumber":40}}] 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 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 (kExprCallFunction)
Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x01 Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x01 (kExprNop)
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b (kExprEnd)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test: Stepping into end location is exclusive Test: Stepping into end location is exclusive
Testing stepInto with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":38},"end":{"lineNumber":0,"columnNumber":41}}] 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 48: Wasm opcode 0x04 (kExprIf)
Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20 (kExprLocalGet)
Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b (kExprI32Sub)
Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21 (kExprLocalSet)
Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41 (kExprI32Const)
Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10 (kExprCallFunction)
Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0x0b (kExprEnd)
Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0x0c (kExprBr)
Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20 (kExprLocalGet)
Test with invalid skip lists 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 Test: start position has invalid column number
Testing stepOver with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":-1},"end":{"lineNumber":0,"columnNumber":62}}] Testing stepOver with skipList: [{"scriptId":"4","start":{"lineNumber":0,"columnNumber":-1},"end":{"lineNumber":0,"columnNumber":62}}]
Position missing 'column' or 'column' < 0. Position missing 'column' or 'column' < 0.
......
...@@ -9,7 +9,7 @@ Setting breakpoint on offset 54 (on the setlocal before the call), url wasm://wa ...@@ -9,7 +9,7 @@ Setting breakpoint on offset 54 (on the setlocal before the call), url wasm://wa
lineNumber : 0 lineNumber : 0
scriptId : <scriptId> 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): at wasm_B (0:54):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -21,7 +21,7 @@ at (anonymous) (0:17): ...@@ -21,7 +21,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:56):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -33,7 +33,7 @@ at (anonymous) (0:17): ...@@ -33,7 +33,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_A (0:38):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -52,7 +52,7 @@ at (anonymous) (0:17): ...@@ -52,7 +52,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOver called 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): at wasm_A (0:39):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -71,7 +71,7 @@ at (anonymous) (0:17): ...@@ -71,7 +71,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOut called 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): at wasm_B (0:58):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -83,7 +83,7 @@ at (anonymous) (0:17): ...@@ -83,7 +83,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOut called 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): at wasm_B (0:54):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -95,7 +95,7 @@ at (anonymous) (0:17): ...@@ -95,7 +95,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOver called 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): at wasm_B (0:56):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -107,7 +107,7 @@ at (anonymous) (0:17): ...@@ -107,7 +107,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOver called 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): at wasm_B (0:58):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -119,7 +119,7 @@ at (anonymous) (0:17): ...@@ -119,7 +119,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.resume called 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): at wasm_B (0:54):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -131,7 +131,7 @@ at (anonymous) (0:17): ...@@ -131,7 +131,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:56):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -143,7 +143,7 @@ at (anonymous) (0:17): ...@@ -143,7 +143,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_A (0:38):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -162,7 +162,7 @@ at (anonymous) (0:17): ...@@ -162,7 +162,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOut called 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): at wasm_B (0:58):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -174,7 +174,7 @@ at (anonymous) (0:17): ...@@ -174,7 +174,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:45):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -186,7 +186,7 @@ at (anonymous) (0:17): ...@@ -186,7 +186,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:47):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -198,7 +198,7 @@ at (anonymous) (0:17): ...@@ -198,7 +198,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:49):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -210,7 +210,7 @@ at (anonymous) (0:17): ...@@ -210,7 +210,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:51):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -222,7 +222,7 @@ at (anonymous) (0:17): ...@@ -222,7 +222,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:53):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -234,7 +234,7 @@ at (anonymous) (0:17): ...@@ -234,7 +234,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:54):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -246,7 +246,7 @@ at (anonymous) (0:17): ...@@ -246,7 +246,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:56):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -258,7 +258,7 @@ at (anonymous) (0:17): ...@@ -258,7 +258,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_A (0:38):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -277,7 +277,7 @@ at (anonymous) (0:17): ...@@ -277,7 +277,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_A (0:39):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -296,7 +296,7 @@ at (anonymous) (0:17): ...@@ -296,7 +296,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_A (0:40):
- scope (module): - scope (module):
-- skipped -- skipped
...@@ -315,7 +315,7 @@ at (anonymous) (0:17): ...@@ -315,7 +315,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called 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): at wasm_B (0:58):
- scope (module): - scope (module):
-- skipped -- skipped
......
...@@ -299,9 +299,14 @@ InspectorTest.Session = class { ...@@ -299,9 +299,14 @@ InspectorTest.Session = class {
if (location.lineNumber != 0) { if (location.lineNumber != 0) {
InspectorTest.log('Unexpected wasm line number: ' + location.lineNumber); InspectorTest.log('Unexpected wasm line number: ' + location.lineNumber);
} }
let wasm_opcode = script.bytecode[location.columnNumber].toString(16); let wasm_opcode = script.bytecode[location.columnNumber];
if (wasm_opcode.length % 2) wasm_opcode = '0' + wasm_opcode; let opcode_str = wasm_opcode.toString(16);
InspectorTest.log(`Script ${script.url} byte offset ${location.columnNumber}: Wasm opcode 0x${wasm_opcode}`); 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 { } else {
var lines = script.scriptSource.split('\n'); var lines = script.scriptSource.split('\n');
var line = lines[location.lineNumber]; var line = lines[location.lineNumber];
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
utils.load('test/mjsunit/wasm/wasm-module-builder.js'); utils.load('test/mjsunit/wasm/wasm-module-builder.js');
WasmInspectorTest = {} WasmInspectorTest = {}
InspectorTest.getWasmOpcodeName = getOpcodeName;
WasmInspectorTest.evalWithUrl = (code, url) => WasmInspectorTest.evalWithUrl = (code, url) =>
Protocol.Runtime Protocol.Runtime
......
...@@ -197,204 +197,226 @@ function makeSig_r_xx(r, x) { ...@@ -197,204 +197,226 @@ function makeSig_r_xx(r, x) {
} }
// Opcodes // Opcodes
let kExprUnreachable = 0x00; const kWasmOpcodes = {
let kExprNop = 0x01; 'Unreachable': 0x00,
let kExprBlock = 0x02; 'Nop': 0x01,
let kExprLoop = 0x03; 'Block': 0x02,
let kExprIf = 0x04; 'Loop': 0x03,
let kExprElse = 0x05; 'If': 0x04,
let kExprTry = 0x06; 'Else': 0x05,
let kExprCatch = 0x07; 'Try': 0x06,
let kExprThrow = 0x08; 'Catch': 0x07,
let kExprRethrow = 0x09; 'Throw': 0x08,
let kExprBrOnExn = 0x0a; 'Rethrow': 0x09,
let kExprEnd = 0x0b; 'BrOnExn': 0x0a,
let kExprBr = 0x0c; 'End': 0x0b,
let kExprBrIf = 0x0d; 'Br': 0x0c,
let kExprBrTable = 0x0e; 'BrIf': 0x0d,
let kExprReturn = 0x0f; 'BrTable': 0x0e,
let kExprCallFunction = 0x10; 'Return': 0x0f,
let kExprCallIndirect = 0x11; 'CallFunction': 0x10,
let kExprReturnCall = 0x12; 'CallIndirect': 0x11,
let kExprReturnCallIndirect = 0x13; 'ReturnCall': 0x12,
let kExprCallRef = 0x14; 'ReturnCallIndirect': 0x13,
let kExprReturnCallRef = 0x15; 'CallRef': 0x14,
let kExprDrop = 0x1a; 'ReturnCallRef': 0x15,
let kExprSelect = 0x1b; 'Drop': 0x1a,
let kExprSelectWithType = 0x1c; 'Select': 0x1b,
let kExprLocalGet = 0x20; 'SelectWithType': 0x1c,
let kExprLocalSet = 0x21; 'LocalGet': 0x20,
let kExprLocalTee = 0x22; 'LocalSet': 0x21,
let kExprGlobalGet = 0x23; 'LocalTee': 0x22,
let kExprGlobalSet = 0x24; 'GlobalGet': 0x23,
let kExprTableGet = 0x25; 'GlobalSet': 0x24,
let kExprTableSet = 0x26; 'TableGet': 0x25,
let kExprI32LoadMem = 0x28; 'TableSet': 0x26,
let kExprI64LoadMem = 0x29; 'I32LoadMem': 0x28,
let kExprF32LoadMem = 0x2a; 'I64LoadMem': 0x29,
let kExprF64LoadMem = 0x2b; 'F32LoadMem': 0x2a,
let kExprI32LoadMem8S = 0x2c; 'F64LoadMem': 0x2b,
let kExprI32LoadMem8U = 0x2d; 'I32LoadMem8S': 0x2c,
let kExprI32LoadMem16S = 0x2e; 'I32LoadMem8U': 0x2d,
let kExprI32LoadMem16U = 0x2f; 'I32LoadMem16S': 0x2e,
let kExprI64LoadMem8S = 0x30; 'I32LoadMem16U': 0x2f,
let kExprI64LoadMem8U = 0x31; 'I64LoadMem8S': 0x30,
let kExprI64LoadMem16S = 0x32; 'I64LoadMem8U': 0x31,
let kExprI64LoadMem16U = 0x33; 'I64LoadMem16S': 0x32,
let kExprI64LoadMem32S = 0x34; 'I64LoadMem16U': 0x33,
let kExprI64LoadMem32U = 0x35; 'I64LoadMem32S': 0x34,
let kExprI32StoreMem = 0x36; 'I64LoadMem32U': 0x35,
let kExprI64StoreMem = 0x37; 'I32StoreMem': 0x36,
let kExprF32StoreMem = 0x38; 'I64StoreMem': 0x37,
let kExprF64StoreMem = 0x39; 'F32StoreMem': 0x38,
let kExprI32StoreMem8 = 0x3a; 'F64StoreMem': 0x39,
let kExprI32StoreMem16 = 0x3b; 'I32StoreMem8': 0x3a,
let kExprI64StoreMem8 = 0x3c; 'I32StoreMem16': 0x3b,
let kExprI64StoreMem16 = 0x3d; 'I64StoreMem8': 0x3c,
let kExprI64StoreMem32 = 0x3e; 'I64StoreMem16': 0x3d,
let kExprMemorySize = 0x3f; 'I64StoreMem32': 0x3e,
let kExprMemoryGrow = 0x40; 'MemorySize': 0x3f,
let kExprI32Const = 0x41; 'MemoryGrow': 0x40,
let kExprI64Const = 0x42; 'I32Const': 0x41,
let kExprF32Const = 0x43; 'I64Const': 0x42,
let kExprF64Const = 0x44; 'F32Const': 0x43,
let kExprI32Eqz = 0x45; 'F64Const': 0x44,
let kExprI32Eq = 0x46; 'I32Eqz': 0x45,
let kExprI32Ne = 0x47; 'I32Eq': 0x46,
let kExprI32LtS = 0x48; 'I32Ne': 0x47,
let kExprI32LtU = 0x49; 'I32LtS': 0x48,
let kExprI32GtS = 0x4a; 'I32LtU': 0x49,
let kExprI32GtU = 0x4b; 'I32GtS': 0x4a,
let kExprI32LeS = 0x4c; 'I32GtU': 0x4b,
let kExprI32LeU = 0x4d; 'I32LeS': 0x4c,
let kExprI32GeS = 0x4e; 'I32LeU': 0x4d,
let kExprI32GeU = 0x4f; 'I32GeS': 0x4e,
let kExprI64Eqz = 0x50; 'I32GeU': 0x4f,
let kExprI64Eq = 0x51; 'I64Eqz': 0x50,
let kExprI64Ne = 0x52; 'I64Eq': 0x51,
let kExprI64LtS = 0x53; 'I64Ne': 0x52,
let kExprI64LtU = 0x54; 'I64LtS': 0x53,
let kExprI64GtS = 0x55; 'I64LtU': 0x54,
let kExprI64GtU = 0x56; 'I64GtS': 0x55,
let kExprI64LeS = 0x57; 'I64GtU': 0x56,
let kExprI64LeU = 0x58; 'I64LeS': 0x57,
let kExprI64GeS = 0x59; 'I64LeU': 0x58,
let kExprI64GeU = 0x5a; 'I64GeS': 0x59,
let kExprF32Eq = 0x5b; 'I64GeU': 0x5a,
let kExprF32Ne = 0x5c; 'F32Eq': 0x5b,
let kExprF32Lt = 0x5d; 'F32Ne': 0x5c,
let kExprF32Gt = 0x5e; 'F32Lt': 0x5d,
let kExprF32Le = 0x5f; 'F32Gt': 0x5e,
let kExprF32Ge = 0x60; 'F32Le': 0x5f,
let kExprF64Eq = 0x61; 'F32Ge': 0x60,
let kExprF64Ne = 0x62; 'F64Eq': 0x61,
let kExprF64Lt = 0x63; 'F64Ne': 0x62,
let kExprF64Gt = 0x64; 'F64Lt': 0x63,
let kExprF64Le = 0x65; 'F64Gt': 0x64,
let kExprF64Ge = 0x66; 'F64Le': 0x65,
let kExprI32Clz = 0x67; 'F64Ge': 0x66,
let kExprI32Ctz = 0x68; 'I32Clz': 0x67,
let kExprI32Popcnt = 0x69; 'I32Ctz': 0x68,
let kExprI32Add = 0x6a; 'I32Popcnt': 0x69,
let kExprI32Sub = 0x6b; 'I32Add': 0x6a,
let kExprI32Mul = 0x6c; 'I32Sub': 0x6b,
let kExprI32DivS = 0x6d; 'I32Mul': 0x6c,
let kExprI32DivU = 0x6e; 'I32DivS': 0x6d,
let kExprI32RemS = 0x6f; 'I32DivU': 0x6e,
let kExprI32RemU = 0x70; 'I32RemS': 0x6f,
let kExprI32And = 0x71; 'I32RemU': 0x70,
let kExprI32Ior = 0x72; 'I32And': 0x71,
let kExprI32Xor = 0x73; 'I32Ior': 0x72,
let kExprI32Shl = 0x74; 'I32Xor': 0x73,
let kExprI32ShrS = 0x75; 'I32Shl': 0x74,
let kExprI32ShrU = 0x76; 'I32ShrS': 0x75,
let kExprI32Rol = 0x77; 'I32ShrU': 0x76,
let kExprI32Ror = 0x78; 'I32Rol': 0x77,
let kExprI64Clz = 0x79; 'I32Ror': 0x78,
let kExprI64Ctz = 0x7a; 'I64Clz': 0x79,
let kExprI64Popcnt = 0x7b; 'I64Ctz': 0x7a,
let kExprI64Add = 0x7c; 'I64Popcnt': 0x7b,
let kExprI64Sub = 0x7d; 'I64Add': 0x7c,
let kExprI64Mul = 0x7e; 'I64Sub': 0x7d,
let kExprI64DivS = 0x7f; 'I64Mul': 0x7e,
let kExprI64DivU = 0x80; 'I64DivS': 0x7f,
let kExprI64RemS = 0x81; 'I64DivU': 0x80,
let kExprI64RemU = 0x82; 'I64RemS': 0x81,
let kExprI64And = 0x83; 'I64RemU': 0x82,
let kExprI64Ior = 0x84; 'I64And': 0x83,
let kExprI64Xor = 0x85; 'I64Ior': 0x84,
let kExprI64Shl = 0x86; 'I64Xor': 0x85,
let kExprI64ShrS = 0x87; 'I64Shl': 0x86,
let kExprI64ShrU = 0x88; 'I64ShrS': 0x87,
let kExprI64Rol = 0x89; 'I64ShrU': 0x88,
let kExprI64Ror = 0x8a; 'I64Rol': 0x89,
let kExprF32Abs = 0x8b; 'I64Ror': 0x8a,
let kExprF32Neg = 0x8c; 'F32Abs': 0x8b,
let kExprF32Ceil = 0x8d; 'F32Neg': 0x8c,
let kExprF32Floor = 0x8e; 'F32Ceil': 0x8d,
let kExprF32Trunc = 0x8f; 'F32Floor': 0x8e,
let kExprF32NearestInt = 0x90; 'F32Trunc': 0x8f,
let kExprF32Sqrt = 0x91; 'F32NearestInt': 0x90,
let kExprF32Add = 0x92; 'F32Sqrt': 0x91,
let kExprF32Sub = 0x93; 'F32Add': 0x92,
let kExprF32Mul = 0x94; 'F32Sub': 0x93,
let kExprF32Div = 0x95; 'F32Mul': 0x94,
let kExprF32Min = 0x96; 'F32Div': 0x95,
let kExprF32Max = 0x97; 'F32Min': 0x96,
let kExprF32CopySign = 0x98; 'F32Max': 0x97,
let kExprF64Abs = 0x99; 'F32CopySign': 0x98,
let kExprF64Neg = 0x9a; 'F64Abs': 0x99,
let kExprF64Ceil = 0x9b; 'F64Neg': 0x9a,
let kExprF64Floor = 0x9c; 'F64Ceil': 0x9b,
let kExprF64Trunc = 0x9d; 'F64Floor': 0x9c,
let kExprF64NearestInt = 0x9e; 'F64Trunc': 0x9d,
let kExprF64Sqrt = 0x9f; 'F64NearestInt': 0x9e,
let kExprF64Add = 0xa0; 'F64Sqrt': 0x9f,
let kExprF64Sub = 0xa1; 'F64Add': 0xa0,
let kExprF64Mul = 0xa2; 'F64Sub': 0xa1,
let kExprF64Div = 0xa3; 'F64Mul': 0xa2,
let kExprF64Min = 0xa4; 'F64Div': 0xa3,
let kExprF64Max = 0xa5; 'F64Min': 0xa4,
let kExprF64CopySign = 0xa6; 'F64Max': 0xa5,
let kExprI32ConvertI64 = 0xa7; 'F64CopySign': 0xa6,
let kExprI32SConvertF32 = 0xa8; 'I32ConvertI64': 0xa7,
let kExprI32UConvertF32 = 0xa9; 'I32SConvertF32': 0xa8,
let kExprI32SConvertF64 = 0xaa; 'I32UConvertF32': 0xa9,
let kExprI32UConvertF64 = 0xab; 'I32SConvertF64': 0xaa,
let kExprI64SConvertI32 = 0xac; 'I32UConvertF64': 0xab,
let kExprI64UConvertI32 = 0xad; 'I64SConvertI32': 0xac,
let kExprI64SConvertF32 = 0xae; 'I64UConvertI32': 0xad,
let kExprI64UConvertF32 = 0xaf; 'I64SConvertF32': 0xae,
let kExprI64SConvertF64 = 0xb0; 'I64UConvertF32': 0xaf,
let kExprI64UConvertF64 = 0xb1; 'I64SConvertF64': 0xb0,
let kExprF32SConvertI32 = 0xb2; 'I64UConvertF64': 0xb1,
let kExprF32UConvertI32 = 0xb3; 'F32SConvertI32': 0xb2,
let kExprF32SConvertI64 = 0xb4; 'F32UConvertI32': 0xb3,
let kExprF32UConvertI64 = 0xb5; 'F32SConvertI64': 0xb4,
let kExprF32ConvertF64 = 0xb6; 'F32UConvertI64': 0xb5,
let kExprF64SConvertI32 = 0xb7; 'F32ConvertF64': 0xb6,
let kExprF64UConvertI32 = 0xb8; 'F64SConvertI32': 0xb7,
let kExprF64SConvertI64 = 0xb9; 'F64UConvertI32': 0xb8,
let kExprF64UConvertI64 = 0xba; 'F64SConvertI64': 0xb9,
let kExprF64ConvertF32 = 0xbb; 'F64UConvertI64': 0xba,
let kExprI32ReinterpretF32 = 0xbc; 'F64ConvertF32': 0xbb,
let kExprI64ReinterpretF64 = 0xbd; 'I32ReinterpretF32': 0xbc,
let kExprF32ReinterpretI32 = 0xbe; 'I64ReinterpretF64': 0xbd,
let kExprF64ReinterpretI64 = 0xbf; 'F32ReinterpretI32': 0xbe,
let kExprI32SExtendI8 = 0xc0; 'F64ReinterpretI64': 0xbf,
let kExprI32SExtendI16 = 0xc1; 'I32SExtendI8': 0xc0,
let kExprI64SExtendI8 = 0xc2; 'I32SExtendI16': 0xc1,
let kExprI64SExtendI16 = 0xc3; 'I64SExtendI8': 0xc2,
let kExprI64SExtendI32 = 0xc4; 'I64SExtendI16': 0xc3,
let kExprRefNull = 0xd0; 'I64SExtendI32': 0xc4,
let kExprRefIsNull = 0xd1; 'RefNull': 0xd0,
let kExprRefFunc = 0xd2; 'RefIsNull': 0xd1,
'RefFunc': 0xd2
};
function defineWasmOpcode(name, value) {
if (globalThis.kWasmOpcodeNames === undefined) {
globalThis.kWasmOpcodeNames = {};
}
Object.defineProperty(globalThis, name, {value: value});
if (globalThis.kWasmOpcodeNames[value] !== undefined) {
throw new Error(`Duplicate wasm opcode: ${value}. Previous name: ${
globalThis.kWasmOpcodeNames[value]}, new name: ${name}`);
}
globalThis.kWasmOpcodeNames[value] = name;
}
for (let name in kWasmOpcodes) {
defineWasmOpcode(`kExpr${name}`, kWasmOpcodes[name]);
}
// Prefix opcodes // Prefix opcodes
let kGCPrefix = 0xfb; const kPrefixOpcodes = {
let kNumericPrefix = 0xfc; 'GC': 0xfb,
let kSimdPrefix = 0xfd; 'Numeric': 0xfc,
let kAtomicPrefix = 0xfe; 'Simd': 0xfd,
'Atomic': 0xfe
};
for (let prefix in kPrefixOpcodes) {
defineWasmOpcode(`k${prefix}Prefix`, kPrefixOpcodes[prefix]);
}
// GC opcodes // GC opcodes
let kExprRttCanon = 0x30; let kExprRttCanon = 0x30;
...@@ -1672,3 +1694,7 @@ function wasmS128Const(f) { ...@@ -1672,3 +1694,7 @@ function wasmS128Const(f) {
// Write in little-endian order at offset 0. // Write in little-endian order at offset 0.
return [kSimdPrefix, kExprS128Const, ...f]; return [kSimdPrefix, kExprS128Const, ...f];
} }
function getOpcodeName(opcode) {
return globalThis.kWasmOpcodeNames?.[opcode] ?? 'unknown';
}
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