dwarf2_evaluate_loc_desc returns a value representing a variable at
that address. The frame base address is thus this variable's
address. */
- return value_address (result);
+ return result->address ();
}
/* Vector for inferior functions as represented by LOC_BLOCK, if the inferior
dwarf2_evaluate_loc_desc returns a value representing a variable at
that address. The frame base address is thus this variable's
address. */
- return value_address (result);
+ return result->address ();
}
/* Vector for inferior functions as represented by LOC_BLOCK, if the inferior
dwarf_block->per_objfile);
/* DW_AT_call_target is a DWARF expression, not a DWARF location. */
if (VALUE_LVAL (val) == lval_memory)
- callback (value_address (val));
+ callback (val->address ());
else
callback (value_as_address (val));
}
case call_site_target::PHYSADDR:
{
dwarf2_per_objfile *per_objfile = call_site->per_objfile;
- compunit_symtab *cust = per_objfile->get_symtab (call_site->per_cu);
- int sect_idx = cust->block_line_section ();
- CORE_ADDR delta = per_objfile->objfile->section_offsets[sect_idx];
+ CORE_ADDR delta = per_objfile->objfile->text_section_offset ();
callback (m_loc.physaddr + delta);
}
case call_site_target::ADDRESSES:
{
dwarf2_per_objfile *per_objfile = call_site->per_objfile;
- compunit_symtab *cust = per_objfile->get_symtab (call_site->per_cu);
- int sect_idx = cust->block_line_section ();
- CORE_ADDR delta = per_objfile->objfile->section_offsets[sect_idx];
+ CORE_ADDR delta = per_objfile->objfile->text_section_offset ();
for (unsigned i = 0; i < m_loc.addresses.length; ++i)
callback (m_loc.addresses.values[i] + delta);
static struct value *
entry_data_value_coerce_ref (const struct value *value)
{
- struct type *checked_type = check_typedef (value_type (value));
+ struct type *checked_type = check_typedef (value->type ());
struct value *target_val;
if (!TYPE_IS_REFERENCE (checked_type))
return NULL;
- target_val = (struct value *) value_computed_closure (value);
- value_incref (target_val);
+ target_val = (struct value *) value->computed_closure ();
+ target_val->incref ();
return target_val;
}
static void *
entry_data_value_copy_closure (const struct value *v)
{
- struct value *target_val = (struct value *) value_computed_closure (v);
+ struct value *target_val = (struct value *) v->computed_closure ();
- value_incref (target_val);
+ target_val->incref ();
return target_val;
}
static void
entry_data_value_free_closure (struct value *v)
{
- struct value *target_val = (struct value *) value_computed_closure (v);
+ struct value *target_val = (struct value *) v->computed_closure ();
- value_decref (target_val);
+ target_val->decref ();
}
/* Vector for methods for an entry value reference where the referenced value
caller_per_cu,
caller_per_objfile);
- val = allocate_computed_value (type, &entry_data_value_funcs,
+ val = value::allocate_computed (type, &entry_data_value_funcs,
release_value (target_val).release ());
/* Copy the referencing pointer to the new computed value. */
- memcpy (value_contents_raw (val).data (),
- value_contents_raw (outer_val).data (),
+ memcpy (val->contents_raw ().data (),
+ outer_val->contents_raw ().data (),
checked_type->length ());
- set_value_lazy (val, 0);
+ val->set_lazy (0);
return val;
}
invalid_synthetic_pointer ();
}
else
- result = allocate_optimized_out_value (type->target_type ());
+ result = value::allocate_optimized_out (type->target_type ());
return result;
}
invalid_synthetic_pointer ();
if (size == 0)
- return allocate_optimized_out_value (subobj_type);
+ return value::allocate_optimized_out (subobj_type);
dwarf_expr_context ctx (per_objfile, per_cu->addr_size ());
if (ex.error == NOT_AVAILABLE_ERROR)
{
free_values.free_to_mark ();
- retval = allocate_value (subobj_type);
- mark_value_bytes_unavailable (retval, 0,
- subobj_type->length ());
+ retval = value::allocate (subobj_type);
+ retval->mark_bytes_unavailable (0,
+ subobj_type->length ());
return retval;
}
else if (ex.error == NO_ENTRY_VALUE_ERROR)
if (entry_values_debug)
exception_print (gdb_stdout, ex);
free_values.free_to_mark ();
- return allocate_optimized_out_value (subobj_type);
+ return value::allocate_optimized_out (subobj_type);
}
else
throw;
value_ref_ptr value_holder = value_ref_ptr::new_reference (retval);
free_values.free_to_mark ();
- return value_copy (retval);
+ return retval->copy ();
}
/* The exported interface to dwarf2_evaluate_loc_desc_full; it always
throw;
}
- if (value_optimized_out (result))
+ if (result->optimized_out ())
return 0;
if (VALUE_LVAL (result) == lval_memory)
- *valp = value_address (result);
+ *valp = result->address ();
else
{
if (VALUE_LVAL (result) == not_lval)
val = dwarf2_evaluate_loc_desc (baton->property_type, frame, data,
size, baton->loclist.per_cu,
baton->loclist.per_objfile);
- if (!value_optimized_out (val))
+ if (!val->optimized_out ())
{
*value = value_as_address (val);
return true;
CORE_ADDR pc;
if (frame == NULL || !get_frame_func_if_available (frame, &pc))
- return allocate_optimized_out_value (symbol->type ());
+ return value::allocate_optimized_out (symbol->type ());
data = dwarf2_find_location_expression (dlbaton, &size, pc);
if (data == NULL)
- return allocate_optimized_out_value (symbol->type ());
+ return value::allocate_optimized_out (symbol->type ());
return value_of_dwarf_block_entry (symbol->type (), frame, data, size);
}