[PATCH] D157669: Fix spurious errors that would be emitted when DW_TAG_subprogram DIEs had mutliple ranges in DW_AT_ranges.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 22 17:02:57 PDT 2023
clayborg added inline comments.
================
Comment at: llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp:212
+ for (const DWARFAddressRange &DwarfRange : DwarfRanges) {
+ if (DwarfRange.LowPC < DwarfRange.HighPC)
+ Ranges.insert({DwarfRange.LowPC, DwarfRange.HighPC});
----------------
dblaikie wrote:
> We've got a utility for checking for tombstones, perhaps that should be used here? (I guess this check is essentially for detecting tombstoned ranges?)
The normal path as clang uses zero as the tombstone value, so that will mean the LowPC will always be zero, but it could be -1, which would omit it here, which is ok. We are just making sure we don't put invalid ranges, including empties into the returned ranges. Any tombstone values are actually removed by checking if they exist in the TextRanges that the GsymCreator contains, so if an address is tombstoned to either zero or to -1, those ranges won't fall into the actual address ranges of the sections with execute permissions. Checking if functions exist inside one of the TextRanges is the main way we remove invalid address ranges in the GSYM conversion process.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157669/new/
https://reviews.llvm.org/D157669
More information about the llvm-commits
mailing list