From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9684 invoked by alias); 4 Nov 2007 17:15:07 -0000 Received: (qmail 9645 invoked by uid 22791); 4 Nov 2007 17:15:06 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 04 Nov 2007 17:15:04 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id lA4HF0cO375806 for ; Sun, 4 Nov 2007 17:15:00 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id lA4HF1i32318338 for ; Sun, 4 Nov 2007 18:15:01 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id lA4HF0JK026984 for ; Sun, 4 Nov 2007 18:15:00 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id lA4HF0JL026952; Sun, 4 Nov 2007 18:15:00 +0100 Message-Id: <200711041715.lA4HF0JL026952@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Sun, 4 Nov 2007 18:15:00 +0100 Subject: Re: [RFC] Reducing the use of current_language - some patches To: brobecker@adacore.com (Joel Brobecker) Date: Sun, 04 Nov 2007 17:15:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20071031031711.GM5265@adacore.com> from "Joel Brobecker" at Oct 30, 2007 11:17:11 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00039.txt.bz2 Joel Brobecker wrote: > As I said before, the goal of this exercise is to avoid having to play > with the current language in order to do parsing operations in a language > that may not be the current language. This sounds like a good idea, thanks for taking care of it! Just one suggestion that occurred to me: parsing operations depend on further global state than just the current language; in particular they depend on the "input_radix", and also on the currently active gdbarch (which e.g. modifies language primitive types). 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 ... 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. What do you think? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com