[PATCH] D154638: Emit a .debug_addr section with dsymutil

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 12:34:20 PDT 2023


aprantl added inline comments.


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:1398
+
+  assert((AttrSpec.Form == dwarf::DW_FORM_addrx) ||
+         (AttrSpec.Form == dwarf::DW_FORM_addrx1 &&
----------------
avl wrote:
> aprantl wrote:
> > This is the first time I'm reading through the patch, so I might be missing something: Since the address pool is growing as we are processing multiple object files, shouldn't we dynamically decide on the FORM based on the value of `AddrIndex`? Or is this happening elsewhere already?
> the generated .debug_addr is local for compile unit. The number of addresses usually should not be increased for single compile unit. So we can use original form which was enough to keep source addresses.
> 
Ah I see. So, sorting the addresses by frequency and merging them into a global address pool would be a future optimization.


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

https://reviews.llvm.org/D154638



More information about the llvm-commits mailing list