This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] VALUE_LAZY -> set_value_lazy
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 07 Feb 2005 10:05:50 -0500
- Subject: [commit] VALUE_LAZY -> set_value_lazy
This gets rid of the remainder.
Andrew
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.
Index: ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.71
diff -p -u -r1.71 ada-lang.c
--- ada-lang.c 7 Feb 2005 00:09:51 -0000 1.71
+++ ada-lang.c 7 Feb 2005 15:03:02 -0000
@@ -420,7 +420,7 @@ value_from_contents_and_address (struct
{
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
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));
Index: dwarf2loc.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.19
diff -p -u -r1.19 dwarf2loc.c
--- dwarf2loc.c 7 Feb 2005 04:50:27 -0000 1.19
+++ dwarf2loc.c 7 Feb 2005 15:03:02 -0000
@@ -250,7 +250,7 @@ dwarf2_evaluate_loc_desc (struct symbol
retval = allocate_value (SYMBOL_TYPE (var));
VALUE_LVAL (retval) = lval_memory;
- VALUE_LAZY (retval) = 1;
+ set_value_lazy (retval, 1);
VALUE_ADDRESS (retval) = address;
}
Index: findvar.c
===================================================================
RCS file: /cvs/src/src/gdb/findvar.c,v
retrieving revision 1.85
diff -p -u -r1.85 findvar.c
--- findvar.c 7 Feb 2005 04:50:27 -0000 1.85
+++ findvar.c 7 Feb 2005 15:03:02 -0000
@@ -585,7 +585,7 @@ addresses have not been bound by the dyn
}
VALUE_ADDRESS (v) = addr;
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
return v;
}
Index: gnu-v2-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v2-abi.c,v
retrieving revision 1.18
diff -p -u -r1.18 gnu-v2-abi.c
--- gnu-v2-abi.c 2 Feb 2005 22:34:34 -0000 1.18
+++ gnu-v2-abi.c 7 Feb 2005 15:03:02 -0000
@@ -166,7 +166,7 @@ gnuv2_virtual_fn_field (struct value **a
if (!value_lazy (arg1))
{
- VALUE_LAZY (arg1) = 1;
+ set_value_lazy (arg1, 1);
value_fetch_lazy (arg1);
}
Index: jv-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-lang.c,v
retrieving revision 1.38
diff -p -u -r1.38 jv-lang.c
--- jv-lang.c 12 Nov 2004 21:45:06 -0000 1.38
+++ jv-lang.c 7 Feb 2005 15:03:02 -0000
@@ -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,
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,
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. */
Index: jv-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-valprint.c,v
retrieving revision 1.21
diff -p -u -r1.21 jv-valprint.c
--- jv-valprint.c 7 Feb 2005 00:09:54 -0000 1.21
+++ jv-valprint.c 7 Feb 2005 15:03:02 -0000
@@ -162,7 +162,7 @@ java_value_print (struct value *val, str
}
else
{
- VALUE_LAZY (v) = 1;
+ set_value_lazy (v, 1);
v->offset = 0;
}
@@ -170,7 +170,7 @@ java_value_print (struct value *val, str
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)
Index: valarith.c
===================================================================
RCS file: /cvs/src/src/gdb/valarith.c,v
retrieving revision 1.34
diff -p -u -r1.34 valarith.c
--- valarith.c 7 Feb 2005 00:09:55 -0000 1.34
+++ valarith.c 7 Feb 2005 15:03:02 -0000
@@ -269,7 +269,7 @@ value_subscripted_rvalue (struct value *
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);
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.145
diff -p -u -r1.145 valops.c
--- valops.c 7 Feb 2005 00:09:55 -0000 1.145
+++ valops.c 7 Feb 2005 15:03:02 -0000
@@ -478,7 +478,7 @@ value_at_lazy (struct type *type, CORE_A
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_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 lo
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,
Index: value.c
===================================================================
RCS file: /cvs/src/src/gdb/value.c,v
retrieving revision 1.13
diff -p -u -r1.13 value.c
--- value.c 7 Feb 2005 04:50:28 -0000 1.13
+++ value.c 7 Feb 2005 15:03:02 -0000
@@ -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 *arg
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 *arg
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,
Index: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.71
diff -p -u -r1.71 value.h
--- value.h 7 Feb 2005 04:50:28 -0000 1.71
+++ value.h 7 Feb 2005 15:03:02 -0000
@@ -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.