summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm-debug.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/wasm/wasm-debug.cpp b/src/wasm/wasm-debug.cpp
index 8de691272..3e0749f36 100644
--- a/src/wasm/wasm-debug.cpp
+++ b/src/wasm/wasm-debug.cpp
@@ -64,6 +64,10 @@ struct BinaryenDWARFInfo {
uint8_t addrSize = AddressSize;
bool isLittleEndian = true;
context = llvm::DWARFContext::create(sections, addrSize, isLittleEndian);
+ if (context->getMaxVersion() > 4) {
+ std::cerr << "warning: unsupported DWARF version ("
+ << context->getMaxVersion() << ")\n";
+ }
}
};
@@ -162,8 +166,8 @@ struct LineState {
}
default: {
// An unknown opcode, ignore.
- std::cerr << "warning: unknown subopcopde " << opcode.SubOpcode
- << '\n';
+ std::cerr << "warning: unknown subopcode " << opcode.SubOpcode
+ << " (this may be an unsupported version of DWARF)\n";
}
}
break;
@@ -180,7 +184,10 @@ struct LineState {
return true;
}
case llvm::dwarf::DW_LNS_advance_pc: {
- assert(table.MinInstLength == 1);
+ if (table.MinInstLength != 1) {
+ std::cerr << "warning: bad MinInstLength "
+ "(this may be an unsupported DWARF version)";
+ }
addr += opcode.Data;
break;
}