summaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2008-04-30 21:13:49 +0000
committerDaniel Jacobowitz <dan@debian.org>2008-04-30 21:13:49 +0000
commitbe5be63dd2764c539175f2e15399ba72a42d3d90 (patch)
tree13e0e4f9c808546bc1b23a64809bd807a30bb9f2 /gdb/value.c
parent01024e12ed757c86a6d3f5f2df1a11ec38517b49 (diff)
downloadgdb-be5be63dd2764c539175f2e15399ba72a42d3d90.tar.gz
* ada-lang.c (ada_value_primitive_packed_val): Only check
value_lazy for memory lvals. * findvar.c (value_of_register_lazy): New function. (locate_var_value): Only check value_lazy for memory lvals. * valarith.c (value_subscripted_rvalue): Likewise. * valops.c (value_fetch_lazy): Handle both memory and register lvals. (search_struct_field, value_slice): Only check value_lazy for memory lvals. * value.c (struct value): Update comment for lazy. (value_primitive_field): Only check value_lazy for memory lvals. * value.h (value_lazy): Update comment. (value_of_register_lazy): Declare.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 2cb989d6365..52d003083ba 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -137,9 +137,9 @@ struct value
short regnum;
/* If zero, contents of this value are in the contents field. If
- nonzero, contents are in inferior memory at address in the
- location.address field plus the offset field (and the lval field
- should be lval_memory).
+ nonzero, contents are in inferior. If the lval field is lval_memory,
+ the contents are in inferior memory at location.address plus offset.
+ The lval field may also be lval_register.
WARNING: This field is used by the code which handles watchpoints
(see breakpoint.c) to decide whether a particular value can be
@@ -1353,7 +1353,7 @@ value_primitive_field (struct value *arg1, int offset,
bases, etc. */
v = allocate_value (value_enclosing_type (arg1));
v->type = type;
- if (value_lazy (arg1))
+ if (VALUE_LVAL (arg1) == lval_memory && value_lazy (arg1))
set_value_lazy (v, 1);
else
memcpy (value_contents_all_raw (v), value_contents_all_raw (arg1),
@@ -1367,7 +1367,7 @@ value_primitive_field (struct value *arg1, int offset,
/* Plain old data member */
offset += TYPE_FIELD_BITPOS (arg_type, fieldno) / 8;
v = allocate_value (type);
- if (value_lazy (arg1))
+ if (VALUE_LVAL (arg1) == lval_memory && value_lazy (arg1))
set_value_lazy (v, 1);
else
memcpy (value_contents_raw (v),