diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-02-07 15:04:43 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-02-07 15:04:43 +0000 |
commit | dfa52d88e70f7149def79ecf95faea9f87477df4 (patch) | |
tree | bfed4ca0cf97d3b1c3b1cae9aa795e0d76f663e8 | |
parent | 303e4c21e7c9ddd98c577051f5c477f11a5c06ec (diff) | |
download | binutils-gdb-dfa52d88e70f7149def79ecf95faea9f87477df4.tar.gz |
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.
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/ada-lang.c | 4 | ||||
-rw-r--r-- | gdb/dwarf2loc.c | 2 | ||||
-rw-r--r-- | gdb/findvar.c | 2 | ||||
-rw-r--r-- | gdb/gnu-v2-abi.c | 2 | ||||
-rw-r--r-- | gdb/jv-lang.c | 8 | ||||
-rw-r--r-- | gdb/jv-valprint.c | 4 | ||||
-rw-r--r-- | gdb/valarith.c | 2 | ||||
-rw-r--r-- | gdb/valops.c | 8 | ||||
-rw-r--r-- | gdb/value.c | 10 | ||||
-rw-r--r-- | gdb/value.h | 2 |
11 files changed, 34 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6c203951dd8..b2920e8ca77 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 799d01f1a96..222ead4283b 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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)); diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 037adf33078..acdbb1c95ab 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -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; } diff --git a/gdb/findvar.c b/gdb/findvar.c index aff138aa117..56d46fe9f23 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -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; } diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c index 4d932c465ac..c5557860f02 100644 --- a/gdb/gnu-v2-abi.c +++ b/gdb/gnu-v2-abi.c @@ -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); } diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index cd7c32693a9..bc2264f10c4 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -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. */ diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index 040b3038000..2d20805e0e1 100644 --- a/gdb/jv-valprint.c +++ b/gdb/jv-valprint.c @@ -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) diff --git a/gdb/valarith.c b/gdb/valarith.c index 59dde3eef5a..9bfe26b530d 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -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); diff --git a/gdb/valops.c b/gdb/valops.c index a30123d7497..8aa44133299 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -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, diff --git a/gdb/value.c b/gdb/value.c index cf9e137d1d5..0006a40eedb 100644 --- a/gdb/value.c +++ b/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, diff --git a/gdb/value.h b/gdb/value.h index 0a3d6af80bb..ae17cd2c907 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -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. |