[llvm] [LLVM][DWARF] Chnage order for .debug_names abbrev print out (PR #80229)

Greg Clayton via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 12:09:25 PST 2024


https://github.com/clayborg commented:

When we dump things we should dump them in the order in which they appear in the `.debug_xxx` section. Here we are sorting and dumping them in some order. I realize eventually the abbrevs will have an index and that will make the order more natural, but when dumping the contents of the section, we should do it in the order in which they are defined in the file at all times since we are wanting to see the contents of the section we asked to dump. There aren't usually that many abbreviation combinations right? So maybe the dump function can parse the info again and dump each entry it finds in the right order and throw away the temp `llvm::DWARFDebugNames::Abbrev` item as it dumps each one? Or we can maintain an offset in each `llvm::DWARFDebugNames::Abbrev` entry and then sort by that when dumping?

https://github.com/llvm/llvm-project/pull/80229


More information about the llvm-commits mailing list