This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Dig further in dwarf_hasattr_integrate


The function dwarf_hasattr_integrate currently only dereferences
DW_AT_abstract_origin.  Its twin dwarf_attr_integrate will also check
DW_AT_specification, so this patch makes hasattr follow suit.

Signed-off-by: Josh Stone <jistone@redhat.com>
---
 libdw/ChangeLog                 |    4 ++++
 libdw/dwarf_hasattr_integrate.c |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index c2f66cb..82a7a4a 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,7 @@
+2009-08-21  Josh Stone  <jistone@redhat.com>
+
+	* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
+
 2009-08-10  Roland McGrath  <roland@redhat.com>
 
 	* dwarf_getscopevar.c: Use dwarf_diename.
diff --git a/libdw/dwarf_hasattr_integrate.c b/libdw/dwarf_hasattr_integrate.c
index 12b4863..806742d 100644
--- a/libdw/dwarf_hasattr_integrate.c
+++ b/libdw/dwarf_hasattr_integrate.c
@@ -68,6 +68,8 @@ dwarf_hasattr_integrate (Dwarf_Die *die, unsigned int search_name)
       Dwarf_Attribute *attr = INTUSE(dwarf_attr) (die, DW_AT_abstract_origin,
 						  &attr_mem);
       if (attr == NULL)
+	attr = INTUSE(dwarf_attr) (die, DW_AT_specification, &attr_mem);
+      if (attr == NULL)
 	break;
 
       die = INTUSE(dwarf_formref_die) (attr, &die_mem);
-- 
1.6.2.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]