Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Blandy <jimb@redhat.com>
Cc: Andrew Cagney <ac131313@ges.redhat.com>,
	Andrew Cagney <ac131313@cygnus.com>,
	James Cownie <jcownie@etnus.com>,
	gdb@sources.redhat.com
Subject: Re: GDB support for thread-local storage
Date: Mon, 19 Aug 2002 09:05:00 -0000	[thread overview]
Message-ID: <20020819160544.GD7772@nevyn.them.org> (raw)
In-Reply-To: <npr8it2uat.fsf@zwingli.cygnus.com>

On Wed, Jun 26, 2002 at 11:56:58PM -0500, Jim Blandy wrote:
> 
> Andrew Cagney <ac131313@ges.redhat.com> writes:
> > > Doesn't libthread_db read `struct _pthread_descr_struct' from the
> > > linuxthreads library in the inferior, rather than knowing the layout
> > > itself?  So it's actually the inferior's linuxthreads library that
> > > describes its own structures' layout.
> > 
> > The structure layout will have been compiled into libthread-db.a.  It
> > implicitly knows the layout itself.
> 
> I think you're wrong here.  Could you show me the code?
> 
> (Not that the question is especially relevant to the discussion --- of
> course it could do a simple checksum check.)

You're right, and you're wrong.  For instance, td_ta_map_id2thr.c:

#include <linuxthreads/internals.h>
  struct pthread_handle_struct phc;
  if (ps_pdread (ta->ph, ta->handles + pt % pthread_threads_max, &phc,
                 sizeof (struct pthread_handle_struct)) != PS_OK)
  if (phc.h_descr == NULL)

etc.

which references:
struct pthread_handle_struct {
  struct _pthread_fastlock h_lock; /* Fast lock for sychronized access */
  pthread_descr h_descr;        /* Thread descriptor or NULL if invalid */
  char * h_bottom;              /* Lowest address in the stack thread */
};


Worse, it reads the _pthread_descr_struct from the inferior. 
_pthread_descr_struct does not describe the layout of anything; it's
the actual descriptor.  It has things like a sigjmp_buf in it.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2002-08-19 16:05 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1024952640.13693.ezmlm@sources.redhat.com>
2002-06-25  1:48 ` James Cownie
2002-06-25  8:05   ` Daniel Jacobowitz
2002-06-25  8:31     ` James Cownie
2002-06-25  8:42       ` Daniel Jacobowitz
2002-06-25  8:53         ` James Cownie
2002-06-25  8:56           ` Daniel Jacobowitz
2002-06-25  9:11             ` James Cownie
2002-06-25  9:29               ` Daniel Jacobowitz
2002-06-25 10:44             ` Andrew Cagney
2002-06-25 10:02               ` Daniel Jacobowitz
2002-06-26 12:45                 ` Jim Blandy
2002-06-26 19:31                   ` Andrew Cagney
2002-06-26 21:57                     ` Jim Blandy
2002-06-27  8:13                       ` Andrew Cagney
2002-08-19  9:05                       ` Daniel Jacobowitz [this message]
2003-02-17 18:07 [maint] The GDB maintenance process Daniel Jacobowitz
     [not found] ` <drow@mvista.com>
