diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -910,6 +910,8 @@ stack.push_back(Scalar(opcodes.GetAddress(&offset))); if (target && target->GetArchitecture().GetCore() == ArchSpec::eCore_wasm32) { + // wasm file sections aren't mapped into memory, therefore addresses can + // never point into a file section and are always LoadAddresses. stack.back().SetValueType(Value::ValueType::LoadAddress); } else { stack.back().SetValueType(Value::ValueType::FileAddress); @@ -2516,6 +2518,8 @@ stack.push_back(Scalar(value)); if (target && target->GetArchitecture().GetCore() == ArchSpec::eCore_wasm32) { + // wasm file sections aren't mapped into memory, therefore addresses can + // never point into a file section and are always LoadAddresses. stack.back().SetValueType(Value::ValueType::LoadAddress); } else { stack.back().SetValueType(Value::ValueType::FileAddress);