From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14534 invoked by alias); 5 Nov 2007 03:50:21 -0000 Received: (qmail 14513 invoked by uid 22791); 5 Nov 2007 03:50:20 -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; Mon, 05 Nov 2007 03:50:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EB3302AAF1D; Sun, 4 Nov 2007 22:50:16 -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 cpPDiMyfOzCP; Sun, 4 Nov 2007 22:50:16 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B1E7F2AAF18; Sun, 4 Nov 2007 22:50:16 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 1DF34E7ACA; Sun, 4 Nov 2007 22:50:14 -0500 (EST) Date: Mon, 05 Nov 2007 03:50:00 -0000 From: Joel Brobecker To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Reducing the use of current_language - some patches Message-ID: <20071105035014.GA3911@adacore.com> References: <20071031031711.GM5265@adacore.com> <200711041715.lA4HF0JL026952@d12av02.megacenter.de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200711041715.lA4HF0JL026952@d12av02.megacenter.de.ibm.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: 2007-11/txt/msg00043.txt.bz2 Hey Ulrich, > So I was wondering if we shouldn't add just a "language" parameter > to the parsing routines, but something more general, like a "parse > context" structure. This could encapsulate all that global state, > and would be easily extensible in the future ... Thanks for your feedback. Indeed, I had completely forgotten about the input radix, and it should indeed be passed. Having a structure is a really good idea. On the other hand, I'm not sure we're ready to have the parse context contain the gdbarch. For instance, the breakpoint structure doesn't save it, so we don't have access to it when we want to re_set the breakpoint. I propose we start with just the language and the input radix for this task, and then we can think about incorporating the gdbarch. > Maybe (if this is a good idea), it could be done after your current > set of patches; on the other hand, as you're touching all those files > anyway, maybe it would be simpler to do it in one go. It would actually be simpler for me to do the work in two phases, since I'm almost done with the first phase. Now, I have to redo probably most of it. However, I will do it in one go as it will create less work for the insight guys, as they will need to update their sources only once. Thanks again. -- Joel