[PATCH] D79962: Fix the verification of DIEs with DW_AT_ranges.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 14 17:59:46 PDT 2020
dblaikie added a comment.
I'm not able to understand the description of the original bug, perhaps you could show the original behavior for your test case for comparison?
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFAddressRange.h:58
+ /// ranges were combined.
+ bool union_range(const DWARFAddressRange &RHS) {
+ if (!intersects(RHS))
----------------
Probably could use a more explicit name - "union_if_intersecting"?
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:52
Ranges.insert(Pos, R);
- return Ranges.end();
+ return llvm::None;
}
----------------
No need to have the `llvm::` qualification here.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:420
+ // more dead stripped address ranges which tend to all be at the same
+ // address: 0 or -1.
+ if (auto PrevRange = RI.insert(Range)) {
----------------
Where have you seen -1? Both gold and lld use 0, binutils ld... is more complicated, but I don't think it uses -1? hmm, maybe it does... hmm, at least for ranges it uses 1: [0x0000000000000001, 0x0000000000000001) which is different from gold and lld but for the address it uses zero:
DW_AT_low_pc (0x0000000000000000)
DW_AT_high_pc (0x0000000000000006)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79962/new/
https://reviews.llvm.org/D79962
More information about the llvm-commits
mailing list