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

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 16:30:25 PDT 2023


avl added a comment.

In D154638#4520782 <https://reviews.llvm.org/D154638#4520782>, @rastogishubham wrote:

>> Right. We need to clean(), sorry. I missed the fact that DIECloner enumerates several compile units.
>
> Does the rest of the patch look okay?

It looks like the comment for DWARFLinker.cpp::1398 is not addressed:

It would be incorrect to return size of original attribute here.
Instead we need to calculate size of DW_FORM_addrx:

  unsigned NewAttrSize = Die.addValue(DIEAlloc, static_cast<dwarf::Attribute>(AttrSpec.Attr),
                 dwarf::Form::DW_FORM_addrx, DIEInteger(AddrIndex))->sizeOf(OrigUnit.getFormParams());
  
  return NewAttrSize;

and the comment for llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-addresses.test::44

should not it be DW_FORM_addrx here and in following cases?


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

https://reviews.llvm.org/D154638



More information about the llvm-commits mailing list