This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] Include the LWP in thread-db's PTIDs


On Mon, Oct 11, 2004 at 02:28:32PM -0400, Andrew Cagney wrote:
> >Also, it was an approved patch.  Michael responded at the end of the
> >thread saying that he agreed it was the right thing not to use
> >thread_db on core files.  Yes, there was a lot of disagreement before
> >that; but before the patch was committed the thread-db.c maintainer
> >agreed that we should not to use thread_db in this case.  I think I'm
> >justified in saying that "we" have decided this.
> 
> But here on this technical matter I'm not.
> 
> The discussion starts here (there's a bit in the next month):
> http://sources.redhat.com/ml/gdb-patches/2001-12/msg00345.html
> please read it.

Yes, I read that.

> Given that this was "hard" Michael approved the change (a sound 
> technical decision).
> 
> Just like on Solaris and consistent with the original thread, the 
> user-level thread library should be loaded over the core file as only by 
> doing that can user-level thread information be displayed.

Actually, Michael didn't explain why he changed his mind - he just
eventually agreed.  Since he's still right here we could ask him :-)
but let's just move on.

> If this makes cross debugging "iffy", fix the bugs, don't cripple GDB 
> for it's native users.

Some thinking about your messages has persuaded me that you're right
that we should support thread-db as a separate stratum and support
using it for core files (although I will remain opposed to doing it by
default unless someone adds a robust do-this-image-and-library-match
check - hmm, maybe it's OK if libc is found from the system location
instead of via solib-search-path and solib-absolute-prefix?).

However, please stop calling this a "crippling" issue.  Can you even
list the visible changes that using thread-db would cause over just
using corelow's LWP support?  As far as I know there are two:

  - Thread IDs would not be displayed.  Since these are pointer-sized
    numbers internal to the NPTL implementation, that's not much of a
    loss.

  - TLS data may not work, because we currently use thread_db to find
    the thread's TLS base.  This could be pretty easily fixed by using
    a gdbarch mechanism to return the architecture's TLS base and an
    xfer_partial gdbarch hook to query native or remote targets for the
    value.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]