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@cygnus.com>, gdb@sources.redhat.com
Subject: Re: GDB support for thread-local storage
Date: Fri, 21 Jun 2002 14:03:00 -0000	[thread overview]
Message-ID: <20020621210302.GA25010@nevyn.them.org> (raw)
In-Reply-To: <npsn3gs68b.fsf@zwingli.cygnus.com>

On Fri, Jun 21, 2002 at 03:54:12PM -0500, Jim Blandy wrote:
> 
> Daniel Jacobowitz <drow@mvista.com> writes:
> > Yes.  Search the archives to see the patch I committed to make this
> > "bug" happen instead of trying to use libthread_db; that message also
> > describes the problems.
> 
> Great, thanks.
> 
> > And if you're feeling ambitious, search for the message which describes
> > why it broke libthread_db support for static executables.  I haven't
> > thought of a solution yet.
> 
> I'm not that ambitious yet.
> 
> > > Why aren't we using thread_db, though?  Why can't we run thread_db and
> > > simply serve its memory and register requests from the core file?  I
> > > don't see which part of the interface makes this impossible.  And
> > > we'll need to do it if Linux switches to an NxM thread model, no?
> > 
> > It's not interface but implementation.  There's all sorts of places
> > where libthread_db wants to write to the inferior.  If you fake memory
> > writes, it is possible that this would work; I couldn't figure out how
> > to do that non-intrusively.
> 
> All the calls to ps_p[td]write I see in GNU's libthread_db have to do
> with the implementation of events.  Can't we just ignore those writes?
> Or better yet, make gdb/thread-db.c smart enough not to set event
> breakpoints in the first place when the underyling target doesn't have
> execution?

I tried that; there was some other problem.  It might have been in my
implementation.  Indeed upon looking back at it I see that you are
correct.  Maybe it would work.

> > Of much more interest to me is the fact that the LWP view of core files
> > can be supported cross-platform and the thread_db view of core files
> > can not be.  That is IMO a very substantial design flaw in
> > libthread_db.  Not a problem if all the world's a SPARC, but after the
> > effort I and others went through in order to make cross core debugging
> > functional I'm reluctant to use libthread_db anywhere I can avoid
> > it.
> 
> This is the more substantial objection, it seems to me.  But simply
> because libthread_db can't be used for cross-platform core files
> doesn't mean we shouldn't use it in the native case --- for the same
> reasons we use it on live processes.

Maybe.... I don't think the analogy holds.  When we use it on live
processes there is always a system (somewhere) on which thread_db could
be running.  That's why I was willing to use it in gdbserver.  Of
course, it's ONE MORE library that needs to be on all my targets now,
which I'm not in love with.

Debugging a core dump can't validly require access to a target.  So
making "native debug of a core dump" different from the hopeful "cross
debug of a core dump" seems a bit dodgy.  I'd call the libthread_db
approach broken for this purpose (a little outside its design scope
perhaps).

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-06-21 21:03 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-19  9:00 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 [this message]
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
2002-06-22  1:04     ` unsuscribe phi
     [not found] <1024952640.13693.ezmlm@sources.redhat.com>
2002-06-25  1:48 ` GDB support for thread-local storage 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

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=20020621210302.GA25010@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.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