result->fake_loc_cu->offset_size = 4;
result->fake_loc_cu->version = 4;
result->fake_loc_cu->split = NULL;
- result->fake_loc_cu->locs_tree.root = NULL;
+ eu_search_tree_init (&result->fake_loc_cu->locs_tree);
}
}
result->fake_loclists_cu->offset_size = 4;
result->fake_loclists_cu->version = 5;
result->fake_loclists_cu->split = NULL;
- result->fake_loclists_cu->locs_tree.root = NULL;
+ eu_search_tree_init (&result->fake_loclists_cu->locs_tree);
}
}
result->fake_addr_cu->offset_size = 4;
result->fake_addr_cu->version = 5;
result->fake_addr_cu->split = NULL;
- result->fake_addr_cu->locs_tree.root = NULL;
+ eu_search_tree_init (&result->fake_addr_cu->locs_tree);
}
}
cu_free (void *arg)
{
struct Dwarf_CU *p = (struct Dwarf_CU *) arg;
+ eu_search_tree_fini (&p->locs_tree, noop_free);
/* Only free the CU internals if its not a fake CU. */
if (p != p->dbg->fake_loc_cu && p != p->dbg->fake_loclists_cu
&& p != p->dbg->fake_addr_cu)
{
Dwarf_Abbrev_Hash_free (&p->abbrev_hash);
- eu_search_tree_fini (&p->locs_tree, noop_free);
/* Free split dwarf one way (from skeleton to split). */
if (p->unit_type == DW_UT_skeleton
if (die == NULL)
return 0;
- //rwlock_wrlock(die_abbrev_lock);
-
/* Find the abbreviation entry. */
Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL);
- //rwlock_unlock(die_abbrev_lock);
-
if (unlikely (abbrevp == DWARF_END_ABBREV))
{
__libdw_seterrno (DWARF_E_INVALID_DWARF);
internal_function
__libdw_find_split_unit (Dwarf_CU *cu)
{
- rwlock_unlock(cu_split_lock);
+ rwlock_wrlock(cu_split_lock);
/* Only try once. */
if (cu->split != (Dwarf_CU *) -1)
}
}
- rwlock_wrlock(cu_split_lock);
-
/* If we found nothing, make sure we don't try again. */
if (cu->split == (Dwarf_CU *) -1)
cu->split = NULL;
newp->orig_abbrev_offset = newp->last_abbrev_offset = abbrev_offset;
newp->files = NULL;
newp->lines = NULL;
- newp->locs_tree.root = NULL;
- rwlock_init (newp->locs_tree.lock);
newp->split = (Dwarf_CU *) -1;
newp->base_address = (Dwarf_Addr) -1;
newp->addr_base = (Dwarf_Off) -1;
newp->startp = data->d_buf + newp->start;
newp->endp = data->d_buf + newp->end;
+ eu_search_tree_init (&newp->locs_tree);
/* v4 debug type units have version == 4 and unit_type == DW_UT_type. */
if (debug_types)