[PATCH] D35698: [DWARF] Generalized verification of .debug_abbrev to be applicable to both .debug_abbrev and .debug_abbrev.dwo sections.

Spyridoula Gravani via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 16:30:26 PDT 2017


sgravani added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:135
+  if (noDebugAbbrev && noDebugAbbrevDWO) {
+    OS << "Warning: .debug_abbrev  and .debug_abbrev.dwo are empty.\n";
+    return true;
----------------
dblaikie wrote:
> General feedback: probably want to consistently use lowercase 'warning' and 'error' (or better yet/as well, maybe refactor error/warning handling to use a single function for printing warnings and errors).
> 
> Also there are two spaces between ".debug_abbrev" and "and" - should only be one.
> 
> Is there an existing warning about there being no debug_info section? And about debug_info not having a valid debug_abbrev? Then maybe this warning about missing debug_abbrev isn't necessary?
Partially fixed. I removed the warning from .debug_abbrev. Currently I'm printing a warning for .debug_info section as well, but I plan 
to remove it with another patch. I also removed the extra space character.

I agree with having a function generating the errors/warnings. I could do this in another patch. 
I could also  add a verbose mode in another patch and output errors only when verbose is on.


https://reviews.llvm.org/D35698





More information about the llvm-commits mailing list