GDB 6.0 and FreeBSD threads
Julian Elischer
julian at elischer.org
Sun Mar 28 21:15:02 PST 2004
Niall Douglas wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 28 Mar 2004 at 9:47, Daniel Eischen wrote:
>
>
>>No-one has touched uthread support for other GDB's as
>>far as I know. Most work is going in to our other thread
>>libraries. There is work trying to get GDB thread support
>>for libpthread, and that should be here by 5.3-release.
>
>
> I discovered late last night that libc_r implements only userland
> threads which seem to have issues with pipes (my code kept hanging
> inside the pipe i/o). I then discovered there are real system scope
> threads too, but they're in a different library called libkse.
actually it's now called libpthread and linkse was it's development name.
We have't been exactly quiet about this.. it's even in the release notes for 5.2.1.
>
> You guys could seriously improve the documentation inside the man
> pages. Please! Just a two line paragraph would have saved me more
> than a day of work.
>
we can't guess what question every developer is going to ask..
But possibly the following paragraph in "man pthread"
might be made a bit clearer...
INSTALLATION
The current FreeBSD POSIX thread implementation is built in three
libraries, Reentrant C Library (libc_r, -lc_r), POSIX Threads Library
(libpthread, -lpthread), and 1:1 Threading Library (libthr, -lthr). They
contain both thread-safe versions of Standard C Library (libc, -lc) func-
tions and the thread functions. Threaded applications are linked with
one of these libraries.
> After linking to libkse and finding it really doesn't like coexisting
> with libc_r, I discovered the libmap.conf trick and it works now.
> Unfortunately I'm back to square one in that no gdb supports kse
> threads. This is a major problem as my code is heavily multithreaded.
why is libc_r beinbg linked into your application?
you need to select ONE of the libraries and link with that..
>
> Does this David Xu have some patch code for gdb around in some CVS
> repository? The only thing stopping me moving to FreeBSD as my
> primary Unix development platform is this as it's significantly
> faster than RedHat 9 on my system. If I could grab this support and
> get it mostly working, I could move to BSD permanently (in these last
> three days I find I prefer it to Linux for some unknown reason).
The threads support package is at:
http://people.freebsd.org/~davidxu/kse/thread_db/
however, realise that this is PRE_ALPHA.
you are "on your own" except for direct corespondence with david.
>
> Cheers,
> Niall
>
>
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
>
> iQA/AwUBQGdafcEcvDLFGKbPEQKnXwCeOWRlCexwgIr0pryUtvJQgbkbG3wAoM9s
> k0gJ5q5O7bUdM7tELZY5sWxw
> =zYb3
> -----END PGP SIGNATURE-----
> _______________________________________________
> freebsd-threads at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe at freebsd.org"
>
--
+------------------------------------+ ______ _ __
| __--_|\ Julian Elischer | \ U \/ / hard at work in
| / \ julian at elischer.org +------>x USA \ a very strange
| ( OZ ) \___ ___ | country !
+- X_.---._/ presently in San Francisco \_/ \\
v
More information about the freebsd-threads
mailing list