From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23833 invoked by alias); 12 Jun 2007 16:07:09 -0000 Received: (qmail 23570 invoked by uid 22791); 12 Jun 2007 16:07:08 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.29.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Jun 2007 16:07:04 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.8/8.13.8) with ESMTP id l5CG70G1800608 for ; Tue, 12 Jun 2007 16:07: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.3) with ESMTP id l5CG70gw4108404 for ; Tue, 12 Jun 2007 18:07:00 +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 l5CG70Y2000629 for ; Tue, 12 Jun 2007 18:07:00 +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 l5CG70SQ000626; Tue, 12 Jun 2007 18:07:00 +0200 Message-Id: <200706121607.l5CG70SQ000626@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 12 Jun 2007 18:07:00 +0200 Subject: Re: [2/10] Remove &builtin_type_ from tdep code (amd64/s390/sparc64) To: drow@false.org (Daniel Jacobowitz) Date: Tue, 12 Jun 2007 16:07:00 -0000 From: "Ulrich Weigand" Cc: vladimir@codesourcery.com (Vladimir Prus), gdb-patches@sourceware.org In-Reply-To: <20070612151452.GB16068@caradoc.them.org> from "Daniel Jacobowitz" at Jun 12, 2007 11:14:52 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-06/txt/msg00194.txt.bz2 Daniel Jacobowitz wrote: > On Sat, Jun 09, 2007 at 01:14:58AM +0200, Ulrich Weigand wrote: > > Hello, > > > > a number of platforms (amd64, s390, sparc64) were using a global data > > structure containing pointers to types describing the register types. > > This is broken if those types need to be platform-specific. > > > > The following patch removes those global data structures, and converts > > the affected architectures to simply return the types dynamically from > > the register_type callback, as all other platforms do as well. > > In-flight collision warning: the m68k ColdFire patch may reintroduce an > occurance of this, for the long double type. Ah, good catch: + /* Type of an fpreg. NULL if there are no fpregs. This is a + pointer to the pointer to type struct, because when architecture + init function is running, the types for the old architecture are swapped + out, and the types for the new architecture are not yet swapped in, + so all types that don't have specific sizes (like builting_type_double) + are NULL. */ + struct type **fpreg_type; Vladimir, would you mind rewriting this? I'd suggest to remove the fpreg_type variable, and instead check the "flavour" in m68k_register_type. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com