[lld] [lld][ELF] Add --debug-names to create merged .debug_names. (PR #86508)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 14 20:43:14 PDT 2024
================
@@ -2760,20 +2767,21 @@ void DebugNamesBaseSection::parseDebugNames(
const uint32_t hdrSize =
getDebugNamesHeaderSize(nd.hdr.AugmentationStringSize);
auto locs = findDebugNamesOffsets(hdrSize, nd.hdr);
----------------
dwblaikie wrote:
I don't think we need to call this function, or add/track `niOffset` at all (whatever we do, we shouldn't try to rebuild the name index. table offsets - that seems likely to cause bugs if this code ever rebuilt it incorrectly/inconsistently with the way the indexes were parsed in the first place)
instead, I think `ni.Offsets` already contains the offsets we want here (already adjusted for/including the offset where the debug_names table starts witihn the .debug_names section), right? So if there was an accessor for that added to `DWARFDebugNames::NameIndex`, we wouldn't need to be recomputing the offsets, etc here?
https://github.com/llvm/llvm-project/pull/86508
More information about the llvm-commits
mailing list