+2005-02-07 Andrew Cagney <cagney@gnu.org>
+
+ * value.h (VALUE_LAZY): Delete
+ (set_value_lazy): Declare.
+ * value.c (set_value_lazy): Define.
+ * valops.c, valarith.c, jv-valprint.c, jv-lang.c: Update.
+ * gnu-v2-abi.c, findvar.c, dwarf2loc.c, ada-lang.c: Update.
+
2005-02-06 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_OPTIMIZED_OUT): Delete.
{
struct value *v = allocate_value (type);
if (valaddr == NULL)
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
else
memcpy (value_contents_raw (v), valaddr, TYPE_LENGTH (type));
VALUE_ADDRESS (v) = address;
VALUE_ADDRESS (result) = VALUE_ADDRESS (val) + value_offset (val);
if (value_lazy (val)
|| TYPE_LENGTH (type) > TYPE_LENGTH (value_type (val)))
- VALUE_LAZY (result) = 1;
+ set_value_lazy (result, 1);
else
memcpy (value_contents_raw (result), value_contents (val),
TYPE_LENGTH (type));
retval = allocate_value (SYMBOL_TYPE (var));
VALUE_LVAL (retval) = lval_memory;
- VALUE_LAZY (retval) = 1;
+ set_value_lazy (retval, 1);
VALUE_ADDRESS (retval) = address;
}
}
VALUE_ADDRESS (v) = addr;
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
return v;
}
if (!value_lazy (arg1))
{
- VALUE_LAZY (arg1) = 1;
+ set_value_lazy (arg1, 1);
value_fetch_lazy (arg1);
}
/* Java language support routines for GDB, the GNU debugger.
- Copyright 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+
+ Copyright 1997, 1998, 1999, 2000, 2003, 2004, 2005 Free Software
+ Foundation, Inc.
This file is part of GDB.
else
{ /* Re-use field value for next field. */
VALUE_ADDRESS (field) += TYPE_LENGTH (value_type (field));
- VALUE_LAZY (field) = 1;
+ set_value_lazy (field, 1);
}
temp = field;
temp = value_struct_elt (&temp, NULL, "name", NULL, "structure");
else
{ /* Re-use method value for next method. */
VALUE_ADDRESS (method) += TYPE_LENGTH (value_type (method));
- VALUE_LAZY (method) = 1;
+ set_value_lazy (method, 1);
}
/* Get method name. */
}
else
{
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
v->offset = 0;
}
for (reps = 1; i + reps < length; reps++)
{
- VALUE_LAZY (next_v) = 1;
+ set_value_lazy (next_v, 1);
next_v->offset += TYPE_LENGTH (el_type);
if (memcmp (value_contents (v), value_contents (next_v),
TYPE_LENGTH (el_type)) != 0)
v = allocate_value (elt_type);
if (value_lazy (array))
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
else
memcpy (value_contents_writeable (v),
value_contents (array) + elt_offs, elt_size);
VALUE_LVAL (val) = lval_memory;
VALUE_ADDRESS (val) = addr;
- VALUE_LAZY (val) = 1;
+ set_value_lazy (val, 1);
return val;
}
if (length)
read_memory (addr, value_contents_all_raw (val), length);
- VALUE_LAZY (val) = 0;
+ set_value_lazy (val, 0);
return 0;
}
VALUE_FRAME_ID (v2) = VALUE_FRAME_ID (arg1);
v2->offset = value_offset (arg1) + boffset;
if (value_lazy (arg1))
- VALUE_LAZY (v2) = 1;
+ set_value_lazy (v2, 1);
else
memcpy (value_contents_raw (v2),
value_contents_raw (arg1) + boffset,
TYPE_CODE (slice_type) = TYPE_CODE (array_type);
slice = allocate_value (slice_type);
if (value_lazy (array))
- VALUE_LAZY (slice) = 1;
+ set_value_lazy (slice, 1);
else
memcpy (value_contents_writeable (slice),
value_contents (array) + offset,
return value->lazy;
}
+void
+set_value_lazy (struct value *value, int val)
+{
+ value->lazy = val;
+}
+
const bfd_byte *
value_contents (struct value *value)
{
v = allocate_value (value_enclosing_type (arg1));
v->type = type;
if (value_lazy (arg1))
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
else
memcpy (value_contents_all_raw (v), value_contents_all_raw (arg1),
TYPE_LENGTH (value_enclosing_type (arg1)));
offset += TYPE_FIELD_BITPOS (arg_type, fieldno) / 8;
v = allocate_value (type);
if (value_lazy (arg1))
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
else
memcpy (value_contents_raw (v),
value_contents_raw (arg1) + offset,
extern struct type *value_enclosing_type (struct value *);
extern int value_lazy (struct value *);
-#define VALUE_LAZY(val) (val)->lazy
+extern void set_value_lazy (struct value *value, int val);
/* value_contents() and value_contents_raw() both return the address
of the gdb buffer used to hold a copy of the contents of the lval.