[PATCH] D34328: [ELF] - Add ability for DWARFContextInMemory to exit early when any error happen.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 21:50:03 PDT 2017


dblaikie added inline comments.


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFContext.h:357
+      const object::ObjectFile &Obj, const LoadedObjectInfo *L = nullptr,
+      function_ref<bool(Error)> HandleError = defaultErrorHandler);
 
----------------
Might be worth introducing an enum ("Halt/Continue") rather than using a bool, so it's more obvious/legible which result means what.


================
Comment at: unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp:2150-2155
+  // Data contains bytes of object file generated by yaml2obj tool.
+  // YAML contains description of object with two broken compressed
+  // sections.
+  // To produce Data array next commands and following yaml file was used:
+  // yaml2obj test.s -o test.o
+  // xxd -i test.o
----------------
I thought one of the ideas of the yaml2obj stuff was to enable the writing of invalid inputs, etc - is that not the case? Should that functionality be added to the yaml2obj somehow rather than having big byte arrays?


https://reviews.llvm.org/D34328





More information about the llvm-commits mailing list