[PATCH] TLS fix for debugging thread-local variables
Pete Eberlein
eberlein@us.ibm.com
Tue Oct 31 13:57:00 GMT 2006
When debugging a program on PowerPC with thread-local storage declared using
"__thread", attempting to print a thread-local variable results in the the
message "Cannot find thread-local storage for Thread <snip>: capability not
available". This can be traced back to libc nptl_db/td_thr_tls_get_addr.c which
gdb uses to look up the address of the TLS. The function returns TD_NOCAPAB due
to a mismatch in size between the DTV pointer and the size recorded in the db
description. The problem lies in nptl_db/db_info.c which initializes the db
with the sizeof the union dtv. Instead it should be the sizeof a pointer to
union dtv.
--
Pete Eberlein
IBM Linux Technology Center
Linux on Power Toolchain
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: glibc20061026patch.txt
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20061031/b4e6b993/attachment.txt>
More information about the Libc-alpha
mailing list