[PATCH] D94323: [dsymutil] Add preliminary support for DWARF 5.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 04:41:12 PST 2021


avl added inline comments.


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:88-89
 
+  /// Apply the valid reloctions tot he index address.
+  virtual uint64_t relocateIndexedAddr(uint64_t Addr) = 0;
+
----------------



================
Comment at: llvm/tools/dsymutil/DwarfLinkerForBinary.cpp:693
 
   return hasValidRelocationAt(LocationOffset, LocationEndOffset, MyInfo);
 }
----------------
it is also necessary to update how dwarf::DW_AT_location is handled for debug_addr. It looks like we need to parse location expression, extract addresses, and check whether it points to live code. I think it needs comment in this review if it is supposed to be done in some follow-up review.


================
Comment at: llvm/tools/dsymutil/DwarfLinkerForBinary.cpp:717
+    uint64_t LowPcOffset = *OffsetValue->getAsAddress();
+    auto It = std::lower_bound(ValidDebugAddrRelocs.begin(),
+                               ValidDebugAddrRelocs.end(), LowPcOffset);
----------------
I would propose to use single unified searching function here. i.e. to use the same AddressManager::hasValidRelocationAt() for both tables(debug_info and debug_abbrev). Like in this review - D93106 .


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

https://reviews.llvm.org/D94323



More information about the llvm-commits mailing list