diff options
author | Junling Zheng <zhengjunling@huawei.com> | 2015-07-20 13:33:57 +0000 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2015-08-27 06:10:11 +0200 |
commit | d63ef2748f18c0f20ea866cb197fa3068f180ec7 (patch) | |
tree | f3245c2a564056213e7257cd2b299f5a12f6758a /test/assert | |
parent | bb1be3426bfe3f98e00ba5d172bd779df084845e (diff) |
nptl_db/db_info: fix the incorrect initial size for dtvp
When debugging a program on ARMv7 with thread-local storage declared using
"__thread", attempting to print a thread-local variable will result in the
following message:
Cannot find thread-local storage for Thread <snip> (LWP <snip>), executable
file /tmp/tls: capability not available
This can be traced back to uclibc libpthread/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 libpthread/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.
Fixed the initial size for dtvp to sizeof a pointer, instead of sizeof
the union.
Refer to:
http://sourceware.org/ml/libc-alpha/2006-10/msg00088.html
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=416b630981788c1f08e746e19765aa0e5c2a1360
Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Diffstat (limited to 'test/assert')
0 files changed, 0 insertions, 0 deletions