b38c136948
It makes inspector tests a lot more readable if the opcode of the pause location is being printed. Since we already have a list of all opcodes available in wasm-module-builder.js, we can just reuse that to build a reverse lookup map. This CL implements this for single-byte opcodes only, which is enough for all tests that we currently have. It will have to be extended for prefixed opcodes once that is being used. R=thibaudm@chromium.org, kimanh@chromium.org Change-Id: I085fea99d2f5f2dc6cc084448e5f7444cce5c78b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2474789 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#70578}
70 lines
3.0 KiB
Plaintext
70 lines
3.0 KiB
Plaintext
Tests stepping through wasm scripts by byte offsets
|
|
Setting up global instance variable.
|
|
Got wasm script: wasm://wasm/42af3c82
|
|
Setting breakpoint on offset 72 (should be propagated to 73, the offset of the call), url wasm://wasm/42af3c82
|
|
{
|
|
columnNumber : 73
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
}
|
|
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10 (kExprCallFunction)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01 (kExprNop)
|
|
Debugger.stepOver called
|
|
Script wasm://wasm/42af3c82 byte offset 53: Wasm opcode 0x01 (kExprNop)
|
|
Debugger.stepOut called
|
|
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c (kExprBr)
|
|
Debugger.stepOut called
|
|
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10 (kExprCallFunction)
|
|
Debugger.stepOver called
|
|
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c (kExprBr)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20 (kExprLocalGet)
|
|
Debugger.resume called
|
|
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10 (kExprCallFunction)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01 (kExprNop)
|
|
Debugger.stepOut called
|
|
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c (kExprBr)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20 (kExprLocalGet)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 61: Wasm opcode 0x04 (kExprIf)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 63: Wasm opcode 0x20 (kExprLocalGet)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 65: Wasm opcode 0x41 (kExprI32Const)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 67: Wasm opcode 0x6b (kExprI32Sub)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 68: Wasm opcode 0x21 (kExprLocalSet)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 70: Wasm opcode 0x41 (kExprI32Const)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 73: Wasm opcode 0x10 (kExprCallFunction)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 52: Wasm opcode 0x01 (kExprNop)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 53: Wasm opcode 0x01 (kExprNop)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 54: Wasm opcode 0x0b (kExprEnd)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0x0c (kExprBr)
|
|
Debugger.stepInto called
|
|
Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20 (kExprLocalGet)
|
|
Debugger.resume called
|
|
exports.main returned!
|
|
Test stepping over a recursive call
|
|
Setting breakpoint on the recursive call instruction @+93, url wasm://wasm/42af3c82
|
|
{
|
|
columnNumber : 93
|
|
lineNumber : 0
|
|
scriptId : <scriptId>
|
|
}
|
|
Script wasm://wasm/42af3c82 byte offset 93: Wasm opcode 0x10 (kExprCallFunction)
|
|
Removing breakpoint
|
|
Debugger.stepOver called
|
|
Script wasm://wasm/42af3c82 byte offset 95: Wasm opcode 0x20 (kExprLocalGet)
|
|
Debugger.resume called
|
|
Finished!
|