This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: gdb and linuxthreads
- To: drepper@cygnus.com
- Subject: Re: gdb and linuxthreads
- From: hjl@lucon.org (H.J. Lu)
- Date: Wed, 2 Dec 1998 10:04:25 -0800 (PST)
- Cc: libc-hacker@cygnus.com
>
> hjl@lucon.org (H.J. Lu) writes:
>
> > Does anyone know who wrote the linuxthreads support for gdb?
>
> OSF at Grenoble, Switzerland.
Email addresses?
>
> > Does anyone have a patch?
>
> No. I think they have not looked at glibc 2.1 at all.
>
Here is a patch for linuxthreads. It will tell gdb which glibc the
binary is linked against. I may be able to fix gdb for glibc 2.1
with some kludges.
Thanks.
--
H.J. Lu (hjl@gnu.org)
---
Wed Dec 2 08:40:43 1998 H.J. Lu <hjl@gnu.org>
* pthread.c (__pthread_sig_restart): Always initiliaze it in
pthread_initialize.
(__pthread_sig_cancel): Likewise.
Index: pthread.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc/linuxthreads/pthread.c,v
retrieving revision 1.1.1.8
diff -u -p -r1.1.1.8 pthread.c
--- pthread.c 1998/10/31 16:47:04 1.1.1.8
+++ pthread.c 1998/12/02 17:58:59
@@ -147,8 +147,8 @@ const int __pthread_offsetof_pid = offse
p_pid);
/* Signal numbers used for the communication. */
-int __pthread_sig_restart = DEFAULT_SIG_RESTART;
-int __pthread_sig_cancel = DEFAULT_SIG_CANCEL;
+int __pthread_sig_restart = -1;
+int __pthread_sig_cancel = -1;
/* These variables are used by the setup code. */
extern int _errno;
@@ -222,6 +222,9 @@ static void pthread_initialize(void)
__pthread_sig_restart = DEFAULT_SIG_RESTART;
__pthread_sig_cancel = DEFAULT_SIG_CANCEL;
}
+#else
+ __pthread_sig_restart = DEFAULT_SIG_RESTART;
+ __pthread_sig_cancel = DEFAULT_SIG_CANCEL;
#endif
/* Setup signal handlers for the initial thread.
Since signal handlers are shared between threads, these settings