[PATCH] D38654: Parse DWARF information to reduce false positives.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 20 14:00:29 PDT 2017
hctim added inline comments.
================
Comment at: tools/llvm-cfi-verify/FileAnalysis.cpp:325
+ if (LineTable && !LineTable->Rows.empty()) {
+ LineInfoValid = true;
+ break;
----------------
probinson wrote:
> Does this tool run only on .o files, and not on executables? Because this decides line info is valid if any CU has a non-empty line table. If you are looking at a linked executable, one might have been compiled -g and another not, and this check will still succeed.
The goal for this tool is to run on both.
Thanks for reminding me :) I've had discussions with people about this exact topic offline, but forgot to update the commits.
The consensus we reached was in order to do elimination-by-dwarf (i.e. having --ignore-dwarf=false), anything that is statically linked into this binary is required to be compiled with -g. I'll update the documentation for this tool soon and add a comment around this section.
================
Comment at: tools/llvm-cfi-verify/FileAnalysis.cpp:331
+ if (!LineInfoValid) {
+ for (auto &Range : DWARF->type_unit_sections()) {
+ for (auto &Unit : Range) {
----------------
probinson wrote:
> Type units can have an associated line table, but that's just to provide filespecs for DW_AT_file. There should never be any Rows in a type unit's line table.
Thanks for the information, will remove the redundant check.
https://reviews.llvm.org/D38654
More information about the llvm-commits
mailing list