[PATCH] D132371: [DWARFLinker][NFC] Change interface of DWARFLinker to specify accel table kinds explicitly.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 01:30:53 PDT 2022


avl added a comment.

> I am not sure this change makes sense as all of the Apple tables should be included if you have any, and likewise for .debug_pubnames and .debug_pubtypes: you want both or none.

My intention is to allow generation other index tables. f.e. we might want to generate .gdb_index and/or .debug_cu_index. In that case we need to have a way to specify not only "Apple" or "Debug" but additional tables.

Another thing is that "Default" can be defined differently for different tools. Thus it would be good if DWARFLinker would not have knowledge about dsymutil or llvm-dwarfutil specifics.

What about following classification:

  enum class DwarfLinkerAccelTableKind : uint8_t {
    Apple,            ///< .apple_names, .apple_namespaces, .apple_types, .apple_objc.
    DWARFv4,   ///< .debug_pubnames, .debug_pubtypes
    DWARFv5    ///< DWARF v5 .debug_names.
  };

or even:

  enum class DwarfLinkerAccelTableKind : uint8_t {
    Apple,            ///< .apple_names, .apple_namespaces, .apple_types, .apple_objc.
    DWARF,       ///< .debug_pubnames, .debug_pubtypes for DWARFv4 or  .debug_names for DWARFv5
  };

We will be able to extend it for other tables later:

  enum class DwarfLinkerAccelTableKind : uint8_t {
    Apple,            ///< .apple_names, .apple_namespaces, .apple_types, .apple_objc.
    DWARF,       ///< .debug_pubnames, .debug_pubtypes for DWARFv4 or  .debug_names for DWARFv5
    GDB_index
  };

?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132371



More information about the llvm-commits mailing list