summaryrefslogtreecommitdiff
path: root/libdw/libdw_findcu.c
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2013-10-03 12:38:25 -0700
committerJosh Stone <jistone@redhat.com>2013-10-03 12:38:25 -0700
commit5dbbc5e32cc1fb3a7cf33e52e0bfc6f47097f3fe (patch)
tree7d2904feb5d3c00f8c6dde4bd284c9e95dbab241 /libdw/libdw_findcu.c
parentacf126799e73e10f571da6c9be487b84a0a46f23 (diff)
downloadelfutils-5dbbc5e32cc1fb3a7cf33e52e0bfc6f47097f3fe.tar.gz
libdw: Make sure that every debug_types sig8 is hashed
When dwarf_formref_die can't find a sig8 in the hash, it walks __libdw_intern_next_unit, and was then adding those to the hash. However, if dwarf_offdie_types is called earlier, which also uses that next_unit, then they are missed from the hash (and never revisited). This patch makes __libdw_intern_next_unit do the sig8 hash insert, so no type unit is ever missed. Signed-off-by: Josh Stone <jistone@redhat.com>
Diffstat (limited to 'libdw/libdw_findcu.c')
-rw-r--r--libdw/libdw_findcu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c
index 70e24a03..c0bff2af 100644
--- a/libdw/libdw_findcu.c
+++ b/libdw/libdw_findcu.c
@@ -110,6 +110,9 @@ __libdw_intern_next_unit (dbg, debug_types)
newp->lines = NULL;
newp->locs = NULL;
+ if (debug_types)
+ Dwarf_Sig8_Hash_insert (&dbg->sig8_hash, type_sig8, newp);
+
/* Add the new entry to the search tree. */
if (tsearch (newp, tree, findcu_cb) == NULL)
{