]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: DW_AT_high_pc always has to be >= DW_AT_low_pc
authorPetr Machata <pmachata@redhat.com>
Fri, 18 Mar 2011 09:05:57 +0000 (10:05 +0100)
committerPetr Machata <pmachata@redhat.com>
Fri, 18 Mar 2011 09:05:57 +0000 (10:05 +0100)
dwarflint/check_debug_info.cc
dwarflint/tests/run-bad.sh
dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh

index e01b4c9c1011b341706fd3b2f966a390905f1bb1..b64a82eb1ac91bd01c04b0f666566f6eecc33b69 100644 (file)
@@ -967,7 +967,7 @@ namespace
                                           "DW_AT_low_pc and DW_AT_high_pc");
                /* If there is no coverage, these attributes should
                   not ever be there.  */
-               if (low_pc > high_pc || (low_pc == high_pc && low_pc > 0))
+               if (low_pc > high_pc || low_pc == high_pc)
                  wr_message (where, mc_die_other | mc_impact_3)
                    << "DW_AT_low_pc value not below DW_AT_high_pc."
                    << std::endl;
index fc14f80305ee97f906428b3c1b925332b61e3d7a..6e6db3ff3d97b010d7ab8b3c3c868857f066f873 100755 (executable)
@@ -47,6 +47,7 @@ error: .debug_info: DIE 0xab: toplevel DIE chain contains more than one DIE.
 EOF
 
 testrun_compare ./dwarflint empty-1 <<EOF
+warning: .debug_info: DIE 0xb: DW_AT_low_pc value not below DW_AT_high_pc.
 warning: .debug_line: table 0: no CU uses this line table.
 error: .debug_info: DIE 0x29 (abbr. attribute 0x13): references .debug_line table, but CU DIE lacks DW_AT_stmt_list.
 EOF
@@ -106,6 +107,7 @@ EOF
 testrun_compare ./dwarflint garbage-10 <<EOF
 warning: .rela.debug_info: offset 0xc: relocation formed using STT_SECTION symbol with non-zero value.
 error: .rela.debug_info: offset 0x11: couldn't obtain symbol #7208969: invalid section index.
+warning: .debug_info: DIE 0xb: DW_AT_low_pc value not below DW_AT_high_pc.
 EOF
 
 testrun_compare ./dwarflint garbage-11 <<EOF
@@ -120,6 +122,7 @@ warning: .debug_info: CU 0: abbrev table offset seems to lack a relocation
 warning: .debug_info: DIE 0xb (abbr. attribute 0): strp seems to lack a relocation
 warning: .debug_info: DIE 0xb (abbr. attribute 0x4): strp seems to lack a relocation
 warning: .debug_info: DIE 0xb (abbr. attribute 0xa): data4 seems to lack a relocation
+warning: .debug_info: DIE 0xb: DW_AT_low_pc value not below DW_AT_high_pc.
 error: .debug_line: table 0: header claims that it has a size of 542, but in fact it has a size of 30.
 error: .debug_info: DIE 0xb (abbr. attribute 0xa): unresolved reference to .debug_line table 0x0.
 EOF
index 1e73d20789491be9cd5e679689b6aeafedeb445a..d6d2937fba46d3e532a3709abdd35241c7a11333 100755 (executable)
@@ -33,4 +33,5 @@ testrun_compare ./dwarflint debug_abbrev-duplicate-attribute <<EOF
 error: .debug_abbrev: abbr. attribute 0x19: duplicate attribute byte_size (first was at 0x13).
 error: .debug_abbrev: abbr. attribute 0x1b: duplicate attribute decl_file (first was at 0x15).
 error: .debug_abbrev: abbr. attribute 0x1d: duplicate attribute decl_line (first was at 0x17).
+warning: .debug_info: DIE 0xb: DW_AT_low_pc value not below DW_AT_high_pc.
 EOF