From: Petr Machata Date: Tue, 12 Oct 2010 11:24:20 +0000 (+0200) Subject: dwarflint: Move all the low_pc/high_pc processing after the attribute loop X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11c4e5441e2fbebb41258818080f902e9dab3e96;p=thirdparty%2Felfutils.git dwarflint: Move all the low_pc/high_pc processing after the attribute loop - no point adding the low_pc/high_pc range once more for each attribute after the second in the DW_AT_{high,low}_pc pair --- diff --git a/dwarflint/check_debug_info.cc b/dwarflint/check_debug_info.cc index 91296bf69..b4ea0208b 100644 --- a/dwarflint/check_debug_info.cc +++ b/dwarflint/check_debug_info.cc @@ -850,19 +850,19 @@ namespace low_pc or high_pc. */ if (valuep != NULL) *valuep = value; + } + where.ref = NULL; - /* Check PC coverage. */ - if (abbrev->tag == DW_TAG_compile_unit - || abbrev->tag == DW_TAG_partial_unit) - { - if (it->name == DW_AT_low_pc) - cu->low_pc = value; + /* Check PC coverage. */ + if ((abbrev->tag == DW_TAG_compile_unit + || abbrev->tag == DW_TAG_partial_unit) + && low_pc != (uint64_t)-1) + { + cu->low_pc = low_pc; - if (low_pc != (uint64_t)-1 && high_pc != (uint64_t)-1) - coverage_add (pc_coverage, low_pc, high_pc - low_pc); - } + if (high_pc != (uint64_t)-1) + coverage_add (pc_coverage, low_pc, high_pc - low_pc); } - where.ref = NULL; if (high_pc != (uint64_t)-1 && low_pc != (uint64_t)-1) {