e.g. in case the type is a variable length array. */
static struct value *
-get_value_at (struct type *type, CORE_ADDR addr, int lazy)
+get_value_at (struct type *type, CORE_ADDR addr, frame_info_ptr frame,
+ int lazy)
{
struct value *val;
if (check_typedef (type)->code () == TYPE_CODE_VOID)
error (_("Attempt to dereference a generic pointer."));
- val = value_from_contents_and_address (type, NULL, addr);
+ val = value_from_contents_and_address (type, NULL, addr, frame);
if (!lazy)
val->fetch_lazy ();
struct value *
value_at (struct type *type, CORE_ADDR addr)
{
- return get_value_at (type, addr, 0);
+ return get_value_at (type, addr, nullptr, 0);
}
/* See value.h. */
e.g. in case the type is a variable length array. */
struct value *
-value_at_lazy (struct type *type, CORE_ADDR addr)
+value_at_lazy (struct type *type, CORE_ADDR addr, frame_info_ptr frame)
{
- return get_value_at (type, addr, 1);
+ return get_value_at (type, addr, frame, 1);
}
void
struct value *
value_from_contents_and_address (struct type *type,
const gdb_byte *valaddr,
- CORE_ADDR address)
+ CORE_ADDR address,
+ frame_info_ptr frame)
{
gdb::array_view<const gdb_byte> view;
if (valaddr != nullptr)
view = gdb::make_array_view (valaddr, type->length ());
- struct type *resolved_type = resolve_dynamic_type (type, view, address);
+ struct type *resolved_type = resolve_dynamic_type (type, view, address,
+ &frame);
struct type *resolved_type_no_typedef = check_typedef (resolved_type);
struct value *v;
extern struct value *value_from_mpz (struct type *type, const gdb_mpz &v);
extern struct value *value_at (struct type *type, CORE_ADDR addr);
-extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr);
+
+/* Return a new value given a type and an address. The new value is
+ lazy. If FRAME is given, it is used when resolving dynamic
+ properties. */
+
+extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr,
+ frame_info_ptr frame = nullptr);
/* Like value_at, but ensures that the result is marked not_lval.
This can be important if the memory is "volatile". */
extern struct value *value_from_contents_and_address_unresolved
(struct type *, const gdb_byte *, CORE_ADDR);
-extern struct value *value_from_contents_and_address (struct type *,
- const gdb_byte *,
- CORE_ADDR);
+extern struct value *value_from_contents_and_address
+ (struct type *, const gdb_byte *, CORE_ADDR,
+ frame_info_ptr frame = nullptr);
extern struct value *value_from_contents (struct type *, const gdb_byte *);
extern struct value *default_value_from_register (struct gdbarch *gdbarch,