summaryrefslogtreecommitdiff
path: root/nptl_db/td_thr_get_info.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-17 09:59:14 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-17 10:04:06 +0200
commita78e5979a92c7985eadad7246740f3874271303f (patch)
tree7f81163f014fa77b5270950f1679e4a188cdf92a /nptl_db/td_thr_get_info.c
parentc1760eaf3b575ad174fd88b252fd16bd525fa818 (diff)
downloadglibc-a78e5979a92c7985eadad7246740f3874271303f.tar.gz
nptl: Move __nptl_initial_report_events into ld.so/startup code
The initialization of the report_events TCB field is now performed in __tls_init_tp instead of __pthread_initialize_minimal_internal (in libpthread). The events interface is difficult to test because GDB stopped using it in 2015. The td_thr_get_info change to ignore lookup issues is enough to support GDB with this change. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl_db/td_thr_get_info.c')
-rw-r--r--nptl_db/td_thr_get_info.c11
1 files changed, 9 insertions, 2 deletions
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
{