From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19547 invoked by alias); 8 Oct 2007 13:22:27 -0000 Received: (qmail 19539 invoked by uid 22791); 8 Oct 2007 13:22:26 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 08 Oct 2007 13:22:24 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.8/8.13.8) with ESMTP id l98DML8q103040 for ; Mon, 8 Oct 2007 13:22:21 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 l98DMLIn2027600 for ; Mon, 8 Oct 2007 15:22:21 +0200 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 l98DMKdY013102 for ; Mon, 8 Oct 2007 15:22:21 +0200 Received: from bbkeks.boeblingen.de.ibm.com (dyn-9-152-248-41.boeblingen.de.ibm.com [9.152.248.41]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l98DMJ9R013064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Oct 2007 15:22:20 +0200 Message-ID: <470A2EAE.3070200@de.ibm.com> Date: Mon, 08 Oct 2007 13:22:00 -0000 From: Markus Deuling User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Ulrich Weigand CC: Markus Deuling , GDB Patches , Eli Zaretskii , Joel Brobecker , Jim Blandy , rearnsha@arm.com, Mark Kettenis Subject: Re: [rfc] [00/16] Get rid of current gdbarch References: <200710081302.l98D2pKk010603@d12av02.megacenter.de.ibm.com> In-Reply-To: <200710081302.l98D2pKk010603@d12av02.megacenter.de.ibm.com> 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-10/txt/msg00142.txt.bz2 Ulrich Weigand schrieb: > Markus Deuling wrote: > > I've checked all of those in, except for the i386-tdep.c one: Thank you very much. > @@ -169,6 +169,8 @@ i386_register_name (int regnum) > static int > i386_dbx_reg_to_regnum (int reg) > { > + struct gdbarch *gdbarch = get_frame_arch (get_current_frame ()); > + > /* This implements what GCC calls the "default" register map > (dbx_register_map[]). */ > Ops, you're right. Thank you very much. This one shouldn't have been in there. > You should not call get_current_frame at this point; this might > in fact fail as there is not necessarily a current frame selected > at the point this callback is called. > > Instead, you should change the XXX_reg_to_regnum gdbarch entries > from type "f" to "m"; then the functions will be automatically > provided with a gdbarch parameter. (This should be a separate > patch from the remaining trivial current_gdbarch replacements.) > Yes' I'll come up with a patch for that... -- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com