From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15376 invoked by alias); 4 Dec 2006 22:05:52 -0000 Received: (qmail 15368 invoked by uid 22791); 4 Dec 2006 22:05:51 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 04 Dec 2006 22:05:47 +0000 Received: (qmail 5142 invoked from network); 4 Dec 2006 22:05:46 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Dec 2006 22:05:46 -0000 To: gdb-patches@sourceware.org Subject: RFA: don't swap void builtin type From: Jim Blandy Date: Mon, 04 Dec 2006 22:05:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2006-12/txt/msg00027.txt.bz2 I can't see any reason we need to swap out builtin_type_void while changing architectures, and it is nice to have as many types available in as many circumstances as possible. gdb/ChangeLog: 2006-12-04 Jim Blandy * gdbtypes.c (built_gdbtypes): Don't set builtin_type_void here. (_initialize_gdbtypes): Do it here, and don't swap it when the architecture changes. Index: gdb-trunk/gdb/gdbtypes.c =================================================================== --- gdb-trunk.orig/gdb/gdbtypes.c 2006-12-04 13:40:30.000000000 -0800 +++ gdb-trunk/gdb/gdbtypes.c 2006-12-04 13:55:22.000000000 -0800 @@ -3299,10 +3299,6 @@ static void build_gdbtypes (void) { - builtin_type_void = - init_type (TYPE_CODE_VOID, 1, - 0, - "void", (struct objfile *) NULL); builtin_type_char = init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT, (TYPE_FLAG_NOSIGN @@ -3652,6 +3648,10 @@ { struct cmd_list_element *c; + builtin_type_void = + init_type (TYPE_CODE_VOID, 1, + 0, + "void", (struct objfile *) NULL); builtin_type_int0 = init_type (TYPE_CODE_INT, 0 / 8, 0, @@ -3704,7 +3704,6 @@ /* FIXME - For the moment, handle types by swapping them in and out. Should be using the per-architecture data-pointer and a large struct. */ - DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_void); DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_char); DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_short); DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_int);