Commit 3ea7ecaf authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm][debug] Improve printing of break locations

Using the "logSourceLocation" function from protocol-test.js prints
slightly better location information for wasm, and especially much
better information for JS breakpoints. This helps understanding and
debugging these tests.

R=thibaudm@chromium.org

Bug: v8:10351
Change-Id: I51c7d168d2cb19fb8469b4a2eb372c2b95650fcb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120539Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66863}
parent 252acd7f
...@@ -7,7 +7,7 @@ Setting breakpoint on offset 59 (should be propagated to 60, the offset of the c ...@@ -7,7 +7,7 @@ Setting breakpoint on offset 59 (should be propagated to 60, the offset of the c
lineNumber : 0 lineNumber : 0
scriptId : <scriptId> scriptId : <scriptId>
} }
Paused at wasm://wasm/befe41aa:0:60 Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10
at wasm_B (0:60): at wasm_B (0:60):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -18,7 +18,7 @@ at (anonymous) (0:17): ...@@ -18,7 +18,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:39 Script wasm://wasm/befe41aa byte offset 39: Wasm opcode 0x1
at wasm_A (0:39): at wasm_A (0:39):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -35,7 +35,7 @@ at (anonymous) (0:17): ...@@ -35,7 +35,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOver called Debugger.stepOver called
Paused at wasm://wasm/befe41aa:0:40 Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x1
at wasm_A (0:40): at wasm_A (0:40):
- scope (global): - scope (global):
-- 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.stepOut called Debugger.stepOut called
Paused at wasm://wasm/befe41aa:0:62 Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0xc
at wasm_B (0:62): at wasm_B (0:62):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -63,7 +63,7 @@ at (anonymous) (0:17): ...@@ -63,7 +63,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOut called Debugger.stepOut called
Paused at wasm://wasm/befe41aa:0:60 Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10
at wasm_B (0:60): at wasm_B (0:60):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -74,7 +74,7 @@ at (anonymous) (0:17): ...@@ -74,7 +74,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOver called Debugger.stepOver called
Paused at wasm://wasm/befe41aa:0:62 Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0xc
at wasm_B (0:62): at wasm_B (0:62):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -85,7 +85,7 @@ at (anonymous) (0:17): ...@@ -85,7 +85,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:44 Script wasm://wasm/befe41aa byte offset 44: Wasm opcode 0x3
at wasm_B (0:44): at wasm_B (0:44):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -96,7 +96,7 @@ at (anonymous) (0:17): ...@@ -96,7 +96,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.resume called Debugger.resume called
Paused at wasm://wasm/befe41aa:0:60 Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10
at wasm_B (0:60): at wasm_B (0:60):
- scope (global): - scope (global):
-- 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.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:39 Script wasm://wasm/befe41aa byte offset 39: Wasm opcode 0x1
at wasm_A (0:39): at wasm_A (0:39):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -124,7 +124,7 @@ at (anonymous) (0:17): ...@@ -124,7 +124,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOut called Debugger.stepOut called
Paused at wasm://wasm/befe41aa:0:62 Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0xc
at wasm_B (0:62): at wasm_B (0:62):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -135,7 +135,7 @@ at (anonymous) (0:17): ...@@ -135,7 +135,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:44 Script wasm://wasm/befe41aa byte offset 44: Wasm opcode 0x3
at wasm_B (0:44): at wasm_B (0:44):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -146,7 +146,7 @@ at (anonymous) (0:17): ...@@ -146,7 +146,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:46 Script wasm://wasm/befe41aa byte offset 46: Wasm opcode 0x20
at wasm_B (0:46): at wasm_B (0:46):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -157,7 +157,7 @@ at (anonymous) (0:17): ...@@ -157,7 +157,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:48 Script wasm://wasm/befe41aa byte offset 48: Wasm opcode 0x4
at wasm_B (0:48): at wasm_B (0:48):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -168,7 +168,7 @@ at (anonymous) (0:17): ...@@ -168,7 +168,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:50 Script wasm://wasm/befe41aa byte offset 50: Wasm opcode 0x20
at wasm_B (0:50): at wasm_B (0:50):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -179,7 +179,7 @@ at (anonymous) (0:17): ...@@ -179,7 +179,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:52 Script wasm://wasm/befe41aa byte offset 52: Wasm opcode 0x41
at wasm_B (0:52): at wasm_B (0:52):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -190,7 +190,7 @@ at (anonymous) (0:17): ...@@ -190,7 +190,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:54 Script wasm://wasm/befe41aa byte offset 54: Wasm opcode 0x6b
at wasm_B (0:54): at wasm_B (0:54):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -201,7 +201,7 @@ at (anonymous) (0:17): ...@@ -201,7 +201,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:55 Script wasm://wasm/befe41aa byte offset 55: Wasm opcode 0x21
at wasm_B (0:55): at wasm_B (0:55):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -212,7 +212,7 @@ at (anonymous) (0:17): ...@@ -212,7 +212,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:57 Script wasm://wasm/befe41aa byte offset 57: Wasm opcode 0x41
at wasm_B (0:57): at wasm_B (0:57):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -223,7 +223,7 @@ at (anonymous) (0:17): ...@@ -223,7 +223,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:60 Script wasm://wasm/befe41aa byte offset 60: Wasm opcode 0x10
at wasm_B (0:60): at wasm_B (0:60):
- scope (global): - scope (global):
-- 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
Paused at wasm://wasm/befe41aa:0:39 Script wasm://wasm/befe41aa byte offset 39: Wasm opcode 0x1
at wasm_A (0:39): at wasm_A (0:39):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -251,7 +251,7 @@ at (anonymous) (0:17): ...@@ -251,7 +251,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:40 Script wasm://wasm/befe41aa byte offset 40: Wasm opcode 0x1
at wasm_A (0:40): at wasm_A (0:40):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -268,7 +268,7 @@ at (anonymous) (0:17): ...@@ -268,7 +268,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:41 Script wasm://wasm/befe41aa byte offset 41: Wasm opcode 0xb
at wasm_A (0:41): at wasm_A (0:41):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -285,7 +285,7 @@ at (anonymous) (0:17): ...@@ -285,7 +285,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/befe41aa:0:62 Script wasm://wasm/befe41aa byte offset 62: Wasm opcode 0xc
at wasm_B (0:62): at wasm_B (0:62):
- scope (global): - scope (global):
-- skipped -- skipped
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
let {session, contextGroup, Protocol} = let {session, contextGroup, Protocol} =
InspectorTest.start('Tests stepping through wasm scripts by byte offsets'); InspectorTest.start('Tests stepping through wasm scripts by byte offsets');
session.setupScriptMap();
utils.load('test/mjsunit/wasm/wasm-module-builder.js'); utils.load('test/mjsunit/wasm/wasm-module-builder.js');
...@@ -95,9 +96,7 @@ function instantiate(bytes) { ...@@ -95,9 +96,7 @@ function instantiate(bytes) {
async function waitForPauseAndStep(stepAction) { async function waitForPauseAndStep(stepAction) {
const {params: {callFrames}} = await Protocol.Debugger.oncePaused(); const {params: {callFrames}} = await Protocol.Debugger.oncePaused();
const topFrame = callFrames[0]; await session.logSourceLocation(callFrames[0].location);
InspectorTest.log(
`Paused at ${topFrame.url}:${topFrame.location.lineNumber}:${topFrame.location.columnNumber}`);
for (var frame of callFrames) { for (var frame of callFrames) {
const functionName = frame.functionName || '(anonymous)'; const functionName = frame.functionName || '(anonymous)';
const lineNumber = frame.location.lineNumber; const lineNumber = frame.location.lineNumber;
......
...@@ -7,53 +7,54 @@ Setting breakpoint on offset 72 (should be propagated to 73, the offset of the c ...@@ -7,53 +7,54 @@ Setting breakpoint on offset 72 (should be propagated to 73, the offset of the c
lineNumber : 0 lineNumber : 0
scriptId : <scriptId> scriptId : <scriptId>
} }
Paused at wasm://wasm/42af3c82:0:73 Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:52 Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x1
Debugger.stepOver called Debugger.stepOver called
Paused at wasm://wasm/42af3c82:0:53 Script wasm://wasm/42af3c82 byte offset 53: Wasm opcode 0x1
Debugger.stepOut called Debugger.stepOut called
Paused at wasm://wasm/42af3c82:0:75 Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0xc
Debugger.stepOut called Debugger.stepOut called
Paused at wasm://wasm/42af3c82:0:73 Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10
Debugger.stepOver called Debugger.stepOver called
Paused at wasm://wasm/42af3c82:0:75 Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0xc
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:59 Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20
Debugger.resume called Debugger.resume called
Paused at wasm://wasm/42af3c82:0:73 Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:52 Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x1
Debugger.stepOut called Debugger.stepOut called
Paused at wasm://wasm/42af3c82:0:75 Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0xc
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:59 Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:61 Script wasm://wasm/42af3c82 byte offset 61: Wasm opcode 0x4
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:63 Script wasm://wasm/42af3c82 byte offset 63: Wasm opcode 0x20
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:65 Script wasm://wasm/42af3c82 byte offset 65: Wasm opcode 0x41
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:67 Script wasm://wasm/42af3c82 byte offset 67: Wasm opcode 0x6b
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:68 Script wasm://wasm/42af3c82 byte offset 68: Wasm opcode 0x21
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:70 Script wasm://wasm/42af3c82 byte offset 70: Wasm opcode 0x41
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:73 Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:52 Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x1
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:53 Script wasm://wasm/42af3c82 byte offset 53: Wasm opcode 0x1
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:54 Script wasm://wasm/42af3c82 byte offset 54: Wasm opcode 0xb
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:75 Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0xc
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/42af3c82:0:59 Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20
Debugger.resume called Debugger.resume called
Paused at :0:24 instance.exports.main(4)#
Debugger.resume called Debugger.resume called
exports.main returned! exports.main returned!
Test stepping over a recursive call Test stepping over a recursive call
...@@ -63,9 +64,9 @@ Setting breakpoint on the recursive call instruction @+93, url wasm://wasm/42af3 ...@@ -63,9 +64,9 @@ Setting breakpoint on the recursive call instruction @+93, url wasm://wasm/42af3
lineNumber : 0 lineNumber : 0
scriptId : <scriptId> scriptId : <scriptId>
} }
Paused at wasm://wasm/42af3c82:0:93 Script wasm://wasm/42af3c82 byte offset 93: Wasm opcode 0x10
Removing breakpoint Removing breakpoint
Debugger.stepOver called Debugger.stepOver called
Paused at wasm://wasm/42af3c82:0:95 Script wasm://wasm/42af3c82 byte offset 95: Wasm opcode 0x20
Debugger.resume called Debugger.resume called
Finished! Finished!
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
let {session, contextGroup, Protocol} = let {session, contextGroup, Protocol} =
InspectorTest.start('Tests stepping through wasm scripts by byte offsets'); InspectorTest.start('Tests stepping through wasm scripts by byte offsets');
session.setupScriptMap();
utils.load('test/mjsunit/wasm/wasm-module-builder.js'); utils.load('test/mjsunit/wasm/wasm-module-builder.js');
...@@ -143,7 +144,5 @@ async function waitForPauseAndStep(stepAction) { ...@@ -143,7 +144,5 @@ async function waitForPauseAndStep(stepAction) {
async function waitForPause() { async function waitForPause() {
const {params: {callFrames}} = await Protocol.Debugger.oncePaused(); const {params: {callFrames}} = await Protocol.Debugger.oncePaused();
const topFrame = callFrames[0]; await session.logSourceLocation(callFrames[0].location);
InspectorTest.log(
`Paused at ${topFrame.url}:${topFrame.location.lineNumber}:${topFrame.location.columnNumber}`);
} }
...@@ -10,7 +10,7 @@ Setting breakpoint on offset 54 (on the setlocal before the call), url wasm://wa ...@@ -10,7 +10,7 @@ Setting breakpoint on offset 54 (on the setlocal before the call), url wasm://wa
lineNumber : 0 lineNumber : 0
scriptId : <scriptId> scriptId : <scriptId>
} }
Paused at wasm://wasm/9b4bf87e:0:54 Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21
at wasm_B (0:54): at wasm_B (0:54):
- scope (global): - scope (global):
-- 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
Paused at wasm://wasm/9b4bf87e:0:56 Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10
at wasm_B (0:56): at wasm_B (0:56):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -32,7 +32,7 @@ at (anonymous) (0:17): ...@@ -32,7 +32,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:38 Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x1
at wasm_A (0:38): at wasm_A (0:38):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -48,7 +48,7 @@ at (anonymous) (0:17): ...@@ -48,7 +48,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOver called Debugger.stepOver called
Paused at wasm://wasm/9b4bf87e:0:39 Script wasm://wasm/9b4bf87e byte offset 39: Wasm opcode 0x1
at wasm_A (0:39): at wasm_A (0:39):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -64,7 +64,7 @@ at (anonymous) (0:17): ...@@ -64,7 +64,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOut called Debugger.stepOut called
Paused at wasm://wasm/9b4bf87e:0:58 Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0xc
at wasm_B (0:58): at wasm_B (0:58):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -75,7 +75,7 @@ at (anonymous) (0:17): ...@@ -75,7 +75,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOut called Debugger.stepOut called
Paused at wasm://wasm/9b4bf87e:0:54 Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21
at wasm_B (0:54): at wasm_B (0:54):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -86,7 +86,7 @@ at (anonymous) (0:17): ...@@ -86,7 +86,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOver called Debugger.stepOver called
Paused at wasm://wasm/9b4bf87e:0:56 Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10
at wasm_B (0:56): at wasm_B (0:56):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -97,7 +97,7 @@ at (anonymous) (0:17): ...@@ -97,7 +97,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOver called Debugger.stepOver called
Paused at wasm://wasm/9b4bf87e:0:58 Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0xc
at wasm_B (0:58): at wasm_B (0:58):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -108,7 +108,7 @@ at (anonymous) (0:17): ...@@ -108,7 +108,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.resume called Debugger.resume called
Paused at wasm://wasm/9b4bf87e:0:54 Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21
at wasm_B (0:54): at wasm_B (0:54):
- scope (global): - scope (global):
-- 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.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:56 Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10
at wasm_B (0:56): at wasm_B (0:56):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -130,7 +130,7 @@ at (anonymous) (0:17): ...@@ -130,7 +130,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:38 Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x1
at wasm_A (0:38): at wasm_A (0:38):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -146,7 +146,7 @@ at (anonymous) (0:17): ...@@ -146,7 +146,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepOut called Debugger.stepOut called
Paused at wasm://wasm/9b4bf87e:0:58 Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0xc
at wasm_B (0:58): at wasm_B (0:58):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -157,7 +157,7 @@ at (anonymous) (0:17): ...@@ -157,7 +157,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:43 Script wasm://wasm/9b4bf87e byte offset 43: Wasm opcode 0x3
at wasm_B (0:43): at wasm_B (0:43):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -168,7 +168,7 @@ at (anonymous) (0:17): ...@@ -168,7 +168,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:45 Script wasm://wasm/9b4bf87e byte offset 45: Wasm opcode 0x20
at wasm_B (0:45): at wasm_B (0:45):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -179,7 +179,7 @@ at (anonymous) (0:17): ...@@ -179,7 +179,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:47 Script wasm://wasm/9b4bf87e byte offset 47: Wasm opcode 0x4
at wasm_B (0:47): at wasm_B (0:47):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -190,7 +190,7 @@ at (anonymous) (0:17): ...@@ -190,7 +190,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:49 Script wasm://wasm/9b4bf87e byte offset 49: Wasm opcode 0x20
at wasm_B (0:49): at wasm_B (0:49):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -201,7 +201,7 @@ at (anonymous) (0:17): ...@@ -201,7 +201,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:51 Script wasm://wasm/9b4bf87e byte offset 51: Wasm opcode 0x41
at wasm_B (0:51): at wasm_B (0:51):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -212,7 +212,7 @@ at (anonymous) (0:17): ...@@ -212,7 +212,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:53 Script wasm://wasm/9b4bf87e byte offset 53: Wasm opcode 0x6b
at wasm_B (0:53): at wasm_B (0:53):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -223,7 +223,7 @@ at (anonymous) (0:17): ...@@ -223,7 +223,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:54 Script wasm://wasm/9b4bf87e byte offset 54: Wasm opcode 0x21
at wasm_B (0:54): at wasm_B (0:54):
- scope (global): - scope (global):
-- 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
Paused at wasm://wasm/9b4bf87e:0:56 Script wasm://wasm/9b4bf87e byte offset 56: Wasm opcode 0x10
at wasm_B (0:56): at wasm_B (0:56):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -245,7 +245,7 @@ at (anonymous) (0:17): ...@@ -245,7 +245,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:38 Script wasm://wasm/9b4bf87e byte offset 38: Wasm opcode 0x1
at wasm_A (0:38): at wasm_A (0:38):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -261,7 +261,7 @@ at (anonymous) (0:17): ...@@ -261,7 +261,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:39 Script wasm://wasm/9b4bf87e byte offset 39: Wasm opcode 0x1
at wasm_A (0:39): at wasm_A (0:39):
- scope (global): - scope (global):
-- 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
Paused at wasm://wasm/9b4bf87e:0:40 Script wasm://wasm/9b4bf87e byte offset 40: Wasm opcode 0xb
at wasm_A (0:40): at wasm_A (0:40):
- scope (global): - scope (global):
-- skipped -- skipped
...@@ -293,7 +293,7 @@ at (anonymous) (0:17): ...@@ -293,7 +293,7 @@ at (anonymous) (0:17):
- scope (global): - scope (global):
-- skipped -- skipped
Debugger.stepInto called Debugger.stepInto called
Paused at wasm://wasm/9b4bf87e:0:58 Script wasm://wasm/9b4bf87e byte offset 58: Wasm opcode 0xc
at wasm_B (0:58): at wasm_B (0:58):
- scope (global): - scope (global):
-- skipped -- skipped
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
let {session, contextGroup, Protocol} = let {session, contextGroup, Protocol} =
InspectorTest.start('Tests stepping through wasm scripts with source maps'); InspectorTest.start('Tests stepping through wasm scripts with source maps');
session.setupScriptMap();
utils.load('test/mjsunit/wasm/wasm-module-builder.js'); utils.load('test/mjsunit/wasm/wasm-module-builder.js');
...@@ -93,9 +94,7 @@ function instantiate(bytes) { ...@@ -93,9 +94,7 @@ function instantiate(bytes) {
async function waitForPauseAndStep(stepAction) { async function waitForPauseAndStep(stepAction) {
const {params: {callFrames}} = await Protocol.Debugger.oncePaused(); const {params: {callFrames}} = await Protocol.Debugger.oncePaused();
const topFrame = callFrames[0]; await session.logSourceLocation(callFrames[0].location);
InspectorTest.log(
`Paused at ${topFrame.url}:${topFrame.location.lineNumber}:${topFrame.location.columnNumber}`);
for (var frame of callFrames) { for (var frame of callFrames) {
const functionName = frame.functionName || '(anonymous)'; const functionName = frame.functionName || '(anonymous)';
const lineNumber = frame.location.lineNumber; const lineNumber = frame.location.lineNumber;
......
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