This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: configuring gdb 5.x for use with threads
On Sat, Nov 17, 2001 at 09:53:49AM -0700, Kevin Buettner wrote:
> On Nov 17, 2:27pm, peter@a59252.upc-a.chello.nl wrote:
>
> > I rebuild my glibc+linuxthreads 2.2.4 agains my linuxkernel
> > 2.4.15-pre5 SMP, a libthread_db-1.0.so was build.
>
> Make sure that you have the following patch (to glibc) applied. I too
> was having problems with debugging multithreaded programs that were
> linked against libraries from glibc 2.2.4. This patch fixed the
> problems that I was seeing...
>
> 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
>
> * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
> to __linuxthreads_pthread_sizeof_descr to match name used by
> symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
> linuxthreads_db/td_symbol_list.c.
>
> ===================================================================
> RCS file: /cvs/glibc/libc/linuxthreads/pthread.c,v
> retrieving revision 1.86
> retrieving revision 1.87
> diff -u -r1.86 -r1.87
> --- libc/linuxthreads/pthread.c 2001/09/12 03:51:41 1.86
> +++ libc/linuxthreads/pthread.c 2001/10/07 20:19:16 1.87
> @@ -211,7 +211,7 @@
> h_descr);
> const int __pthread_offsetof_pid = offsetof(struct _pthread_descr_struct,
> p_pid);
> -const int __linuxthread_pthread_sizeof_descr
> +const int __linuxthreads_pthread_sizeof_descr
> = sizeof(struct _pthread_descr_struct);
>
> /* Forward declarations */
>
Hi,.
This patch wouldn't fix the problemm,. however I put on my stout shoes and build myself a libc from the cvs libc-2.2-branch. This did the trick. However there is another problem now ;-).
using gdb 5.0.93-2001-11-18-cvs the following happens: after attaching to a threaded programm, all threads that are in detached state and should exit, leak. this will continue until my process table swamps.
I'm a developer, and willing to put some (though limited; business is hard these days) time into this but I'm sort of in the dark here.
and help, hints, etc. appreciated.
regards,
Peter Zijlstra