about summary refs log tree commit diff
path: root/nptl_db
diff options
context:
space:
mode:
Diffstat (limited to 'nptl_db')
-rw-r--r--nptl_db/db_info.c3
-rw-r--r--nptl_db/structs.def2
-rw-r--r--nptl_db/td_thr_get_info.c11
3 files changed, 10 insertions, 6 deletions
diff --git a/nptl_db/db_info.c b/nptl_db/db_info.c
index bed6ed486e..b39aebb78c 100644
--- a/nptl_db/db_info.c
+++ b/nptl_db/db_info.c
@@ -42,9 +42,6 @@ typedef struct rtld_global rtld_global;
 typedef struct dtv_slotinfo_list dtv_slotinfo_list;
 typedef struct dtv_slotinfo dtv_slotinfo;
 
-/* Actually static in nptl/init.c, but we only need it for typeof.  */
-extern bool __nptl_initial_report_events;
-
 #define schedparam_sched_priority schedparam.sched_priority
 
 #define eventbuf_eventmask eventbuf.eventmask
diff --git a/nptl_db/structs.def b/nptl_db/structs.def
index 9173e1ab8f..275c12bc7a 100644
--- a/nptl_db/structs.def
+++ b/nptl_db/structs.def
@@ -80,7 +80,7 @@ DB_FUNCTION (__nptl_death_event)
 DB_SYMBOL (__nptl_threads_events)
 DB_MAIN_VARIABLE (__nptl_nthreads)
 DB_VARIABLE (__nptl_last_event)
-DB_VARIABLE (__nptl_initial_report_events)
+DB_RTLD_VARIABLE (__nptl_initial_report_events)
 
 DB_MAIN_ARRAY_VARIABLE (__pthread_keys)
 DB_STRUCT (pthread_key_struct)
diff --git a/nptl_db/td_thr_get_info.c b/nptl_db/td_thr_get_info.c
index 002a22a5be..01af021d2a 100644
--- a/nptl_db/td_thr_get_info.c
+++ b/nptl_db/td_thr_get_info.c
@@ -41,8 +41,15 @@ td_thr_get_info (const td_thrhandle_t *th, td_thrinfo_t *infop)
       schedpolicy = SCHED_OTHER;
       schedprio = 0;
       tid = 0;
-      err = DB_GET_VALUE (report_events, th->th_ta_p,
-			  __nptl_initial_report_events, 0);
+
+      /* Ignore errors to obtain the __nptl_initial_report_events
+	 value because GDB no longer uses the events interface, and
+	 other libthread_db consumers hopefully can handle different
+	 libpthread/lds.o load orders.  */
+      report_events = 0;
+      (void) DB_GET_VALUE (report_events, th->th_ta_p,
+			   __nptl_initial_report_events, 0);
+      err = TD_OK;
     }
   else
     {