[PATCH] D80382: [MC] Implement generating 64-bit debug info.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 16:16:18 PDT 2020


dblaikie added inline comments.


================
Comment at: llvm/test/MC/ELF/gen-dwarf64.s:81-83
+// DUMP5:       .debug_rnglists contents:
+// DUMP5-NEXT:  0x00000000: range list header:
+// DUMP5-SAME:      format = DWARF64
----------------
This concerns me slightly - looks like there was some latent/hidden/untested DWARF64 support in the rnglists that's just now become testable? So it might need some more testing if it's been so far untested? (similarly with any other sections with latent support - debug_info, debug_aranges, abbrev(? not sure if abbrev is different in 32/64))


================
Comment at: llvm/tools/llvm-mc/llvm-mc.cpp:405-414
+    // If needsDwarfSectionOffsetDirective is true, we would eventually call
+    // MCStreamer::emitSymbolValue() with IsSectionRelative = true, but that
+    // is supported only for 4-byte long references.
+    if (MAI->needsDwarfSectionOffsetDirective()) {
+      errs() << ProgName << ": the 64-bit DWARF format is not supported for "
+             << TheTriple.normalize() << ".\n";
+      return 1;
----------------
Perhaps this should have a FIXME? and/or the code where the 4-byte only support is should have a FIXME? Are you planning to do that in a follow-up patch?

And is this error-path tested?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80382





More information about the llvm-commits mailing list