2003-02-17 18:58   ` Kevin Buettner
2003-02-17 21:01 ` Elena Zannoni
2003-02-19  1:49   ` Daniel Jacobowitz
2003-02-19  2:26     ` Joel Brobecker
2003-02-19 15:43       ` Andrew Cagney
2003-02-19 16:29         ` Daniel Jacobowitz
2003-02-19 22:04           ` Andrew Cagney
2003-02-19 13:24     ` Daniel Berlin
2003-02-19 15:51       ` Andrew Cagney
2003-02-19 14:50     ` Andrew Cagney
2003-02-19 17:33       ` David Carlton
2003-02-19 17:57         ` Kevin Buettner
2003-02-19 18:56           ` Andrew Cagney
2003-02-19 20:39             ` Christopher Faylor
2003-02-19 23:17               ` Jason Molenda
2003-02-20  1:53                 ` Christopher Faylor
2003-02-19 19:35           ` David Carlton
2003-02-20 18:32       ` Richard Earnshaw
2003-02-22  0:53         ` Andrew Cagney
2003-02-19 15:12     ` Andrew Cagney
2003-02-19 15:21       ` Daniel Jacobowitz
2003-02-19 16:24         ` Andrew Cagney
2003-02-19 18:36           ` Christopher Faylor
2003-02-19 23:36           ` Jason Molenda
2003-02-19 23:52             ` Andrew Cagney
2003-02-19 23:59               ` Jason Molenda
2003-02-20  0:16                 ` Elena Zannoni
2003-02-20  0:21                 ` Andrew Cagney
2003-02-18  2:39 ` Andrew Cagney
2003-02-18  4:28 ` Andrew Cagney
2003-02-19  3:49   ` Jim Blandy
2003-02-19 16:14     ` Andrew Cagney
2003-02-19 16:31       ` Daniel Jacobowitz
2003-02-19  2:24 ` Jim Blandy
2003-02-19 16:33   ` Andrew Cagney
2003-02-19 22:24     ` Jim Blandy
2003-02-19 22:39       ` Christopher Faylor
2003-02-19 22:53         ` Andrew Cagney
2003-02-19 23:53       ` Elena Zannoni
2003-02-20  1:27         ` Andrew Cagney
2003-02-20  2:48   ` Andrew Cagney
2003-02-21 23:43   ` Andrew Cagney
2003-02-21 23:57   ` Andrew Cagney
2003-02-19  6:05 ` David Carlton
2003-02-23 23:26 ` Mark Kettenis
2003-02-24  7:18   ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2002-06-19  9:00 GDB support for thread-local storage Jim Blandy
2002-06-19 10:08 ` Daniel Berlin
2002-06-19 12:20   ` Jim Blandy
2002-06-19 13:12     ` Daniel Berlin
2002-06-19 13:40       ` Jim Blandy
2002-06-20 18:35 ` Andrew Cagney
2002-06-20 18:48   ` Daniel Jacobowitz
2002-06-21 10:18     ` Andrew Cagney
2002-06-21 10:32       ` Daniel Jacobowitz
2002-06-21 13:08         ` Jim Blandy
2002-06-21 13:18           ` Daniel Jacobowitz
2002-06-21 13:54             ` Jim Blandy
2002-06-21 14:03               ` Daniel Jacobowitz
2002-06-21 14:46                 ` Andrew Cagney
2002-06-21 14:55                   ` Daniel Jacobowitz
2002-06-21 15:31                     ` Andrew Cagney
2002-06-21 22:59                       ` Daniel Jacobowitz
2002-06-22  8:22                         ` Andrew Cagney
2002-06-24  7:53                           ` Daniel Jacobowitz
2002-06-21 16:14                     ` Jim Blandy
2002-06-21 22:57                       ` Daniel Jacobowitz
2002-06-26 12:37                         ` Jim Blandy
2002-06-21 13:20           ` Daniel Jacobowitz
2002-06-21 15:37             ` Jim Blandy
2002-06-21 23:00               ` Daniel Jacobowitz
2002-06-21 12:34   ` Jim Blandy
2002-06-21 12:49   ` Jim Blandy
2002-06-21 18:10     ` Jim Blandy
2002-06-21 20:24       ` Andrew Cagney
2002-06-21 21:09         ` Jim Blandy
2002-06-22  8:31           ` Andrew Cagney
2002-06-21 15:04 ` Andrew Cagney
2002-06-21 15:41   ` Jim Blandy
2002-06-21 15:59     ` Andrew Cagney
2002-06-21 16:08   ` Jim Blandy

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=20020819160544.GD7772@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@cygnus.com \
    --cc=ac131313@ges.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=jcownie@etnus.com \
    --cc=jimb@redhat.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