1bd5755bba
This moves the logic for the debug name heuristic, which derives names for imported and exported entities from the relevant tables, into wasm-debug.{cc,h} and stores these maps on the DebugInfoImpl rather than on the WasmModule. Drive-by-fix: Also use the import table based heuristic for function names, just like we use it for everything else. Bug: chromium:1164305 Change-Id: I8a21e0880c680079f63e6607b5b62c788049b9e1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625870 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#72061}
138 lines
3.0 KiB
Plaintext
138 lines
3.0 KiB
Plaintext
Test wasm debug evaluate
|
|
|
|
Running test: testInstanceAndModule
|
|
Compile module.
|
|
Set breakpoint in main.
|
|
Instantiate module.
|
|
Call main.
|
|
Debugger paused in main.
|
|
> instance = Instance
|
|
> module = Module
|
|
|
|
Running test: testGlobals
|
|
Compile module.
|
|
Set breakpoint in main.
|
|
Instantiate module.
|
|
Call main.
|
|
Debugger paused in main.
|
|
> globals = Globals
|
|
> typeof globals = "object"
|
|
> Object.keys(globals) = Array(2)
|
|
> globals[0] = 0
|
|
> globals[1] = 1
|
|
> globals[2] = 2n
|
|
> globals[3] = 3n
|
|
> globals["$global0"] = 0
|
|
> $global0 = 0
|
|
> globals["$global3"] = 2n
|
|
> $global3 = 2n
|
|
Stepping twice in main.
|
|
Debugger paused in main.
|
|
> globals[0] = 0
|
|
> globals[1] = 1
|
|
> globals[2] = 2n
|
|
> globals[3] = 42n
|
|
> globals["$global0"] = 0
|
|
> $global0 = 0
|
|
> globals["$global3"] = 2n
|
|
> $global3 = 2n
|
|
Changing global from JavaScript.
|
|
> globals[0] = 0
|
|
> globals[1] = 21
|
|
> globals[2] = 2n
|
|
> globals[3] = 42n
|
|
> globals["$global0"] = 0
|
|
> $global0 = 0
|
|
> globals["$global3"] = 2n
|
|
> $global3 = 2n
|
|
|
|
Running test: testFunctions
|
|
Compile module.
|
|
Set breakpoint in main.
|
|
Instantiate module.
|
|
Call main.
|
|
Debugger paused in main.
|
|
> functions = Functions
|
|
> typeof functions = "object"
|
|
> Object.keys(functions) = Array(4)
|
|
> functions[0] = function 0() { [native code] }
|
|
> functions[1] = function 1() { [native code] }
|
|
> functions[2] = function 2() { [native code] }
|
|
> functions[3] = function 3() { [native code] }
|
|
> functions[4] = function 4() { [native code] }
|
|
> functions["$foo.bar"] = function 0() { [native code] }
|
|
> functions["$main"] = function 1() { [native code] }
|
|
> $main = function 1() { [native code] }
|
|
> functions["$func2"] = function 2() { [native code] }
|
|
> $func2 = function 2() { [native code] }
|
|
> functions["$func4"] = function 4() { [native code] }
|
|
> $func4 = function 4() { [native code] }
|
|
|
|
Running test: testLocals
|
|
Compile module.
|
|
Set breakpoint in main.
|
|
Instantiate module.
|
|
Call main.
|
|
Debugger paused in main.
|
|
> locals = Locals
|
|
> typeof locals = "object"
|
|
> Object.keys(locals) = Array(2)
|
|
> locals[0] = 3
|
|
> locals[1] = 6
|
|
> locals[2] = 0
|
|
> locals["$x"] = 3
|
|
> $x = 3
|
|
> locals["$var2"] = 0
|
|
> $var2 = 0
|
|
Stepping twice in main.
|
|
Debugger paused in main.
|
|
> locals[0] = 3
|
|
> locals[1] = 6
|
|
> locals[2] = 42
|
|
> locals["$x"] = 3
|
|
> $x = 3
|
|
> locals["$var2"] = 42
|
|
> $var2 = 42
|
|
|
|
Running test: testMemories
|
|
Compile module.
|
|
Set breakpoint in main.
|
|
Instantiate module.
|
|
Call main.
|
|
Debugger paused in main.
|
|
> memories = Memories
|
|
> typeof memories = "object"
|
|
> Object.keys(memories) = Array(1)
|
|
> memories[0] = Memory(1)
|
|
> memories["$foo"] = Memory(1)
|
|
> $foo = Memory(1)
|
|
|
|
Running test: testTables
|
|
Compile module.
|
|
Set breakpoint in main.
|
|
Instantiate module.
|
|
Call main.
|
|
Debugger paused in main.
|
|
> tables = Tables
|
|
> typeof tables = "object"
|
|
> Object.keys(tables) = Array(1)
|
|
> tables[0] = Table
|
|
> tables["$bar"] = Table
|
|
> $bar = Table
|
|
|
|
Running test: testStack
|
|
Compile module.
|
|
Set breakpoint in main.
|
|
Instantiate module.
|
|
Call main.
|
|
Debugger paused in main.
|
|
> stack = Stack
|
|
> typeof stack = "object"
|
|
> Object.keys(stack) = Array(0)
|
|
Stepping twice in main.
|
|
Debugger paused in main.
|
|
> stack = Stack
|
|
> Object.keys(stack) = Array(2)
|
|
> stack[0] = 5
|
|
> stack[1] = 42
|