From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16165 invoked by alias); 7 Nov 2007 14:58:06 -0000 Received: (qmail 16154 invoked by uid 22791); 7 Nov 2007 14:58:05 -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; Wed, 07 Nov 2007 14:58:03 +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 lA7Ew0PY142758 for ; Wed, 7 Nov 2007 14:58: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.6) with ESMTP id lA7Ew0Vd2056426 for ; Wed, 7 Nov 2007 15:58:00 +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 lA7EvxfF022692 for ; Wed, 7 Nov 2007 15:57:59 +0100 Received: from bbkeks.boeblingen.de.ibm.com ([9.146.120.131]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id lA7Evusc022488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Nov 2007 15:57:58 +0100 Message-ID: <4731D20A.7020506@de.ibm.com> Date: Wed, 07 Nov 2007 14:58:00 -0000 From: Markus Deuling User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: GDB Patches CC: Daniel Jacobowitz , Ulrich Weigand Subject: Re: [rfc] [01/05] Get rid of current_gdbarch in gdbarch.{c,h,sh} References: <47319D44.2060802@de.ibm.com> <20071107125925.GB14179@caradoc.them.org> In-Reply-To: <20071107125925.GB14179@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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/msg00129.txt.bz2 Daniel Jacobowitz schrieb: > On Wed, Nov 07, 2007 at 12:11:00PM +0100, Markus Deuling wrote: >> architecture. This ensures that the new architectures initial >> values are not influenced by the previous architecture. Once >> everything is parameterised with gdbarch, this will go away. */ >> - struct gdbarch *current_gdbarch; >> + struct gdbarch *gdbarch; > > Please read the comment above this variable :-) > Hm, will gdbarch_alloc go away? I thought every target uses gdbarch_alloc to allocate a basic gdbarch structure and then it overwrites every necessary callback to fit to its architecture. This patch just changes the name of current_gdbarch to gdbarch. For gdbarch_alloc current_gdbarch is a local variable invisible to the rest. Its not the global current_gdbarch what this patch changes. For me its a bit confusing to have a global current_gdbarch and a local one. -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com