[PATCH] D157036: Emit a .debug_str_offsets section with dsymutil to support DW_FORM_strx in dsymutil.

Shubham Sandeep Rastogi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 16:36:36 PDT 2023


rastogishubham added inline comments.


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:2025
+  if (StrxFoundInCU)
+    llvm_unreachable("Didn't find a DW_AT_str_offsets_base in cloned DIE!");
+}
----------------
aprantl wrote:
> Just double-checking that this is really unreachable, even with malformed input?
With the updates to the patch, this should truly be unreachable


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:2592
+      if (DwarfVersion >= 5)
+        patchStrOffsetsBase(*CurrentUnit->getOutputUnitDIE(), DIEInteger(8), StrxFoundInCU);
     }
----------------
aprantl wrote:
> If I'm reading the DWARF spec correctly, isn't the header size 4+2+2 in DWARF32 and 4+8+2+2 in DWARF64?
Yes, but we only emit DWARF32 on our platforms


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

https://reviews.llvm.org/D157036



More information about the llvm-commits mailing list