From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26974 invoked by alias); 2 Oct 2002 13:50:33 -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 26962 invoked from network); 2 Oct 2002 13:50:31 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 2 Oct 2002 13:50:31 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g92CG2i05444 for ; Wed, 2 Oct 2002 08:16:02 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g92CYpf24695 for ; Wed, 2 Oct 2002 08:34:51 -0400 Received: from localhost.redhat.com (IDENT:root@tooth.toronto.redhat.com [172.16.14.29]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g92CYpj28150 for ; Wed, 2 Oct 2002 08:34:51 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id 1BAFEFF79; Wed, 2 Oct 2002 08:32:27 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15770.59227.896710.331823@localhost.redhat.com> Date: Wed, 02 Oct 2002 06:50:00 -0000 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] solib-svr4.c fetch link map address In-Reply-To: <20021002045239.GA912@nevyn.them.org> References: <15770.22961.366656.980373@localhost.redhat.com> <20021002045239.GA912@nevyn.them.org> X-SW-Source: 2002-10/txt/msg00046.txt.bz2 Daniel Jacobowitz writes: > 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. > I am preparing the rest of the patch. Hold on. I eventually fell asleep last night...:-( Elena > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer