a3b5229bdd
We detect a stepping in Wasm from Javascript into Wasm then prepare the target function for debugging. The trick is redirect the target to interpreter and set a 'fake' breakpoint in the first instruction. Currently we don't need to clear this 'fake' breakpoint since it won't notify unless user intend to step in. Change-Id: Ibe1f9ba31dc6c7919895d3fe31967e9c4699ef63 Bug: chromium:1019606 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1902259 Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#65020}
40 lines
740 B
Plaintext
40 lines
740 B
Plaintext
Tests stepping from javascript into wasm
|
|
Installing code and global variable.
|
|
Calling instantiate function.
|
|
Waiting for wasm scripts to be parsed.
|
|
Ignoring script with url v8://test/callInstantiate
|
|
Ignoring script with url wasm://wasm/fa045c1e
|
|
Got wasm script: wasm://wasm/fa045c1e/fa045c1e-0
|
|
Setting breakpoint on line 3 of wasm function
|
|
{
|
|
columnNumber : 2
|
|
lineNumber : 3
|
|
scriptId : <scriptId>
|
|
}
|
|
paused
|
|
function test() {
|
|
#debugger;
|
|
instance.exports.main(1);
|
|
|
|
Debugger.stepInto
|
|
paused
|
|
debugger;
|
|
#instance.exports.main(1);
|
|
}
|
|
|
|
Debugger.stepInto
|
|
paused
|
|
func $wasm_A (param i32) (result i32)
|
|
#local.get 0
|
|
i32.const 1
|
|
|
|
Debugger.resume
|
|
paused
|
|
i32.const 1
|
|
#i32.sub
|
|
end
|
|
|
|
Debugger.resume
|
|
exports.main returned!
|
|
Finished!
|