&file,
low_pc_symbol, high_pc_symbol,
"DW_AT_low_pc and DW_AT_high_pc");
- if (low_pc > 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))
wr_message (where, mc_die_other | mc_impact_3)
<< "DW_AT_low_pc value not below DW_AT_high_pc."
<< std::endl;
EOF
testrun_compare ./dwarflint --check=check_debug_info_refs check_debug_info_refs-2 <<EOF
+warning: .debug_info: DIE 0xb: DW_AT_low_pc value not below DW_AT_high_pc.
warning: .debug_info: CU 0: no aranges table is associated with this CU.
EOF
testfiles crc7.ko.debug
testrun_compare ./dwarflint --check check_duplicate_DW_tag_variable crc7.ko.debug <<EOF
+warning: .debug_info: DIE 0x40f1: DW_AT_low_pc value not below DW_AT_high_pc.
warning: .debug_info: CU 16614: no aranges table is associated with this CU.
error: .debug_info: DIE 0x3d21: Redeclaration of variable 'console_printk', originally seen at DIE 37f3.
error: .debug_info: DIE 0x3d2e: Redeclaration of variable 'hex_asc', originally seen at DIE 380b.
error: .debug_abbrev: abbr. attribute 0xa28: invalid or unknown name 0x2107.
error: .debug_abbrev: abbr. attribute 0x108e: invalid or unknown name 0x2107.
error: .debug_abbrev: abbr. attribute 0x1300: invalid or unknown name 0x2107.
+warning: .debug_info: DIE 0xd9a8: DW_AT_low_pc value not below DW_AT_high_pc.
+warning: .debug_info: DIE 0xdcd7: DW_AT_low_pc value not below DW_AT_high_pc.
warning: .debug_info: CU 55709: no aranges table is associated with this CU.
warning: .debug_info: CU 56524: no aranges table is associated with this CU.
EOF
# Here we test proper support for DW_AT_GNU_vector
testrun_compare ./dwarflint --check=@low --ignore-bloat libdl-2.12.so.debug <<EOF
+warning: .debug_info: DIE 0xd9a8: DW_AT_low_pc value not below DW_AT_high_pc.
+warning: .debug_info: DIE 0xdcd7: DW_AT_low_pc value not below DW_AT_high_pc.
warning: .debug_info: CU 55709: no aranges table is associated with this CU.
warning: .debug_info: CU 56524: no aranges table is associated with this CU.
EOF