[PATCH] D89216: [dsymutil] Add the ability to run the DWARF verifier on the input

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 00:27:21 PDT 2020


JDevlieghere planned changes to this revision.
JDevlieghere added inline comments.


================
Comment at: llvm/tools/dsymutil/BinaryHolder.cpp:274
+    std::unique_ptr<DWARFContext> DICtx = DWARFContext::create(*Object);
+    if (!DICtx->verify(OS, DumpOpts.noImplicitRecursion()))
+      WithColor::warning() << "input verification failed for "
----------------
avl wrote:
> I have two suggestions/questions: 1. It would probably be better to do input verification inside DWARFLinker library(DWARFLinker::link()). Then all users of the library will be able to use this functionality. 2. Would it be useful to have failure in verification to be fatal error ?
I think moving it into the DWARFLinker is a good idea, we already have a DWARFContext there. 

I don't think we should make input verification failure a fatal error. Depending on the issue dsymutil is capable of generating a valid dSYM from invalid DWARF.


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

https://reviews.llvm.org/D89216



More information about the llvm-commits mailing list