]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Fix reporting of CU x arange mismatch
authorPetr Machata <pmachata@redhat.com>
Mon, 21 Mar 2011 15:47:26 +0000 (16:47 +0100)
committerPetr Machata <pmachata@redhat.com>
Mon, 21 Mar 2011 15:47:26 +0000 (16:47 +0100)
- 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
dwarflint/check_debug_info.cc
dwarflint/tests/run-aranges_terminate_early.sh

index 915dcae4f7d80b841977a7cf5605d65ce7ec8eb6..f044b43ef9dd814193a39686f41e6610289fbf87 100644 (file)
@@ -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
index b64a82eb1ac91bd01c04b0f666566f6eecc33b69..32bfd572b44f55dd9b5eb3936d7b262991b07726 100644 (file)
@@ -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;
index 9519f12e12e6aa474a017c86e0d4b6ea7c29c47d..7f6951482ca75cd89d2e5ca246b0015712ffcc82 100755 (executable)
@@ -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