mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 08:24:05 +08:00
gdb/
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user