From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19602 invoked by alias); 22 Nov 2008 05:06:27 -0000 Received: (qmail 19528 invoked by uid 22791); 22 Nov 2008 05:06:26 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 22 Nov 2008 05:05:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 754842A9630; Sat, 22 Nov 2008 00:05:49 -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 YgLMjbf7TVx7; Sat, 22 Nov 2008 00:05:49 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 35B522A962B; Sat, 22 Nov 2008 00:05:49 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 012DBE7ACD; Fri, 21 Nov 2008 21:05:46 -0800 (PST) Date: Sat, 22 Nov 2008 18:01:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFA: move value_from_contents_and_address to value.c Message-ID: <20081122050546.GB4318@adacore.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 2008-11/txt/msg00601.txt.bz2 Generally speaking, I'm very happy to see the function being moved out of ada-lang.c. > +/* Return a new value constructed from some bytes. TYPE is the type > + of the object. VALADDR is a pointer to the base of the enclosing > + object. If VALADDR is NULL, the value is marked as lazy. > + EMBEDDED_OFFSET is the offset into VALADDR of the bytes making up > + the new object. ADDRESS is the inferior address of the object. */ > + > +struct value * > +value_from_contents_and_address (struct type *type, const gdb_byte *valaddr, > + int embedded_offset, CORE_ADDR address) I'm wondering whether the offset parameter is really necessary? Would it be worse to call this function with valaddr+embedded_offset rather than passing two arguments? -- Joel