This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Error at lookup Thread-Local Storage variable.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Markus Deuling <deuling at de dot ibm dot com>
- Cc: GDB discuss <gdb at sourceware dot org>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Mon, 14 May 2007 07:29:11 -0400
- Subject: Re: Error at lookup Thread-Local Storage variable.
- References: <46421702.2010705@de.ibm.com>
On Wed, May 09, 2007 at 08:46:26PM +0200, Markus Deuling wrote:
> target_translate_tls_address() fails to find the address for it. I tracked it
> down to svr4_fetch_objfile_link_map() from solib-svr4.c. There is a string
> compare between
> objfile->name and a buffer. The problem is, that the objfile contains the
> full-qualified
> path to the library, but the buffer (like 'info sharedlibrary': ./libmd.so)
> does not.
> (objfile->name = /home/deuling/md/solib/libmd.so).
>
> Is this a bug? Why is that objfile->name fully qualified and the shared library
> isn't?
The name from the link map comes from ld.so; the name from the objfile
has been through GDB. ld.so doesn't always qualify names, esp. in the
case of rpath.
> What would be the appropriate way to fix that? Qualify ./path to ./full/path
> and recompare the strings ?
Figure out why GDB didn't save the original name anywhere? It looks
to me like you should walk the solib list (struct so_list) to find the
entry that matches objfile. Then you'll have so_original_name to
compare with.
--
Daniel Jacobowitz
CodeSourcery