From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7160 invoked by alias); 20 May 2006 14:40:23 -0000 Received: (qmail 7152 invoked by uid 22791); 20 May 2006 14:40:22 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 20 May 2006 14:40:21 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FhScp-0008Lr-7S; Sat, 20 May 2006 10:40:15 -0400 Date: Sat, 20 May 2006 16:34:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: [PATCH] -var-update Message-ID: <20060520144015.GA32035@nevyn.them.org> Mail-Followup-To: Nick Roberts , Vladimir Prus , gdb-patches@sources.redhat.com References: <17518.39336.538984.261434@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17518.39336.538984.261434@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00430.txt.bz2 On Sat, May 20, 2006 at 04:23:04PM +1200, Nick Roberts wrote: > > BTW, why coerce_ref is not suitable > > here? > > coerce_ref ensures that the address is placed in the value's contents, not > the actual value which is being referred to. Did you try that? That certainly shouldn't be true! struct value * coerce_ref (struct value *arg) { struct type *value_type_arg_tmp = check_typedef (value_type (arg)); if (TYPE_CODE (value_type_arg_tmp) == TYPE_CODE_REF) arg = value_at_lazy (TYPE_TARGET_TYPE (value_type_arg_tmp), unpack_pointer (value_type (arg), value_contents (arg))); return arg; } -- Daniel Jacobowitz CodeSourcery