From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9695 invoked by alias); 25 Oct 2008 16:25:34 -0000 Received: (qmail 9661 invoked by uid 22791); 25 Oct 2008 16:25:33 -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, 25 Oct 2008 16:24:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2B8842A9674; Sat, 25 Oct 2008 12:24:56 -0400 (EDT) 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 DYBxuYWE7WFX; Sat, 25 Oct 2008 12:24:56 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id D716E2A962E; Sat, 25 Oct 2008 12:24:55 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id BF44BE7ACD; Sat, 25 Oct 2008 09:24:53 -0700 (PDT) Date: Sat, 25 Oct 2008 16:25:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Ulrich Weigand , gdb-patches@sourceware.org Subject: Re: [RFC/RFA] add struct parse_context to all command functions Message-ID: <20081025162453.GJ29998@adacore.com> References: <200810231949.m9NJnBUn013007@d12av02.megacenter.de.ibm.com> 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-10/txt/msg00644.txt.bz2 (just slowly catching up...) I like the idea as well. Just one question: Why did you elect to pass the structure as a pointer, rather than the structure itself? I wonder if some of the complexity in terms of who owns the data, making a copy, etc, could be removed if we passed the structure itself. In terms of performance, it shouldn't be a problem, as I expect large structs to be passed by reference anyway. The down-side is that the structure cannot be opaque, but I don't think there is much value in that, since conceptually our new structure is just a collection of settings. This is actually a question I asked myself for struct parse_context as well, and I think that the situation is the same, so I expect that the same choice will be best for both. -- Joel