From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23719 invoked by alias); 22 Jun 2002 15:31:50 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23708 invoked from network); 22 Jun 2002 15:31:48 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 22 Jun 2002 15:31:48 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id EF23E3DD0; Sat, 22 Jun 2002 11:31:47 -0400 (EDT) Message-ID: <3D149863.8030609@cygnus.com> Date: Sat, 22 Jun 2002 08:31:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020613 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy Cc: gdb@sources.redhat.com Subject: Re: GDB support for thread-local storage References: <20020619160004.38A625EA11@zwingli.cygnus.com> <3D1282DD.7000508@cygnus.com> <3D13EDEA.2070801@cygnus.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00201.txt.bz2 > I don't know. HP people do monitor this list so may be able to answer. >> > >> > But in any case, HP's gdbarch method for finding thread-local storage >> > would be very simple: just add the offset to CR27, and there's your >> > address. > >> >> BTW, why, in your propsal, is the offset incorporated into the address >> that is returned - rather than getting the base address and then >> adding the offset - more like HP did. > > > That's me imitating a rather weird quirk in the way the TLS run-time > implementation works. But if you look at my Dwarf 2 sketch proposal, > we can't do it that way. We need something that gives us the base > address. So the way HP does it is pretty much the way we'll do it, > except for the assumption that the base address is in a register. So an initial work-in-progress interface can be simplified to just: target_thread_base_address(thread, pc?, &base_addr) -> ok, not-available dropping that offset et.al.? Someone else can add them if they later prove necessary. Andrew