[llvm] 0541a9d - [DWARFDebugLoc] Tweak error message when resolving offset pairs with no base address
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 01:18:01 PST 2020
Author: Pavel Labath
Date: 2020-01-09T10:20:42+01:00
New Revision: 0541a9d4e7f85c1f08f27fe0c0cae293bbb3903a
URL: https://github.com/llvm/llvm-project/commit/0541a9d4e7f85c1f08f27fe0c0cae293bbb3903a
DIFF: https://github.com/llvm/llvm-project/commit/0541a9d4e7f85c1f08f27fe0c0cae293bbb3903a.diff
LOG: [DWARFDebugLoc] Tweak error message when resolving offset pairs with no base address
The previous message mentioned DW_LLE_offset_pair, but this is
incorrect/confusing because we can get this message even with DWARF4
(which does not use DW_LLE encodings). This happens because DWARF<=4
location entries are "upgraded" to DWARF v5 during parsing.
The new error message refrains from referencing specific constants.
Fixes pr44482.
Added:
Modified:
llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
index 8aed9ab653a1..0c5f9a9c54ec 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
@@ -79,9 +79,9 @@ DWARFLocationInterpreter::Interpret(const DWARFLocationEntry &E) {
}
case dwarf::DW_LLE_offset_pair: {
if (!Base) {
- return createStringError(
- inconvertibleErrorCode(),
- "Unable to resolve DW_LLE_offset_pair: base address unknown");
+ return createStringError(inconvertibleErrorCode(),
+ "Unable to resolve location list offset pair: "
+ "Base address not defined");
}
DWARFAddressRange Range{Base->Address + E.Value0, Base->Address + E.Value1,
Base->SectionIndex};
More information about the llvm-commits
mailing list