From: Petr Machata Date: Thu, 10 Mar 2011 15:03:18 +0000 (+0100) Subject: dwarflint: Fix "die chain not terminated by a null entry" for CU DIE X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1dfae6e870eec0bf83aa5edc0343d2d72f0585c;p=thirdparty%2Felfutils.git dwarflint: Fix "die chain not terminated by a null entry" for CU DIE - CU DIE is not part of DIE chain, it's a singleton (with optional null entries following it as padding) - consequently, don't emit this message for CU DIE, and change it to full error for all other cases --- diff --git a/dwarflint/check_debug_info.cc b/dwarflint/check_debug_info.cc index 4a1128cf2..b7e801d6a 100644 --- a/dwarflint/check_debug_info.cc +++ b/dwarflint/check_debug_info.cc @@ -967,10 +967,12 @@ namespace if (read_ctx_eof (ctx)) { - // DWARF 4 Ch. 2.3: A chain of sibling entries is - // terminated by a null entry. - wr_message (where, cat (mc_impact_1, mc_info)) - << "DIE chain not terminated with null entry." << std::endl; + if (level > 0) + // DWARF 4 Ch. 2.3: A chain of sibling entries is + // terminated by a null entry. N.B. the CU DIE is a + // singleton, not part of a DIE chain. + wr_error (where) + << "DIE chain not terminated with null entry." << std::endl; break; } } diff --git a/dwarflint/tests/run-aranges_terminate_early.sh b/dwarflint/tests/run-aranges_terminate_early.sh index 36ed8a141..9519f12e1 100755 --- a/dwarflint/tests/run-aranges_terminate_early.sh +++ b/dwarflint/tests/run-aranges_terminate_early.sh @@ -32,13 +32,11 @@ srcdir=$srcdir/tests testfiles aranges_terminate_early testrun_compare ./dwarflint --strict aranges_terminate_early <