From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28520 invoked by alias); 13 Jun 2007 13:17:19 -0000 Received: (qmail 28510 invoked by uid 22791); 13 Jun 2007 13:17:18 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.29.151) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Jun 2007 13:17:15 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.8/8.13.8) with ESMTP id l5DDHAYJ191880 for ; Wed, 13 Jun 2007 13:17:10 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 l5DDHAe43997738 for ; Wed, 13 Jun 2007 15:17:10 +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 l5DDH9cs009370 for ; Wed, 13 Jun 2007 15:17:10 +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 l5DDH90O009367; Wed, 13 Jun 2007 15:17:09 +0200 Message-Id: <200706131317.l5DDH90O009367@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 13 Jun 2007 15:17:09 +0200 Subject: Re: [2/10] Remove &builtin_type_ from tdep code (amd64/s390/sparc64) To: drow@false.org (Daniel Jacobowitz) Date: Wed, 13 Jun 2007 13:17:00 -0000 From: "Ulrich Weigand" Cc: vladimir@codesourcery.com (Vladimir Prus), gdb-patches@sourceware.org In-Reply-To: <20070613131002.GA23051@caradoc.them.org> from "Daniel Jacobowitz" at Jun 13, 2007 09:10:02 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/msg00223.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Jun 13, 2007 at 03:06:11PM +0200, Ulrich Weigand wrote: > > However, this macro is not fully equivalent; in particular it > > is no longer possible to use &builtin_type_double. > > You keep saying this, but is it true? :-) Well, you can take the address, but you won't get the gdbarch-swap effect any more. So if you were relying on that, it'll break ... > You can't take the address of a function's return value, but you can > take the address of a dereference. Of course using > &builtin_type_double in m68k_gdbarch_init won't work since > current_gdbarch is NULL then. But we should be able to save > builtin_type (gdbarch)->builtin_double if we wanted to, I think. Not really, as the per-gdbarch data elements are allocated only *after* gdbarch_init returns. (At least those installed using gdbarch_data_register_post_init as builtin_type is.) So calling builtin_type (gdbarch) within m68k_gdbarch_init should itself return NULL. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com