aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-06-11 19:59:09 +0000
committerDaniel Jacobowitz <drow@false.org>2008-06-11 19:59:09 +0000
commita4e2ee12f0631722c380973c0336dd165fd0137d (patch)
tree205a624165b41e9893846e6747feaa8ba6b4a9b5 /gdb
parentb4aa76f032b38c1a294755439d282fd02e488192 (diff)
downloadgdb-a4e2ee12f0631722c380973c0336dd165fd0137d.zip
gdb-a4e2ee12f0631722c380973c0336dd165fd0137d.tar.gz
gdb-a4e2ee12f0631722c380973c0336dd165fd0137d.tar.bz2
* value.c (value_primitive_field): Fetch lazy register values.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/value.c14
2 files changed, 16 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cf2eefe..80160aa 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2008-06-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * value.c (value_primitive_field): Fetch lazy register values.
+
2008-06-11 Pedro Alves <pedro@codesourcery.com>
* NEWS: Mention support removal of undocumented S AA p PID stop
diff --git a/gdb/value.c b/gdb/value.c
index 71ddf5c..b38bae0 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1354,7 +1354,12 @@ value_primitive_field (struct value *arg1, int offset,
bases, etc. */
v = allocate_value (value_enclosing_type (arg1));
v->type = type;
- if (VALUE_LVAL (arg1) == lval_memory && value_lazy (arg1))
+
+ /* Lazy register values with offsets are not supported. */
+ if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1))
+ value_fetch_lazy (arg1);
+
+ if (value_lazy (arg1))
set_value_lazy (v, 1);
else
memcpy (value_contents_all_raw (v), value_contents_all_raw (arg1),
@@ -1368,7 +1373,12 @@ 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_LVAL (arg1) == lval_memory && value_lazy (arg1))
+
+ /* Lazy register values with offsets are not supported. */
+ if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1))
+ value_fetch_lazy (arg1);
+
+ if (value_lazy (arg1))
set_value_lazy (v, 1);
else
memcpy (value_contents_raw (v),