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.
This commit is contained in:
parent
303e4c21e7
commit
dfa52d88e7
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
@ -420,7 +420,7 @@ value_from_contents_and_address (struct type *type,
|
||||
{
|
||||
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;
|
||||
@ -453,7 +453,7 @@ coerce_unspec_val_to_type (struct value *val, struct type *type)
|
||||
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));
|
||||
|
@ -250,7 +250,7 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
|
||||
|
||||
retval = allocate_value (SYMBOL_TYPE (var));
|
||||
VALUE_LVAL (retval) = lval_memory;
|
||||
VALUE_LAZY (retval) = 1;
|
||||
set_value_lazy (retval, 1);
|
||||
VALUE_ADDRESS (retval) = address;
|
||||
}
|
||||
|
||||
|
@ -585,7 +585,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i
|
||||
}
|
||||
|
||||
VALUE_ADDRESS (v) = addr;
|
||||
VALUE_LAZY (v) = 1;
|
||||
set_value_lazy (v, 1);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
|
||||
|
||||
if (!value_lazy (arg1))
|
||||
{
|
||||
VALUE_LAZY (arg1) = 1;
|
||||
set_value_lazy (arg1, 1);
|
||||
value_fetch_lazy (arg1);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
/* 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.
|
||||
|
||||
@ -439,7 +441,7 @@ java_link_class_type (struct type *type, struct value *clas)
|
||||
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");
|
||||
@ -509,7 +511,7 @@ java_link_class_type (struct type *type, struct value *clas)
|
||||
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. */
|
||||
|
@ -162,7 +162,7 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
|
||||
}
|
||||
else
|
||||
{
|
||||
VALUE_LAZY (v) = 1;
|
||||
set_value_lazy (v, 1);
|
||||
v->offset = 0;
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ java_value_print (struct value *val, struct ui_file *stream, int format,
|
||||
|
||||
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)
|
||||
|
@ -269,7 +269,7 @@ value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound
|
||||
|
||||
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);
|
||||
|
@ -478,7 +478,7 @@ value_at_lazy (struct type *type, CORE_ADDR addr)
|
||||
|
||||
VALUE_LVAL (val) = lval_memory;
|
||||
VALUE_ADDRESS (val) = addr;
|
||||
VALUE_LAZY (val) = 1;
|
||||
set_value_lazy (val, 1);
|
||||
|
||||
return val;
|
||||
}
|
||||
@ -506,7 +506,7 @@ value_fetch_lazy (struct value *val)
|
||||
if (length)
|
||||
read_memory (addr, value_contents_all_raw (val), length);
|
||||
|
||||
VALUE_LAZY (val) = 0;
|
||||
set_value_lazy (val, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1311,7 +1311,7 @@ search_struct_field (char *name, struct value *arg1, int offset,
|
||||
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,
|
||||
@ -2762,7 +2762,7 @@ value_slice (struct value *array, int lowbound, int length)
|
||||
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,
|
||||
|
10
gdb/value.c
10
gdb/value.c
@ -179,6 +179,12 @@ value_lazy (struct value *value)
|
||||
return value->lazy;
|
||||
}
|
||||
|
||||
void
|
||||
set_value_lazy (struct value *value, int val)
|
||||
{
|
||||
value->lazy = val;
|
||||
}
|
||||
|
||||
const bfd_byte *
|
||||
value_contents (struct value *value)
|
||||
{
|
||||
@ -994,7 +1000,7 @@ value_primitive_field (struct value *arg1, int offset,
|
||||
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)));
|
||||
@ -1010,7 +1016,7 @@ value_primitive_field (struct value *arg1, int offset,
|
||||
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,
|
||||
|
@ -180,7 +180,7 @@ extern int value_offset (struct value *);
|
||||
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user