From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Cleanup value_primitive_field
Date: Tue, 23 Jan 2007 12:59:00 -0000 [thread overview]
Message-ID: <200701231558.53075.vladimir@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
This patch makes value_primitive_filed copy full value->location, not just
VALUE_ADDRESS -- just the same that Jim has done to value_copy.
No changes in behaviour so far and no regressions on x86. OK?
- Volodya
* 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.
[-- Attachment #2: value_primitive_field__gdb_mainline.diff --]
[-- Type: text/x-diff, Size: 628 bytes --]
--- gdb/value.c (/mirrors/gdb_mainline) (revision 3197)
+++ gdb/value.c (/patches/gdb/value_primitive_field/gdb_mainline) (revision 3197)
@@ -1343,11 +1343,9 @@ value_primitive_field (struct value *arg
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;
}
next reply other threads:[~2007-01-23 12:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 12:59 Vladimir Prus [this message]
2007-01-23 13:00 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200701231558.53075.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox