+2013-08-29 Sanimir Agovic <sanimir.agovic@intel.com>
+
+ * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use value_at_lazy instead
+ of assembling value via allocate_value_lazy and attribute setter.
+ * findvar.c (default_read_var_value): Use value_at_lazy instead of
+ assembling value via allocate_value_lazy and attribute setter.
+ * valops.c (do_search_struct_field): Use value_at_lazy instead of
+ assembling value via allocate_value_lazy and attribute setter.
+
2013-08-29 Sanimir Agovic <sanimir.agovic@intel.com>
* value.c (value_from_contents_and_address): Replace allocate_value and
int in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
do_cleanups (value_chain);
- retval = allocate_value_lazy (type);
- VALUE_LVAL (retval) = lval_memory;
+ retval = value_at_lazy (type, address + byte_offset);
if (in_stack_memory)
set_value_stack (retval, 1);
- set_value_address (retval, address + byte_offset);
}
break;
return v;
case LOC_STATIC:
- v = allocate_value_lazy (type);
if (overlay_debugging)
addr = symbol_overlayed_address (SYMBOL_VALUE_ADDRESS (var),
SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (var),
error (_("Unknown argument list address for `%s'."),
SYMBOL_PRINT_NAME (var));
addr += SYMBOL_VALUE (var);
- v = allocate_value_lazy (type);
break;
case LOC_REF_ARG:
argref += SYMBOL_VALUE (var);
ref = value_at (lookup_pointer_type (type), argref);
addr = value_as_address (ref);
- v = allocate_value_lazy (type);
break;
}
case LOC_LOCAL:
addr = get_frame_locals_address (frame);
addr += SYMBOL_VALUE (var);
- v = allocate_value_lazy (type);
break;
case LOC_TYPEDEF:
break;
case LOC_BLOCK:
- v = allocate_value_lazy (type);
if (overlay_debugging)
addr = symbol_overlayed_address
(BLOCK_START (SYMBOL_BLOCK_VALUE (var)), SYMBOL_OBJ_SECTION (SYMBOL_OBJFILE (var),
SYMBOL_PRINT_NAME (var));
addr = value_as_address (regval);
- v = allocate_value_lazy (type);
}
else
{
if (obj_section
&& (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
addr = target_translate_tls_address (obj_section->objfile, addr);
- v = allocate_value_lazy (type);
}
break;
break;
}
- VALUE_LVAL (v) = lval_memory;
- set_value_address (v, addr);
+ v = value_at_lazy (type, addr);
return v;
}
{
CORE_ADDR base_addr;
- v2 = allocate_value (basetype);
base_addr = value_address (arg1) + boffset;
+ v2 = value_at_lazy (basetype, base_addr);
if (target_read_memory (base_addr,
value_contents_raw (v2),
- TYPE_LENGTH (basetype)) != 0)
+ TYPE_LENGTH (value_type (basetype))) != 0)
error (_("virtual baseclass botch"));
- VALUE_LVAL (v2) = lval_memory;
- set_value_address (v2, base_addr);
}
else
{