From: Mark Wielaard Date: Fri, 1 Apr 2011 22:36:56 +0000 (+0200) Subject: dwarflint: check_dups_abstract_origin, be specific about GNU_call_site dups. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55ab44d1e5c08f9b68a730a70c740a2e519476f4;p=thirdparty%2Felfutils.git dwarflint: check_dups_abstract_origin, be specific about GNU_call_site dups. A call site entry has a DW_AT_low_pc attribute which is the return address after the call and a DW_AT_abstract_origin that is a pointer to the reference it calls directly or indirectly. So both may be available also at the abstract_origin (with different values). --- diff --git a/dwarflint/check_dups_abstract_origin.cc b/dwarflint/check_dups_abstract_origin.cc index 1499572ea..03b1c820e 100644 --- a/dwarflint/check_dups_abstract_origin.cc +++ b/dwarflint/check_dups_abstract_origin.cc @@ -59,10 +59,13 @@ namespace { // A call site entry has a DW_AT_low_pc attribute which is the return // address after the call and a DW_AT_abstract_origin that is a - // pointer to the reference it calls directly or indirectly. - if (tag == DW_TAG_GNU_call_site) - if (at == DW_AT_low_pc && from == DW_AT_abstract_origin) - return true; + // pointer to the reference it calls directly or indirectly. So + // both may be available also at the abstract_origin (with different + // values). + if (tag == DW_TAG_GNU_call_site + && (at == DW_AT_low_pc || at == DW_AT_abstract_origin) + && from == DW_AT_abstract_origin) + return true; return false; }