]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: check_dups_abstract_origin, be specific about GNU_call_site dups.
authorMark Wielaard <mjw@redhat.com>
Fri, 1 Apr 2011 22:36:56 +0000 (00:36 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 1 Apr 2011 22:36:56 +0000 (00:36 +0200)
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).

dwarflint/check_dups_abstract_origin.cc

index 1499572ea3170565fe4f9dceff450f07c621e9b3..03b1c820ee8d1454bbbcec8ca52b4754df57760f 100644 (file)
@@ -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;
     }