public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Amusing problem in current libthread_db
@ 2003-06-03 22:09 Daniel Jacobowitz
  2003-06-03 22:30 ` Roland McGrath
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2003-06-03 22:09 UTC (permalink / raw)
  To: gdb, libc-alpha

In recent versions of libthread_db, there's this interesting code:

td_err_e
td_thr_getgregs (const td_thrhandle_t *th, prgregset_t gregs)
{
  struct _pthread_descr_struct pds;

  LOG ("td_thr_getgregs");

  if (th->th_unique == NULL)
    {
      /* No data yet.  */
      memset (gregs, '\0', sizeof (prgregset_t));
      return TD_OK;
    }



So, if we don't have a th_unique, claim to have no registers.  So for the
first thread, until the thread manager is initialized [for LinuxThreads at
least - is it initialized earlier in NPTL?], we claim that all
registers are zero.  GDB loads the registers during this interval.

So it thinks the PC is zero.  Anyone know the reason for this change, which
appears to have come in with:
date: 2002/07/16 03:35:49;  author: drepper;  state: Exp;  lines: +7 -0
Some more changes to handle TLS-enabled libpthread.


It doesn't seem to cause any problems, which baffles me just a little bit. 
I'm still trying to figure that part out.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-25  8:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-03 22:09 Amusing problem in current libthread_db Daniel Jacobowitz
2003-06-03 22:30 ` Roland McGrath
2003-08-18 19:33   ` Daniel Jacobowitz
2003-08-19  6:45     ` Machine interface jacques
2003-08-19 13:30       ` Andrew Cagney
2003-08-19 14:00         ` Alain Magloire
2003-08-25  8:17     ` Amusing problem in current libthread_db Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).