[PATCH] D146852: [DWARF][GDB INDEX] Fix to deal with constant pool de-dupliation Summary:

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 25 12:06:07 PDT 2023


dblaikie added a comment.

Hmm, the way we're reading this doesn't seem like it /quite/ makes sense - we read the offsets that are encoded in the "symbol table" but then we read the constant pool CU vectors directly based on the number of unique offsets in the symbol table.

Perhaps we should be reading at the offsets specified by the symbol table instead of reading one after the other - maybe at some later date the format changes and other data is stored there, etc?

Seems like `CUIndeces` should more accurately be called be called `CUOffsets`? & perhaps we could sort that (or maybe use a sorted set?) and walk the offsets in order and read at those offset locations?

(as for testing - how's the exsiting functionality tested? I guess it's not tested by running lld (since llvm-dwarfdump testing shouldn't depend on lld) so there's probably a checked in binary with a gdb index, or maybe assembly file that can be assembled into an object file with a gdb index in it? But something like that should be done for this test too - if you wanted' you could also add a test in cross-project-tests that runs gdb itself to generate the index - but that might be a bit brittle depending on what gdb version is installed on the test machine, etc)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146852/new/

https://reviews.llvm.org/D146852



More information about the llvm-commits mailing list