summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dwarflint/check_debug_aranges.cc4
-rw-r--r--dwarflint/check_debug_info.cc4
-rwxr-xr-xdwarflint/tests/run-aranges_terminate_early.sh4
3 files changed, 7 insertions, 5 deletions
diff --git a/dwarflint/check_debug_aranges.cc b/dwarflint/check_debug_aranges.cc
index 915dcae4..f044b43e 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 b64a82eb..32bfd572 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 9519f12e..7f695148 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 <<EOF
warning: .debug_aranges: [0x20, 0x30): unnecessary padding with zero bytes.
-warning: .debug_aranges: addresses [0x400474, 0x400481) are covered with CUs, but not with aranges.
+warning: .debug_aranges: addresses [0x400474, 0x400481) are covered with CU DIEs, but not with aranges.
EOF
testrun_compare ./dwarflint --check=check_debug_aranges --strict aranges_terminate_early <<EOF
warning: .debug_aranges: [0x20, 0x30): unnecessary padding with zero bytes.
-warning: .debug_aranges: addresses [0x400474, 0x400481) are covered with CUs, but not with aranges.
+warning: .debug_aranges: addresses [0x400474, 0x400481) are covered with CU DIEs, but not with aranges.
EOF