From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16229 invoked by alias); 8 Jun 2007 23:14:04 -0000 Received: (qmail 16221 invoked by uid 22791); 8 Jun 2007 23:14:04 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Jun 2007 23:14:01 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.13.8/8.13.8) with ESMTP id l58NDwTL376986 for ; Fri, 8 Jun 2007 23:13:58 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 l58NDw594042966 for ; Sat, 9 Jun 2007 01:13:58 +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 l58NDwrj016233 for ; Sat, 9 Jun 2007 01:13:58 +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 l58NDw6M016230 for ; Sat, 9 Jun 2007 01:13:58 +0200 Message-Id: <200706082313.l58NDw6M016230@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Sat, 9 Jun 2007 01:13:58 +0200 Subject: [0/10] Clean up built-in types To: gdb-patches@sourceware.org Date: Fri, 08 Jun 2007 23:14:00 -0000 From: "Ulrich Weigand" 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/msg00112.txt.bz2 Hello, most of the remaining gdbarch-swapped data items are built-in data types. The following patch set reworks the handling of these types and gets rid of the need to swap variables. The basic idea is to replace all global variables like builtin_type_void with a "compatibility macro" referencing the current architecture's builtin_type structure: #define builtin_type_void \ (builtin_type (current_gdbarch)->builtin_void) To make this possible, we need to ensure that: - the builtin types are never used in a context where the macro version would break (e.g. taking the address of a builtin type) - all builtin types are in fact represented in the builtin_type per-gdbarch data structure as well In the future, those compatibility macros can be replaced by directly using builtin_type on the appropriate gdbarch at the call site. The following patch set achieves this: [1/10] Complete the la_language_arch_info conversion [2/10] Remove &builtin_type_ from tdep code (amd64/s390/sparc64) [3/10] Move vector types into tdep (i386/amd64/powerpc/spu) [4/10] Add missing bfd_vma type to builtin_type [5/10] Add "explicit size" types to builtin_type [6/10] Remove main builtin_type_ global variables. [7/10] Remove unused builtin_type_frame_reg [8/10] Convert msym_..._type to per-gdbarch data [9/10] Convert Fortran types to per-gdbarch data [10/10] Convert Modula-2 types to per-gdbarch data I've tested the complete patch set on i386-linux, powerpc64-linux, s390-ibm-linux, s390x-ibm-linux, and spu-elf. Unfortunately I don't have access to amd64 or sparc64, so testers for those platforms would be welcome! I'd appreciate any comments on this patch set. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com