From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31903 invoked by alias); 3 Feb 2009 16:53:44 -0000 Received: (qmail 31888 invoked by uid 22791); 3 Feb 2009 16:53:42 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Feb 2009 16:53:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2AB3B2A9681; Tue, 3 Feb 2009 11:53:37 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YW+az5nUyIjm; Tue, 3 Feb 2009 11:53:37 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D7AFD2A967D; Tue, 3 Feb 2009 11:53:36 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 93068E7ACD; Tue, 3 Feb 2009 08:53:34 -0800 (PST) Date: Tue, 03 Feb 2009 16:53:00 -0000 From: Joel Brobecker To: Jerome Guitton , Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] corner case in value_from_contents_and_address Message-ID: <20090203165334.GG3964@adacore.com> References: <20081127150102.GC3835@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081127150102.GC3835@adacore.com> User-Agent: Mutt/1.4.2.2i 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: 2009-02/txt/msg00065.txt.bz2 > 2008-11-27 Jerome Guitton > > * value.c (value_from_content_and_address): Always return > a lval_memory value, even if address is null. Approved. Tom, I assume you weren't taking advantage of this undocumented anomaly... > Index: value.c > =================================================================== > RCS file: /cvs/src/src/gdb/value.c,v > retrieving revision 1.72 > diff -u -p -r1.72 value.c > --- value.c 26 Nov 2008 16:27:27 -0000 1.72 > +++ value.c 27 Nov 2008 15:00:31 -0000 > @@ -1704,8 +1704,7 @@ value_from_contents_and_address (struct > else > memcpy (value_contents_raw (v), valaddr, TYPE_LENGTH (type)); > VALUE_ADDRESS (v) = address; > - if (address != 0) > - VALUE_LVAL (v) = lval_memory; > + VALUE_LVAL (v) = lval_memory; > return v; > } > -- Joel