aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-07 20:17:28 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-07 20:17:28 +0000
commitb44d461b0ebcb9f30595e5c3e4c748775349ecf1 (patch)
tree5516e9a3e7396b8030af773272ece7280c8f11b1 /gdb/value.c
parent4ee4d24937d552e97baee32e10575e716707226c (diff)
downloadgdb-b44d461b0ebcb9f30595e5c3e4c748775349ecf1.zip
gdb-b44d461b0ebcb9f30595e5c3e4c748775349ecf1.tar.gz
gdb-b44d461b0ebcb9f30595e5c3e4c748775349ecf1.tar.bz2
2005-02-07 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_POINTED_TO_OFFSET): Delete. (set_value_pointed_to_offset, value_pointed_to_offset): Declare. * value.c (set_value_pointed_to_offset): Define (value_pointed_to_offset): Define. * valops.c: Update.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 11cc4bc..4bc26ff 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -98,7 +98,7 @@ allocate_value (struct type *type)
val->lazy = 0;
val->optimized_out = 0;
val->embedded_offset = 0;
- VALUE_POINTED_TO_OFFSET (val) = 0;
+ val->pointed_to_offset = 0;
val->modifiable = 1;
return val;
}
@@ -222,6 +222,18 @@ set_value_embedded_offset (struct value *value, int val)
{
value->embedded_offset = val;
}
+
+int
+value_pointed_to_offset (struct value *value)
+{
+ return value->pointed_to_offset;
+}
+
+void
+set_value_pointed_to_offset (struct value *value, int val)
+{
+ value->pointed_to_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
@@ -328,7 +340,7 @@ value_copy (struct value *arg)
val->lazy = arg->lazy;
val->optimized_out = arg->optimized_out;
val->embedded_offset = value_embedded_offset (arg);
- VALUE_POINTED_TO_OFFSET (val) = VALUE_POINTED_TO_OFFSET (arg);
+ val->pointed_to_offset = arg->pointed_to_offset;
val->modifiable = arg->modifiable;
if (!value_lazy (val))
{