85fdbd910f
This change unifies the locals, stack, and globals objects exposed for WebAssembly frames via the Scope view and via DebugEvaluate to use the same underlying objects (implemented via interceptors). This also means that for locals and globals we now consistently expose names prefixed by a dollar symbol everywhere. Drive-by-fix: Move the debug::ScopeIterator implementation for WasmFrame into debug-wasm-support.cc, so WebAssembly scope details are all found in one place instead of scattered around the code. Drive-by-cleanup: Rename GetJSDebugProxy to GetWasmDebugProxy for consistency. GetJSDebugProxy is a bit misleading, since the debug proxy is not about JavaScript, but just exposed to JavaScript. Doc: http://bit.ly/devtools-wasm-entities Bug: chromium:1159307, chromium:1127914, chromium:1162229 Change-Id: If932bd06bbce72542823f63dac1bd976ab33937a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615348 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#72009}
333 lines
7.4 KiB
Plaintext
333 lines
7.4 KiB
Plaintext
Tests stepping through wasm scripts with source maps
|
|
|
|
Running test: test
|
|
Got wasm script: wasm://wasm/9b4bf87e
|
|
Script sourceMapURL: abc
|
|
Requesting source for wasm://wasm/9b4bf87e...
|
|
Source retrieved without error: true
|
|
Setting breakpoint on offset 54 (on the setlocal before the call), url wasm://wasm/9b4bf87e
|
|
{
|
|
columnNumber : 54
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
}
|
|
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
|
|
at wasm_B (0:54):
|
|
- scope (wasm-expression-stack):
|
|
{"0":3}
|
|
- scope (local):
|
|
{"$var0":4}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10 (kExprCallFunction)
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":3}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01 (kExprNop)
|
|
at wasm_A (0:38):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{}
|
|
- scope (module):
|
|
-- skipped
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":3}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepOver called
|
|
Script wasm://wasm/9b4bf87e byte offset 39: Wasm opcode 0x01 (kExprNop)
|
|
at wasm_A (0:39):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{}
|
|
- scope (module):
|
|
-- skipped
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":3}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepOut called
|
|
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c (kExprBr)
|
|
at wasm_B (0:58):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":3}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepOut called
|
|
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
|
|
at wasm_B (0:54):
|
|
- scope (wasm-expression-stack):
|
|
{"0":2}
|
|
- scope (local):
|
|
{"$var0":3}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepOver called
|
|
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10 (kExprCallFunction)
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":2}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepOver called
|
|
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c (kExprBr)
|
|
at wasm_B (0:58):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":2}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.resume called
|
|
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
|
|
at wasm_B (0:54):
|
|
- scope (wasm-expression-stack):
|
|
{"0":1}
|
|
- scope (local):
|
|
{"$var0":2}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10 (kExprCallFunction)
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01 (kExprNop)
|
|
at wasm_A (0:38):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{}
|
|
- scope (module):
|
|
-- skipped
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepOut called
|
|
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c (kExprBr)
|
|
at wasm_B (0:58):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 45: Wasm opcode 0x20 (kExprLocalGet)
|
|
at wasm_B (0:45):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 47: Wasm opcode 0x04 (kExprIf)
|
|
at wasm_B (0:47):
|
|
- scope (wasm-expression-stack):
|
|
{"0":1}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 49: Wasm opcode 0x20 (kExprLocalGet)
|
|
at wasm_B (0:49):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 51: Wasm opcode 0x41 (kExprI32Const)
|
|
at wasm_B (0:51):
|
|
- scope (wasm-expression-stack):
|
|
{"0":1}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 53: Wasm opcode 0x6b (kExprI32Sub)
|
|
at wasm_B (0:53):
|
|
- scope (wasm-expression-stack):
|
|
{"0":1,"1":1}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21 (kExprLocalSet)
|
|
at wasm_B (0:54):
|
|
- scope (wasm-expression-stack):
|
|
{"0":0}
|
|
- scope (local):
|
|
{"$var0":1}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10 (kExprCallFunction)
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":0}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x01 (kExprNop)
|
|
at wasm_A (0:38):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{}
|
|
- scope (module):
|
|
-- skipped
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":0}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 39: Wasm opcode 0x01 (kExprNop)
|
|
at wasm_A (0:39):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{}
|
|
- scope (module):
|
|
-- skipped
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":0}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 40: Wasm opcode 0x0b (kExprEnd)
|
|
at wasm_A (0:40):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{}
|
|
- scope (module):
|
|
-- skipped
|
|
at wasm_B (0:56):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":0}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0x0c (kExprBr)
|
|
at wasm_B (0:58):
|
|
- scope (wasm-expression-stack):
|
|
{}
|
|
- scope (local):
|
|
{"$var0":0}
|
|
- scope (module):
|
|
-- skipped
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Debugger.resume called
|
|
exports.main returned!
|