Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Prosun Niyogi <niyogip@yahoo.com>
To: gdb@sourceware.org
Cc: pniyogi@us.ibm.com
Subject: Re: TLS on powerpc(32/64)
Date: Fri, 22 Sep 2006 13:53:00 -0000	[thread overview]
Message-ID: <20060922135317.76444.qmail@web38912.mail.mud.yahoo.com> (raw)
In-Reply-To: <20060921235203.GA9769@nevyn.them.org>

How can I tell whether GDB is loading libthread_db?
"info threads" works... I would think libthread_db
must be loaded for that to work.
 
Also, in gdb(linux-thread_db.c) -
 
 __/* glibc doesn't provide the needed interface.  */
 if (!td_thr_tls_get_addr_p)
   throw_error (TLS_NO_LIBRARY_SUPPORT_ERROR,
                _("No TLS library support"));
 __/* Caller should have verified that lm != 0.  */
 gdb_assert (lm != 0);
 __/* Get info about the thread.  */
 thread_info = find_thread_pid (ptid);
 thread_db_map_id2thr (thread_info, 1);
 __/* Finally, get the address of the variable.  */
 err = td_thr_tls_get_addr_p
(&thread_info->private->th, (void *) lm,
                              offset, &address);
So the glibc interface is found... does that not mean
that libthread_db is loaded and found by GDB?
 
Apologies for the ignorance, just looking for how I
can check to see why td_thr_tls_get_addr_p() doesnt
return an appropriate value.
 
So judging from the tone of your comment, I should
expect to be able to print the value of a __thread
variable on ppc64, and there arent any known issues
preventing me from doing so? I have tried on SLES, FC,
and now cvs-head, and all three have failed.
 
Can you suggest where I should look next? I took a
quick look at libthread_db in glibc, and it looks like
none of the fuctions have changed in libc. 
 
Thanks,
 
Prosun Niyogi

--- Daniel Jacobowitz <drow@false.org> wrote:

> On Thu, Sep 21, 2006 at 04:20:47PM -0700, Prosun
> Niyogi wrote:
> > Hi, 
> > I've been struggling the last few days on getting
> gdb
> > to work correctly on a powerpc64 machine. Built as
> > ppc-64-linux, debugging ppc64 binaries linked
> against
> > libpthread. It seems to me that gdb's TLS access
> does
> > not work correctly on these platforms. Attempting
> to
> > print a variable of type __thread doesnt work. 
> 
> It looks to me like GDB has failed to load
> libthread_db for some
> reason.  I don't know why not; you'll have to look
> into it.
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


  reply	other threads:[~2006-09-22 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-21 23:20 Prosun Niyogi
2006-09-21 23:52 ` Daniel Jacobowitz
2006-09-22 13:53   ` Prosun Niyogi [this message]
2006-09-22 18:03     ` Michael Snyder
2006-09-22 18:18       ` Prosun Niyogi
2006-09-22 18:43         ` Michael Snyder
2006-09-22 19:01           ` Prosun Niyogi
     [not found]   ` <20060922025718.19237.qmail@web38906.mail.mud.yahoo.com>
2006-09-22 14:03     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060922135317.76444.qmail@web38912.mail.mud.yahoo.com \
    --to=niyogip@yahoo.com \
    --cc=gdb@sourceware.org \
    --cc=pniyogi@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox