From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25002 invoked by alias); 8 Oct 2007 13:35:34 -0000 Received: (qmail 24992 invoked by uid 22791); 8 Oct 2007 13:35:34 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 08 Oct 2007 13:35:28 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 0D564982FB; Mon, 8 Oct 2007 13:35:27 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 89C4B980BD; Mon, 8 Oct 2007 13:35:26 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IeslZ-0002hw-Ln; Mon, 08 Oct 2007 09:35:25 -0400 Date: Mon, 08 Oct 2007 13:35:00 -0000 From: Daniel Jacobowitz 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 Message-ID: <20071008133525.GA10323@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , Markus Deuling , GDB Patches , Eli Zaretskii , Joel Brobecker , Jim Blandy , rearnsha@arm.com, Mark Kettenis References: <4709E786.1070502@de.ibm.com> <200710081302.l98D2pKk010603@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200710081302.l98D2pKk010603@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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/msg00144.txt.bz2 On Mon, Oct 08, 2007 at 03:02:51PM +0200, Ulrich Weigand wrote: > 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.) /* This will hopefully provoke a warning. */ - return gdbarch_num_regs (current_gdbarch) - + gdbarch_num_pseudo_regs (current_gdbarch); + return gdbarch_num_regs (gdbarch) + + gdbarch_num_pseudo_regs (gdbarch); That's the only thing it's used for. Does it provoke a warning? If not, maybe -1 or something similar should... -- Daniel Jacobowitz CodeSourcery