This is the mail archive of the 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: 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, wrote:
> > I rebuild my glibc+linuxthreads 2.2.4 agains my linuxkernel
> > 2.4.15-pre5 SMP, a 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  <>
> 	* pthread.c (__linuxthread_pthread_sizeof_descr): Change name
> 	to __linuxthreads_pthread_sizeof_descr to match name used by
> 	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 */


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.


Peter Zijlstra

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