Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@gnu.org>
To: cagney@gnu.org
Cc: drow@false.org, gdb-patches@sources.redhat.com, msnyder@redhat.com
Subject: Re: [rfa] Include the LWP in thread-db's PTIDs
Date: Mon, 11 Oct 2004 19:40:00 -0000	[thread overview]
Message-ID: <200410111940.i9BJeQU2001164@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <416AA623.7080304@gnu.org> (message from Andrew Cagney on Mon, 11 Oct 2004 11:26:27 -0400)

   Date: Mon, 11 Oct 2004 11:26:27 -0400
   From: Andrew Cagney <cagney@gnu.org>

   > At one time, I believe that thread-db.c was planned to support
   > the full range of features supported by the libthread_db
   > interface, presumably as defined by Sun's implementation.  That
   > never panned out, and while non-1:1 support did work at one
   > point, I don't think it has in a long while.  If it was wanted, I
   > wouldn't re-implement it the same way.  So this patch begins the
   > process of removing unneeded generality from thread-db.  In
   > particular, while thread-db will still compute the TID, the
   > mapping of threads to LWPs will be considered fixed.

I think assuming 1:1 threads is fair enough.  But Daniel, if you're
going to do that, I'd like to ask you to rename thread-db.c into
linux-thread.c or something like that.

Anyway, in that case I think linux-thread.c should be a fairly
lightweight layer around the normal Linux LWP-aware
inf-ptrace.c-derived target vector.  Only use it to provide an LWP <->
TID mapping, and perhaps an initial list of LWPs to attach, but
nothing else.  The normal Linux target vector should in no way be
dependent on it, such that it allows alternative threads strata on top
of it.  Something else just would be a bad design.

Hmm, I guess I'm just re-stating Andrew's points here.

   JeffJ's been in a constant fight with that one.

That's because we try to support every combination of a broken glibc
and a broken kernel that we can find out there.  Well, perhaps not
every possible combination, but certainly some broken combinations.
Reliable threads-debugging requires reliable reporting of thread/LWP
exits.  Otherwise we keep having problems with threads disappearing
from beneath us, leaving us poking at nonexistent memory and
registers.

I think we should ditch most of the buggy combinations and state that
Linux threads debugging will only work reliably on Linux x.y.z or
later with glibc a.b.c or later.

Mark


  parent reply	other threads:[~2004-10-11 19:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-10 21:36 Daniel Jacobowitz
2004-10-11 15:29 ` Andrew Cagney
2004-10-11 15:38   ` Daniel Jacobowitz
2004-10-11 15:55     ` Joel Brobecker
2004-10-11 16:17     ` Andrew Cagney
2004-10-11 17:12       ` Daniel Jacobowitz
2004-10-11 18:29         ` Andrew Cagney
2004-10-12 13:26           ` Daniel Jacobowitz
2004-10-11 19:40   ` Mark Kettenis [this message]
2004-10-12 13:31     ` Daniel Jacobowitz
2004-10-13 21:16       ` Mark Kettenis
2004-10-13 21:27         ` Daniel Jacobowitz
2004-10-17 19:19           ` Daniel Jacobowitz
2004-10-13 21:37     ` Paul Gilliam
2004-11-14 19:17 ` Daniel Jacobowitz
2004-12-02 21:16   ` Michael Snyder
2004-12-08 16:14     ` 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=200410111940.i9BJeQU2001164@elgar.sibelius.xs4all.nl \
    --to=kettenis@gnu.org \
    --cc=cagney@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@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