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;
}
}
testfiles aranges_terminate_early
testrun_compare ./dwarflint --strict aranges_terminate_early <<EOF
-warning: .debug_info: DIE 0xb (abbreviation 0): DIE chain not terminated with null entry.
warning: .debug_aranges: [0x20, 0x30): unnecessary padding with zero bytes.
warning: .debug_aranges: addresses [0x400474, 0x400481) are covered with CUs, but not with aranges.
EOF
testrun_compare ./dwarflint --check=check_debug_aranges --strict aranges_terminate_early <<EOF
-warning: .debug_info: DIE 0xb (abbreviation 0): DIE chain not terminated with null entry.
warning: .debug_aranges: [0x20, 0x30): unnecessary padding with zero bytes.
warning: .debug_aranges: addresses [0x400474, 0x400481) are covered with CUs, but not with aranges.
EOF
testrun_compare ./dwarflint garbage-2 <<EOF
error: .debug_info: CU 0: toplevel DIE must be either compile_unit or partial_unit.
+error: .debug_info: DIE 0xab (abbreviation 113): DIE chain not terminated with null entry.
EOF
testrun_compare ./dwarflint --check=@low garbage-3 <<EOF
testrun_compare ./dwarflint garbage-4 <<EOF
error: .debug_info: DIE 0x6c: this DIE claims that its sibling is 0x80000085 but it's actually 0x85.
+error: .debug_info: DIE 0xab (abbreviation 113): DIE chain not terminated with null entry.
EOF
testrun_compare ./dwarflint garbage-5 <<EOF
+error: .debug_info: DIE 0xab (abbreviation 113): DIE chain not terminated with null entry.
error: .debug_line: offset 0x3e: not enough data to read an opcode of length 5.
error: .debug_info: DIE 0xb (abbr. attribute 0xc): unresolved reference to .debug_line table 0x0.
EOF
testrun_compare ./dwarflint garbage-8 <<EOF
error: .debug_info: DIE 0x6c (abbr. attribute 0x43): DW_AT_sibling with a value of 0.
+error: .debug_info: DIE 0xab (abbreviation 113): DIE chain not terminated with null entry.
EOF
testrun_compare ./dwarflint garbage-9 <<EOF
error: .debug_info: DIE 0x84 (abbr. attribute 0x5f): invalid reference outside the CU: 0xef00ab.
error: .debug_info: DIE 0x6c: is the last sibling in chain, but has a DW_AT_sibling attribute.
+error: .debug_info: DIE 0xab (abbreviation 113): DIE chain not terminated with null entry.
EOF
EOF
testrun_compare ./dwarflint --strict --check=check_debug_info_refs check_debug_info_refs-1 <<EOF
-warning: .debug_info: DIE 0xb (abbreviation 0): DIE chain not terminated with null entry.
-warning: .debug_info: DIE 0x5f (abbreviation 54): DIE chain not terminated with null entry.
error: .debug_aranges: table 48 (CU DIE 95): there has already been arange section for this CU.
warning: .debug_info: CU 0: no aranges table is associated with this CU.
EOF
testrun_compare ./dwarflint --strict --check=check_debug_info_refs check_debug_info_refs-2 <<EOF
-warning: .debug_info: DIE 0xb (abbreviation 0): DIE chain not terminated with null entry.
-warning: .debug_info: DIE 0x54 (abbreviation 48): DIE chain not terminated with null entry.
warning: .debug_info: CU 0: no aranges table is associated with this CU.
EOF