Commit 48e5ef55 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Print protected instruction for each wasm code object

This helps debugging unexpected traps, as you can figure out which
instruction triggered the trap.

R=mstarzinger@chromium.org

Change-Id: I61735f14e2838ace195f6b84b555b9ddfc06aa0f
Reviewed-on: https://chromium-review.googlesource.com/1140296Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54515}
parent bb9b41bb
......@@ -243,6 +243,15 @@ void WasmCode::Disassemble(const char* name, std::ostream& os,
CodeReference(this), current_pc);
os << "\n";
if (!protected_instructions_.is_empty()) {
os << "Protected instructions:\n pc offset land pad\n";
for (auto& data : protected_instructions()) {
os << std::setw(10) << std::hex << data.instr_offset << std::setw(10)
<< std::hex << data.landing_offset << "\n";
}
os << "\n";
}
if (!source_positions().is_empty()) {
os << "Source positions:\n pc offset position\n";
for (SourcePositionTableIterator it(source_positions()); !it.done();
......
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