From a363ed8b8075b169c037f1fd4fd80d85f18a9d7e Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 18 Mar 2011 10:05:57 +0100 Subject: [PATCH] dwarflint: DW_AT_high_pc always has to be >= DW_AT_low_pc --- dwarflint/check_debug_info.cc | 2 +- dwarflint/tests/run-bad.sh | 3 +++ dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dwarflint/check_debug_info.cc b/dwarflint/check_debug_info.cc index e01b4c9c1..b64a82eb1 100644 --- a/dwarflint/check_debug_info.cc +++ b/dwarflint/check_debug_info.cc @@ -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; diff --git a/dwarflint/tests/run-bad.sh b/dwarflint/tests/run-bad.sh index fc14f8030..6e6db3ff3 100755 --- a/dwarflint/tests/run-bad.sh +++ b/dwarflint/tests/run-bad.sh @@ -47,6 +47,7 @@ error: .debug_info: DIE 0xab: toplevel DIE chain contains more than one DIE. EOF testrun_compare ./dwarflint empty-1 <