From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11295 invoked by alias); 9 Oct 2007 19:59:46 -0000 Received: (qmail 11286 invoked by uid 22791); 9 Oct 2007 19:59:45 -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; Tue, 09 Oct 2007 19:59:43 +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 l99JxepE065214 for ; Tue, 9 Oct 2007 19:59:40 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 l99JxehQ2269316 for ; Tue, 9 Oct 2007 21:59:40 +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 l99JxdTS015300 for ; Tue, 9 Oct 2007 21:59:40 +0200 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 l99Jxdqp015297; Tue, 9 Oct 2007 21:59:39 +0200 Message-Id: <200710091959.l99Jxdqp015297@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 9 Oct 2007 21:59:39 +0200 Subject: Re: [rfc] [00/16] Get rid of current gdbarch To: drow@false.org (Daniel Jacobowitz) Date: Tue, 09 Oct 2007 20:03:00 -0000 From: "Ulrich Weigand" Cc: deuling@de.ibm.com (Markus Deuling), gdb-patches@sourceware.org (GDB Patches), eliz@gnu.org (Eli Zaretskii), brobecker@adacore.com (Joel Brobecker), jimb@codesourcery.com (Jim Blandy), rearnsha@arm.com, mark.kettenis@xs4all.nl (Mark Kettenis) In-Reply-To: <20071008141039.GA12235@caradoc.them.org> from "Daniel Jacobowitz" at Oct 08, 2007 10:10:39 AM 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-10/txt/msg00218.txt.bz2 Daniel Jacobowitz wrote: > On Mon, Oct 08, 2007 at 04:01:36PM +0200, Ulrich Weigand wrote: > > Agreed for that particular usage. In general, the reg_to_regnum > > routines should probably still be converted to "m" -- e.g. the > > rs6000 versions do make non-trivial use of the gdbarch ... > > Isn't that problematic? We do not know what the architecture will > be at this point. Only the bits common to all architectures using > the same init routine are safe to use. Hmm, good point, I'll have to think about this ... > As for the rs6000 version, the patches I posted last week allow a > followup patch which propogates some constants. Most of the values > being read from the tdep are now constants. Some (e.g. ppc_mq_regnum) > are not constants, but have either a single constant value or -1 if > the register is not present; for those the constant is appropriate > in the reg_to_regnum routines anyway. I agree that everything would be much easier if the register numbers were constants. But note that rs6000 is not the only platform where this is not the case, I see the same (or even worse) also in mips, m32c, xtensa, ... (The mep usage also seems suspicious.) Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com