aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-07 04:50:28 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-07 04:50:28 +0000
commitfeb13ab03fc262ada6379aa92441e48e93b29f0a (patch)
tree5429b61e91a73155efcfeb6370e056849ed82e5e /gdb/value.c
parenta779d8fa1338d1d53d2010f93df96696cbec54ae (diff)
downloadgdb-feb13ab03fc262ada6379aa92441e48e93b29f0a.zip
gdb-feb13ab03fc262ada6379aa92441e48e93b29f0a.tar.gz
gdb-feb13ab03fc262ada6379aa92441e48e93b29f0a.tar.bz2
2005-02-06 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_OPTIMIZED_OUT): Delete. (value_optimized_out, set_value_optimized_out): Declare. * value.c (set_value_optimized_out, value_optimized_out): Define. * valprint.c, findvar.c, dwarf2loc.c: Update.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/value.c b/gdb/value.c
index fecbbf5..cf9e137 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -96,7 +96,7 @@ allocate_value (struct type *type)
val->bitsize = 0;
VALUE_REGNUM (val) = -1;
val->lazy = 0;
- VALUE_OPTIMIZED_OUT (val) = 0;
+ val->optimized_out = 0;
VALUE_EMBEDDED_OFFSET (val) = 0;
VALUE_POINTED_TO_OFFSET (val) = 0;
val->modifiable = 1;
@@ -193,6 +193,17 @@ value_contents_writeable (struct value *value)
return value->aligner.contents;
}
+int
+value_optimized_out (struct value *value)
+{
+ return value->optimized_out;
+}
+
+void
+set_value_optimized_out (struct value *value, int val)
+{
+ value->optimized_out = 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
@@ -297,7 +308,7 @@ value_copy (struct value *arg)
VALUE_FRAME_ID (val) = VALUE_FRAME_ID (arg);
VALUE_REGNUM (val) = VALUE_REGNUM (arg);
val->lazy = arg->lazy;
- VALUE_OPTIMIZED_OUT (val) = VALUE_OPTIMIZED_OUT (arg);
+ val->optimized_out = arg->optimized_out;
VALUE_EMBEDDED_OFFSET (val) = VALUE_EMBEDDED_OFFSET (arg);
VALUE_POINTED_TO_OFFSET (val) = VALUE_POINTED_TO_OFFSET (arg);
val->modifiable = arg->modifiable;