diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2007-01-23 13:13:03 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2007-01-23 13:13:03 +0000 |
commit | 7d85ee0220e8d2c0164efc94057d8b01bb2d1111 (patch) | |
tree | e71dced6836d0a62373e0a5bd69e71a12bb257cb | |
parent | f79b9530c6202260e8d97ca1ab37d0c2fcf63f7d (diff) | |
download | gdb-7d85ee0220e8d2c0164efc94057d8b01bb2d1111.zip gdb-7d85ee0220e8d2c0164efc94057d8b01bb2d1111.tar.gz gdb-7d85ee0220e8d2c0164efc94057d8b01bb2d1111.tar.bz2 |
* value.c (value_primitive_field): Copy the full 'location'
contents, instead of assuming that copying ADDRESS will
bring over everything in the union. Remove obsolete comment.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/value.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f053ca3..3cc9a20 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2007-01-23 Vladimir Prus <vladimir@codesourcery.com> + + * value.c (value_primitive_field): Copy the full 'location' + contents, instead of assuming that copying ADDRESS will + bring over everything in the union. Remove obsolete comment. + 2007-01-23 Masaki Muranaka <monaka@monami-software.com> * m32c-tdep.c (make_regs, m32c_analyze_prologue) diff --git a/gdb/value.c b/gdb/value.c index c6b9ca9..ffb70fb 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1343,11 +1343,9 @@ value_primitive_field (struct value *arg1, int offset, VALUE_LVAL (v) = VALUE_LVAL (arg1); if (VALUE_LVAL (arg1) == lval_internalvar) VALUE_LVAL (v) = lval_internalvar_component; - VALUE_ADDRESS (v) = VALUE_ADDRESS (arg1); + v->location = arg1->location; VALUE_REGNUM (v) = VALUE_REGNUM (arg1); VALUE_FRAME_ID (v) = VALUE_FRAME_ID (arg1); -/* VALUE_OFFSET (v) = VALUE_OFFSET (arg1) + offset - + TYPE_FIELD_BITPOS (arg_type, fieldno) / 8; */ return v; } |