[llvm] [llvm-debuginfo-analyzer] Add support for WebAssembly binary format. (PR #82588)
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 21:47:27 PDT 2024
================
@@ -429,10 +431,14 @@ void LVELFReader::processOneAttribute(const DWARFDie &Die, LVOffset *OffsetPtr,
CurrentHighPC = *Address;
if (std::optional<uint64_t> Offset = FormValue.getAsUnsignedConstant())
// High PC is an offset from LowPC.
- CurrentHighPC = CurrentLowPC + *Offset;
+ // Don't add the WebAssembly offset if we have seen a DW_AT_low_pc.
+ CurrentHighPC =
+ (FoundLowPC ? CurrentLowPC - WasmOffset : CurrentLowPC) + *Offset;
----------------
aheejin wrote:
Why is this? Can you elaborate?
https://github.com/llvm/llvm-project/pull/82588
More information about the llvm-commits
mailing list