From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11795 invoked by alias); 26 Jun 2009 17:16:46 -0000 Received: (qmail 11775 invoked by uid 22791); 26 Jun 2009 17:16:44 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Jun 2009 17:16:38 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MKF2R-0006Ff-MC for gdb-patches@sources.redhat.com; Fri, 26 Jun 2009 17:16:35 +0000 Received: from 207.189.193.111 ([207.189.193.111]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Jun 2009 17:16:35 +0000 Received: from tromey by 207.189.193.111 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Jun 2009 17:16:35 +0000 To: gdb-patches@sources.redhat.com From: Tom Tromey Subject: Re: [6/7] Introduce per-type architecture Date: Fri, 26 Jun 2009 17:16:00 -0000 Message-ID: References: <200906261642.n5QGgLnP003891@d12av02.megacenter.de.ibm.com> Reply-To: tromey@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) 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: 2009-06/txt/msg00746.txt.bz2 >>>>> "Ulrich" == Ulrich Weigand writes: Ulrich> this patch finally adds an architecture reference to each type. I read through this patch series. Well... I skimmed most of it, since it mostly seemed mechanical. It all seems reasonable to me. Ulrich> In order to avoid growing the space-critical "struct type" or Ulrich> "struct main_type", the existing reference to the objfile Ulrich> associated with a type is replaced by a union that refers to Ulrich> either an objfile or a gdbarch, depending on a new type flag. Ulrich> The existing type allocation routines alloc_type and init_type Ulrich> now always create per-objfile types; it is now a bug to call Ulrich> them with a NULL objfile parameter. The helpers init_float_type, Ulrich> init_complex_type, init_flags_type, and init_composite_type are Ulrich> removed (and replaced by per-arch variants). Ulrich> There is new routine alloc_type_arch that allocates a non- Ulrich> objfile related type; you have to specify a (non-NULL) gdbarch Ulrich> argument instead. A number of helper routines are provided Ulrich> to simplify architecture-specific type creation (arch_type, Ulrich> arch_integer_type, arch_character_type, arch_boolean_type, Ulrich> arch_float_type, arch_complex_type, arch_flags_type, and Ulrich> arch_composite_type). Ulrich> Finally, if you want to allocate a new type with the same Ulrich> ownership information (objfile or architecture) as an existing Ulrich> type, you can use alloc_type_copy to do so. I noticed that many of the new functions don't have introductory comments. We've been asking everybody to write these recently; and I think the quoted text here would be good to have in the code somewhere. So, I would like to ask that this be split up and attached to the appropriate functions. Tom