diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-02-07 17:06:29 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-02-07 17:06:29 +0000 |
commit | 13c3b5f5bbe5ad8aed357e17db7e7922bfd253d7 (patch) | |
tree | 1f3ec4c6ec974d49ea99c7ef409918510d7cc959 /gdb/value.c | |
parent | c4cf3821053bf03be5b25d63528c92d24c31f667 (diff) | |
download | gdb-13c3b5f5bbe5ad8aed357e17db7e7922bfd253d7.zip gdb-13c3b5f5bbe5ad8aed357e17db7e7922bfd253d7.tar.gz gdb-13c3b5f5bbe5ad8aed357e17db7e7922bfd253d7.tar.bz2 |
2005-02-07 Andrew Cagney <cagney@gnu.org>
* value.h (value_embedded_offset): Delete.
(value_embedded_offset): Declare.
* value.c (value_embedded_offset): Define.
* valops.c, p-valprint.c, mi/mi-main.c, hpacc-abi.c: Update.
* gnu-v3-abi.c, eval.c, c-valprint.c, cp-valprint.c: Update.
* cp-abi.h: Update.
Diffstat (limited to 'gdb/value.c')
-rw-r--r-- | gdb/value.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/gdb/value.c b/gdb/value.c index 0006a40..11cc4bc 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -97,7 +97,7 @@ allocate_value (struct type *type) VALUE_REGNUM (val) = -1; val->lazy = 0; val->optimized_out = 0; - VALUE_EMBEDDED_OFFSET (val) = 0; + val->embedded_offset = 0; VALUE_POINTED_TO_OFFSET (val) = 0; val->modifiable = 1; return val; @@ -210,6 +210,18 @@ set_value_optimized_out (struct value *value, int val) { value->optimized_out = val; } + +int +value_embedded_offset (struct value *value) +{ + return value->embedded_offset; +} + +void +set_value_embedded_offset (struct value *value, int val) +{ + value->embedded_offset = val; +} /* Return a mark in the value chain. All values allocated after the mark is obtained (except for those released) are subject to being freed @@ -315,7 +327,7 @@ value_copy (struct value *arg) VALUE_REGNUM (val) = VALUE_REGNUM (arg); val->lazy = arg->lazy; val->optimized_out = arg->optimized_out; - VALUE_EMBEDDED_OFFSET (val) = VALUE_EMBEDDED_OFFSET (arg); + val->embedded_offset = value_embedded_offset (arg); VALUE_POINTED_TO_OFFSET (val) = VALUE_POINTED_TO_OFFSET (arg); val->modifiable = arg->modifiable; if (!value_lazy (val)) @@ -1005,10 +1017,8 @@ value_primitive_field (struct value *arg1, int offset, memcpy (value_contents_all_raw (v), value_contents_all_raw (arg1), TYPE_LENGTH (value_enclosing_type (arg1))); v->offset = value_offset (arg1); - VALUE_EMBEDDED_OFFSET (v) - = offset + - VALUE_EMBEDDED_OFFSET (arg1) + - TYPE_FIELD_BITPOS (arg_type, fieldno) / 8; + v->embedded_offset = (offset + value_embedded_offset (arg1) + + TYPE_FIELD_BITPOS (arg_type, fieldno) / 8); } else { @@ -1022,7 +1032,7 @@ value_primitive_field (struct value *arg1, int offset, value_contents_raw (arg1) + offset, TYPE_LENGTH (type)); v->offset = (value_offset (arg1) + offset - + VALUE_EMBEDDED_OFFSET (arg1)); + + value_embedded_offset (arg1)); } VALUE_LVAL (v) = VALUE_LVAL (arg1); if (VALUE_LVAL (arg1) == lval_internalvar) |