summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2011-02-16 18:42:29 +0100
committerMark Wielaard <mjw@redhat.com>2011-03-16 15:05:27 +0100
commit6119d0a9b815c1960b2d1051d79a0a337f306a0c (patch)
tree3e787d25b41a2c31e18697999e38664dddf1b988
parent4c6a8c74352f95bd4a39851ddc6ff936959f0d8f (diff)
downloadelfutils-6119d0a9b815c1960b2d1051d79a0a337f306a0c.tar.gz
Fetch local hash from pending or finalized entry die. Use it in attr_value.
-rw-r--r--libdw/c++/dwarf_output16
1 files changed, 12 insertions, 4 deletions
diff --git a/libdw/c++/dwarf_output b/libdw/c++/dwarf_output
index 401aec67..f121be0f 100644
--- a/libdw/c++/dwarf_output
+++ b/libdw/c++/dwarf_output
@@ -185,9 +185,7 @@ namespace elfutils
{
// Precompute our hash value based on our contents.
for (iterator i = begin (); i != end (); ++i)
- // XXX booo - still aren't handling circularity right...
- if (i->second.what_space () != dwarf::VS_reference)
- subr::hash_combine (_m_hash, *i);
+ subr::hash_combine (_m_hash, *i);
}
inline const _base &base () const
@@ -1402,8 +1400,18 @@ namespace elfutils
it != _m_children.end ();
++it)
{
+ // child lhash is always in the die_info, which might
+ // be in the pending_entry when not yet finalized, or
+ // part of the finalized child die_info.
size_t child_lhash;
- child_lhash = (*it)->_m_pending->_m_info->_m_local_hash;
+ struct pending_entry *pending = (*it)->_m_pending;
+ if (pending)
+ child_lhash = pending->_m_info->_m_local_hash;
+ else
+ {
+ die_info_pair *final_child = get_final_child (*it);
+ child_lhash = final_child->second._m_local_hash;
+ }
subr::hash_combine (children_hash, child_lhash);
}
subr::hash_combine (lhash, children_hash);