Remove excessive DWARF expressions memory duplication.
	* dwarf2loc.c (per_cu_dwarf_call): Remove variable back_to and its use
	for block.data.
	(indirect_pieced_value): Remove variable result.  Remove variable
	back_to and its use for baton.data.
	(dwarf2_compile_expr_to_ax): Remove variable back_to and its use for
	block.data.
	* dwarf2read.c (dwarf2_fetch_die_location_block): Remove xmemdup.
	Update the function comment.
This commit is contained in:
Jan Kratochvil
2011-09-13 21:44:27 +00:00
parent 0935723e5e
commit d83e736b11
3 changed files with 18 additions and 26 deletions

View File

@ -13854,9 +13854,9 @@ follow_die_ref (struct die_info *src_die, struct attribute *attr,
return die;
}
/* Return DWARF block and its CU referenced by OFFSET at PER_CU. Returned
value is intended for DW_OP_call*. You must call xfree on returned
dwarf2_locexpr_baton->data. */
/* Return DWARF block referenced by DW_AT_location of DIE at OFFSET at PER_CU.
Returned value is intended for DW_OP_call*. Returned
dwarf2_locexpr_baton->data has lifetime of PER_CU->OBJFILE. */
struct dwarf2_locexpr_baton
dwarf2_fetch_die_location_block (unsigned int offset,
@ -13912,9 +13912,6 @@ dwarf2_fetch_die_location_block (unsigned int offset,
}
retval.per_cu = cu->per_cu;
if (retval.data)
retval.data = xmemdup (retval.data, retval.size, retval.size);
age_cached_comp_units ();
return retval;