From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30066 invoked by alias); 20 May 2008 16:43:03 -0000 Received: (qmail 30051 invoked by uid 22791); 20 May 2008 16:43:02 -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, 20 May 2008 16:42:41 +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 m4KGg3TJ221618 for ; Tue, 20 May 2008 16:42:03 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.7) with ESMTP id m4KGg3YN2777150 for ; Tue, 20 May 2008 18:42:03 +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 m4KGg3jp030197 for ; Tue, 20 May 2008 18:42:03 +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 m4KGg3k6030194; Tue, 20 May 2008 18:42:03 +0200 Message-Id: <200805201642.m4KGg3k6030194@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 20 May 2008 18:42:03 +0200 Subject: Re: [patch]: Remove current_gdbarch from target.c To: drow@false.org (Daniel Jacobowitz) Date: Tue, 20 May 2008 18:38:00 -0000 From: "Ulrich Weigand" Cc: deuling@de.ibm.com (Markus Deuling), gdb-patches@sourceware.org (GDB Patches) In-Reply-To: <20080520152644.GA30512@caradoc.them.org> from "Daniel Jacobowitz" at May 20, 2008 11:26:44 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: 2008-05/txt/msg00601.txt.bz2 Daniel Jacobowitz wrote: > On Tue, May 20, 2008 at 05:16:24PM +0200, Ulrich Weigand wrote: > > Markus Deuling wrote: > > > > > > > * target.c (target_translate_tls_address): Replace current_gdbarch by > > > objfile arch. > > > > This is OK. > > Is it really? What are the guarantees for the objfile architecture? Well, the general idea is that objfile archiecture can / should be used for properties that depend solely on the objfile, and not on properties of a running target. This currently includes mostly things like builtin types and basic ABI properties, but also e.g. convert_from_func_ptr_addr. I would have considered fetch_tls_load_module_address to be of the same type. But on second thought, that may not really be true -- the svr4_fetch_objfile_link_map implementation of it does hook into the overall shared library code, which is dependent on the target ... Markus, please do not apply this patch for now; we'll need to think of another solution (probably together with the question what gdbarch the shared library subsystem should be using). > If an object is not sniffed as belonging to a particular os/abi, I > believe we won't get its tls address routine now, even when connected > to a target reporting the appropriate OS/ABI some other way or using > set arch. That would be true. > This is not a big deal for Linux, since every linked object is > generally sniffable. But I've been working with two other OS's > recently where our dependence on sniffers is a problem; neither > Symbian OS nor DICOS has clear markings. Hmm. Non-sniffable objects are somewhat of a problem anyway. Maybe we need a way to at least override (manually?) the OSABI that is used for non-sniffable objects ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com