From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19013 invoked by alias); 2 Oct 2002 04:52:31 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18053 invoked from network); 2 Oct 2002 04:52:15 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 2 Oct 2002 04:52:15 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17wcQW-0003ZH-00 for ; Wed, 02 Oct 2002 00:52:05 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17wbV1-0000H9-00 for ; Wed, 02 Oct 2002 00:52:39 -0400 Date: Tue, 01 Oct 2002 21:52:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFA] solib-svr4.c fetch link map address Message-ID: <20021002045239.GA912@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <15770.22961.366656.980373@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15770.22961.366656.980373@localhost.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00043.txt.bz2 On Tue, Oct 01, 2002 at 10:28:01PM -0400, Elena Zannoni wrote: > > This function is used by thread_db.c. Gdb needs to pass the address of > the link map to glibc. Glibc will compute the address of a thread > local variable, given such address and the offset within the thread > local storage at which the variable is stored (gdb gets the offset out > of the debug info). > > The interface for the glibc function is like this: > > extern td_err_e td_thr_tls_get_addr (const td_thrhandle_t *__th, > void *__map_address, size_t __offset, > void **__address); > > The function loops through the link maps, and returns the address of > the one corresponding to the given objfile. Note that this function > takes into account that objfile can be the main executable, not just a > shared library. The main executable has always an empty name field in > the linkmap. How is the interface in thread_db going to look? Having finally gotten gdbserver thread support going, I don't want it to lose features; so I'm going to need to communicate the necessary information for these libthread_db queries to/from it somehow. I'm not clear how that should look yet. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer