aboutsummaryrefslogtreecommitdiff
path: root/nptl_db/td_ta_get_nthreads.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-11-22 20:42:53 -0800
committerRoland McGrath <roland@redhat.com>2009-12-09 01:01:28 -0800
commit6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd (patch)
treef1ca70b5d1c32d593b0c2e825f10c56b49d14c06 /nptl_db/td_ta_get_nthreads.c
parentee1a7fabb4e0abd3e73e828ce326dcb5fd38b874 (diff)
downloadglibc-roland/nptl_db.tar
glibc-roland/nptl_db.tar.gz
glibc-roland/nptl_db.tar.bz2
glibc-roland/nptl_db.zip
Make libthread_db work without libpthread, just enough for TLS decoding.roland/nptl_db
Diffstat (limited to 'nptl_db/td_ta_get_nthreads.c')
-rw-r--r--nptl_db/td_ta_get_nthreads.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nptl_db/td_ta_get_nthreads.c b/nptl_db/td_ta_get_nthreads.c
index ffe78bd57e..a0480d1964 100644
--- a/nptl_db/td_ta_get_nthreads.c
+++ b/nptl_db/td_ta_get_nthreads.c
@@ -1,5 +1,5 @@
/* Get the number of threads in the process.
- Copyright (C) 1999,2001,2002,2003 Free Software Foundation, Inc.
+ Copyright (C) 1999,2001,2002,2003,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
@@ -33,6 +33,10 @@ td_ta_get_nthreads (const td_thragent_t *ta_arg, int *np)
if (! ta_ok (ta))
return TD_BADTA;
+ err = _td_ta_check_nptl (ta);
+ if (err != TD_OK)
+ return err;
+
/* Access the variable in the inferior that tells us. */
err = DB_GET_VALUE (n, ta, __nptl_nthreads, 0);
if (err == TD_OK)