07752032e6
When providing scope information (containing the value of local variables of live stack frames), decode the local variable names of all functions in a wasm module and store this in the WasmDebugInfo structure. Use these names to actually name the reported locals, instead of using the default names "param#<d>" and "local#<d>". These names are only used as fallbacks for locals which were not assigned a name. R=titzer@chromium.org,kozyatinskiy@chromium.org BUG=v8:6245 Change-Id: Ibf7d30e392248ef5590177cd8b6329239b45e018 Reviewed-on: https://chromium-review.googlesource.com/548495 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ben Titzer <titzer@chromium.org> Cr-Commit-Position: refs/heads/master@{#46379}
167 lines
3.4 KiB
Plaintext
167 lines
3.4 KiB
Plaintext
Test retrieving scope information when pausing in wasm functions
|
|
Installing code and global variable.
|
|
Calling instantiate function.
|
|
Waiting for wasm script to be parsed.
|
|
Got wasm script!
|
|
Setting breakpoint on line 2 (first instruction)
|
|
{
|
|
columnNumber : 2
|
|
lineNumber : 2
|
|
scriptId : <scriptId>
|
|
}
|
|
Paused:
|
|
(local i32 f64)
|
|
#i32.const 11
|
|
set_local 0
|
|
|
|
at func (2:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 4 (number), "local#1": 0 (number), "unicode☼f64": 0 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
i32.const 11
|
|
#set_local 0
|
|
i32.const 47
|
|
|
|
at func (3:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 4 (number), "local#1": 0 (number), "unicode☼f64": 0 (number)
|
|
stack: "0": 11 (number)
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
set_local 0
|
|
#i32.const 47
|
|
set_local 1
|
|
|
|
at func (4:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 0 (number), "unicode☼f64": 0 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
i32.const 47
|
|
#set_local 1
|
|
i32.const 1
|
|
|
|
at func (5:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 0 (number), "unicode☼f64": 0 (number)
|
|
stack: "0": 47 (number)
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
set_local 1
|
|
#i32.const 1
|
|
f64.convert_u/i32
|
|
|
|
at func (6:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 47 (number), "unicode☼f64": 0 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
i32.const 1
|
|
#f64.convert_u/i32
|
|
i32.const 7
|
|
|
|
at func (7:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 47 (number), "unicode☼f64": 0 (number)
|
|
stack: "0": 1 (number)
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
f64.convert_u/i32
|
|
#i32.const 7
|
|
f64.convert_u/i32
|
|
|
|
at func (8:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 47 (number), "unicode☼f64": 0 (number)
|
|
stack: "0": 1 (number)
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
i32.const 7
|
|
#f64.convert_u/i32
|
|
f64.div
|
|
|
|
at func (9:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 47 (number), "unicode☼f64": 0 (number)
|
|
stack: "0": 1 (number), "1": 7 (number)
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
f64.convert_u/i32
|
|
#f64.div
|
|
set_local 2
|
|
|
|
at func (10:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 47 (number), "unicode☼f64": 0 (number)
|
|
stack: "0": 1 (number), "1": 7 (number)
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
f64.div
|
|
#set_local 2
|
|
end
|
|
|
|
at func (11:2):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 47 (number), "unicode☼f64": 0 (number)
|
|
stack: "0": 0.14285714285714285 (number)
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
Paused:
|
|
set_local 2
|
|
#end
|
|
|
|
|
|
at func (12:0):
|
|
- scope (global):
|
|
-- skipped
|
|
- scope (local):
|
|
locals: "i32Arg": 11 (number), "local#1": 47 (number), "unicode☼f64": 0.14285714285714285 (number)
|
|
stack:
|
|
at (anonymous) (0:17):
|
|
- scope (global):
|
|
-- skipped
|
|
exports.main returned. Test finished.
|