[PATCH] D123623: [Debuginfo][llvm-dwarfutil] Add check for unsupported debug sections.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 13:41:49 PDT 2022


JDevlieghere added inline comments.


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:2427-2430
+      reportError(".debug_rnglists is not currently supported",
+                  OptContext.File);
+      OptContext.Skip = true;
+      continue;
----------------
I generally expect errors to be fatal. Should this be a warning instead? Something like:

> warning: .debug_rnglists is not currently supported: section will be skipped




================
Comment at: llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp:218-224
+  return Name == ".debug_info" || Name == ".debug_types" ||
+         Name == ".debug_abbrev" || Name == ".debug_loc" ||
+         Name == ".debug_loclists" || Name == ".debug_frame" ||
+         Name == ".debug_aranges" || Name == ".debug_ranges" ||
+         Name == ".debug_rnglists" || Name == ".debug_line" ||
+         Name == ".debug_line_str" || Name == ".debug_addr" ||
+         Name == ".debug_str" || Name == ".debug_str_offsets";
----------------
This seems like a good candidate for a string switch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123623



More information about the llvm-commits mailing list