From b87335df36653199d182978496aa92114460330b Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Mon, 21 Mar 2011 16:47:26 +0100 Subject: [PATCH] dwarflint: Fix reporting of CU x arange mismatch - report the direction of mismatch correctly - clarify that we only care about CU DIEs, not any old DIE. Clarify that in a comment in check_debug_info --- dwarflint/check_debug_aranges.cc | 4 ++-- dwarflint/check_debug_info.cc | 4 +++- dwarflint/tests/run-aranges_terminate_early.sh | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dwarflint/check_debug_aranges.cc b/dwarflint/check_debug_aranges.cc index 915dcae4f..f044b43ef 100644 --- a/dwarflint/check_debug_aranges.cc +++ b/dwarflint/check_debug_aranges.cc @@ -122,7 +122,7 @@ hole (uint64_t start, uint64_t length, void *user) char buf[128]; where where = WHERE (info.id, NULL); char const *what = info.what; - char const *cu = "CUs"; + char const *cu = "CU DIEs"; if (info.reverse) { char const *tmp = what; @@ -158,7 +158,7 @@ compare_coverage (struct elf_file *file, enum section_id id, char const *what) { compare_coverage_1 (file, coverage, other, id, what, false); - compare_coverage_1 (file, other, coverage, id, what, false); + compare_coverage_1 (file, other, coverage, id, what, true); } inline static void diff --git a/dwarflint/check_debug_info.cc b/dwarflint/check_debug_info.cc index b64a82eb1..32bfd572b 100644 --- a/dwarflint/check_debug_info.cc +++ b/dwarflint/check_debug_info.cc @@ -943,7 +943,9 @@ namespace high_pc += low_pc; } - /* Check PC coverage. */ + /* Check PC coverage. We do that only for CU DIEs. Any DIEs + lower in the tree (should) take subset of addresses taken + by the CU DIE. */ if (is_cudie && low_pc != (uint64_t)-1) { cu->low_pc = low_pc; diff --git a/dwarflint/tests/run-aranges_terminate_early.sh b/dwarflint/tests/run-aranges_terminate_early.sh index 9519f12e1..7f6951482 100755 --- a/dwarflint/tests/run-aranges_terminate_early.sh +++ b/dwarflint/tests/run-aranges_terminate_early.sh @@ -33,10 +33,10 @@ testfiles aranges_terminate_early testrun_compare ./dwarflint --strict aranges_terminate_early <