/* The section ended. */
if (abbr_code == 0)
break;
- if (read_ctx_eof (ctx))
- {
- wr_error (where)
- << "DIE chain not terminated with DIE with zero abbrev code."
- << std::endl;
- break;
- }
prev_die_off = die_off;
got_die = true;
&where,
": abbrev has_children, but the chain was empty.\n");
}
+
+ 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;
+ break;
+ }
}
if (sibling_addr != 0)
#! /bin/sh
-# Copyright (C) 2010 Red Hat, Inc.
+# Copyright (C) 2010, 2011 Red Hat, Inc.
# This file is part of Red Hat elfutils.
#
# Red Hat elfutils is free software; you can redistribute it and/or modify
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
#! /bin/sh
-# Copyright (C) 2010 Red Hat, Inc.
+# Copyright (C) 2010, 2011 Red Hat, Inc.
# This file is part of Red Hat elfutils.
#
# Red Hat elfutils is free software; you can redistribute it and/or modify
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_line: table 0: empty line number program.
error: .debug_line: table 0: sequence of opcodes not terminated with DW_LNE_end_sequence.
warning: .debug_info: CU 0: no aranges table is associated with this CU.