From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23984 invoked by alias); 23 Jan 2007 12:59:12 -0000 Received: (qmail 23964 invoked by uid 22791); 23 Jan 2007 12:59:11 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 23 Jan 2007 12:59:07 +0000 Received: (qmail 5406 invoked from network); 23 Jan 2007 12:59:03 -0000 Received: from unknown (HELO wind.lvk.cs.msu.su) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Jan 2007 12:59:03 -0000 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: Cleanup value_primitive_field Date: Tue, 23 Jan 2007 12:59:00 -0000 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_NagtFw9nS+JfopM" Message-Id: <200701231558.53075.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00472.txt.bz2 --Boundary-00=_NagtFw9nS+JfopM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 410 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. --Boundary-00=_NagtFw9nS+JfopM Content-Type: text/x-diff; charset="us-ascii"; name="value_primitive_field__gdb_mainline.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="value_primitive_field__gdb_mainline.diff" Content-length: 628 --- 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; } --Boundary-00=_NagtFw9nS+JfopM--