From 8286f90e97e48c0b3b02097be1ac54f30216dfaa Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 23 Jan 2003 07:55:00 +0000 Subject: Per patch from Nathan Field at ghs.com, add a couple of variables needed to make gdb happy when debugging threadded apps. --- libpthread/linuxthreads/manager.c | 4 ++++ libpthread/linuxthreads/specific.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/libpthread/linuxthreads/manager.c b/libpthread/linuxthreads/manager.c index 1b513ca92..ba4849d37 100644 --- a/libpthread/linuxthreads/manager.c +++ b/libpthread/linuxthreads/manager.c @@ -56,6 +56,10 @@ struct pthread_handle_struct __pthread_handles[PTHREAD_THREADS_MAX] = /* For debugging purposes put the maximum number of threads in a variable. */ const int __linuxthreads_pthread_threads_max = PTHREAD_THREADS_MAX; +/* Put the size of the pthread_descr in a variable to make gdb happy. */ +const int __linuxthreads_pthread_sizeof_descr + = sizeof(struct _pthread_descr_struct); + /* Indicate whether at least one thread has a user-defined stack (if 1), or if all threads have stacks supplied by LinuxThreads (if 0). */ int __pthread_nonstandard_stacks; diff --git a/libpthread/linuxthreads/specific.c b/libpthread/linuxthreads/specific.c index cf54f7fa1..120bb13df 100644 --- a/libpthread/linuxthreads/specific.c +++ b/libpthread/linuxthreads/specific.c @@ -27,6 +27,9 @@ static struct pthread_key_struct pthread_keys[PTHREAD_KEYS_MAX] = { { 0, NULL } }; +/* Put the maximum number of keys in a variable to make gdb happy. */ +const int __linuxthreads_pthread_keys_max = PTHREAD_KEYS_MAX; + /* Mutex to protect access to pthread_keys */ static pthread_mutex_t pthread_keys_mutex = PTHREAD_MUTEX_INITIALIZER; -- cgit v1.2.3