about summary refs log tree commit diff
path: root/nptl_db/td_thr_set_event.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_thr_set_event.c
parentee1a7fabb4e0abd3e73e828ce326dcb5fd38b874 (diff)
downloadglibc-6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd.tar.gz
glibc-6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd.tar.xz
glibc-6f1672172c9c9e5eb5afdcf521e3528b38b2e2dd.zip
Make libthread_db work without libpthread, just enough for TLS decoding. roland/nptl_db
Diffstat (limited to 'nptl_db/td_thr_set_event.c')
-rw-r--r--nptl_db/td_thr_set_event.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/nptl_db/td_thr_set_event.c b/nptl_db/td_thr_set_event.c
index 2bb0b9d1f8..772a25fd5e 100644
--- a/nptl_db/td_thr_set_event.c
+++ b/nptl_db/td_thr_set_event.c
@@ -1,5 +1,5 @@
 /* Enable specific event for thread.
-   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.
 
@@ -34,9 +34,12 @@ td_thr_set_event (th, event)
 
   LOG ("td_thr_set_event");
 
+  err = _td_ta_check_nptl (th->th_ta_p);
+
   /* Fetch the old event mask from the inferior and modify it in place.  */
-  err = DB_GET_FIELD_ADDRESS (eventmask, th->th_ta_p,
-			      th->th_unique, pthread, eventbuf_eventmask, 0);
+  if (err == TD_OK)
+    err = DB_GET_FIELD_ADDRESS (eventmask, th->th_ta_p,
+				th->th_unique, pthread, eventbuf_eventmask, 0);
   if (err == TD_OK)
     err = DB_GET_STRUCT (copy, th->th_ta_p, eventmask, td_thr_events_t);
   if (err == TD_OK)