Waldemar,
On Mon, Jul 20, 2015 at 4:33 PM, Junling Zheng <zhengjunling(a)huawei.com> wrote:
> 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=416b630981788c1f08e7…
>
> Signed-off-by: Junling Zheng <zhengjunling(a)huawei.com>
> ---
> libpthread/nptl_db/db_info.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libpthread/nptl_db/db_info.c b/libpthread/nptl_db/db_info.c
> index a57a053..159a027 100644
> --- a/libpthread/nptl_db/db_info.c
> +++ b/libpthread/nptl_db/db_info.c
> @@ -60,7 +60,7 @@ extern bool __nptl_initial_report_events;
> i.e. at the very end of the area covered by TLS_PRE_TCB_SIZE. */
> DESC (_thread_db_pthread_dtvp,
> TLS_PRE_TCB_SIZE + offsetof (tcbhead_t, dtv)
> - - (TLS_TCB_SIZE == 0 ? sizeof (tcbhead_t) : 0), union dtv)
> + - (TLS_TCB_SIZE == 0 ? sizeof (tcbhead_t) : 0), union dtv *)
> #endif
>
Please apply this patch to the uClibc-ng as well, it fixes inspection of
TLS variables in gdb for many architectures.
--
Thanks.
-- Max
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via d63ef2748f18c0f20ea866cb197fa3068f180ec7 (commit)
from bb1be3426bfe3f98e00ba5d172bd779df084845e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d63ef2748f18c0f20ea866cb197fa3068f180ec7
Author: Junling Zheng <zhengjunling(a)huawei.com>
Date: Mon Jul 20 13:33:57 2015 +0000
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.htmlhttps://sourceware.org/git/?p=glibc.git;a=commitdiff;h=416b630981788c1f08e7…
Signed-off-by: Junling Zheng <zhengjunling(a)huawei.com>
-----------------------------------------------------------------------
Summary of changes:
libpthread/nptl_db/db_info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libpthread/nptl_db/db_info.c b/libpthread/nptl_db/db_info.c
index a57a053..159a027 100644
--- a/libpthread/nptl_db/db_info.c
+++ b/libpthread/nptl_db/db_info.c
@@ -60,7 +60,7 @@ extern bool __nptl_initial_report_events;
i.e. at the very end of the area covered by TLS_PRE_TCB_SIZE. */
DESC (_thread_db_pthread_dtvp,
TLS_PRE_TCB_SIZE + offsetof (tcbhead_t, dtv)
- - (TLS_TCB_SIZE == 0 ? sizeof (tcbhead_t) : 0), union dtv)
+ - (TLS_TCB_SIZE == 0 ? sizeof (tcbhead_t) : 0), union dtv *)
#endif
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
Hi,
freely after the motto "release early, release often" I decided to
make a release today.
We now have support for mkstemps, mkstemps64 and mkostemps,
mkostemps64 functions, which is required for enlightment software
(efl). Furthermore the backward symlinks for gcc to find ld.so
are now installed automatically. And as usual bugfixes, mainly
found by autobuilders of buildroot project.
best regards
Waldemar
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The annotated tag, v1.0.6 has been created
at 51dbd5d98f634251cbe6552bfdfdfe4c2fb6bb4e (tag)
tagging bb1be3426bfe3f98e00ba5d172bd779df084845e (commit)
replaces v1.0.5
tagged by Waldemar Brodkorb
on Sat Aug 22 21:46:46 2015 +0200
- Log -----------------------------------------------------------------
release 1.0.6 - Grimbergen Double
Romain Naour (2):
add mkstemps, mkstemps64 and mkostemps, mkostemps64 functions
add tests for mkostemps()
Waldemar Brodkorb (9):
locales: add patch from OpenWrt
getenv: allow overwriting of function
glibc compat: bump glibc minor version
fix some type differences to linux-next for h8/300
ldso: install backward compatibility symlink by default
Revert "ldso: install backward compatibility symlink by default"
ldso: install backward compatibility symlink by default
quieten compile warnings
bump version
-----------------------------------------------------------------------
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via cb62dc41759f526e0ea8ed7c7ad8050a093ff827 (commit)
from f52fb21a7af0aa4e983b3e6c2ddd1b6a526b5169 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cb62dc41759f526e0ea8ed7c7ad8050a093ff827
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Wed Aug 19 02:19:02 2015 +0200
Revert "ldso: install backward compatibility symlink by default"
This reverts commit f52fb21a7af0aa4e983b3e6c2ddd1b6a526b5169.
Totally wrong patch.
-----------------------------------------------------------------------
Summary of changes:
ldso/ldso/Makefile.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index 21e0dbc..424131c 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -74,8 +74,6 @@ $(ldso): $(ldso:.$(ABI_VERSION)=)
$(ldso:.$(ABI_VERSION)=): | $(top_builddir)lib
$(ldso:.$(ABI_VERSION)=): $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a
$(call link.so,$(ldso_FULL_NAME),$(ABI_VERSION))
- # link for backward compatibility
- $(call link.so,$(ldso_FULL_NAME),0)
$($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a: $(ldso-y)
$(Q)$(RM) $@
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via 58eeb61bd059255436972c0039bcd4b68ef47247 (commit)
from 9b9abfbd25d5f95010241bdd72941dafecd56b0e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 58eeb61bd059255436972c0039bcd4b68ef47247
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Wed Aug 19 02:18:24 2015 +0200
Revert "ldso: install backward compatibility symlink by default"
This reverts commit 9b9abfbd25d5f95010241bdd72941dafecd56b0e.
Totally wrong patch. sorry.
-----------------------------------------------------------------------
Summary of changes:
ldso/ldso/Makefile.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index 21e0dbc..424131c 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -74,8 +74,6 @@ $(ldso): $(ldso:.$(ABI_VERSION)=)
$(ldso:.$(ABI_VERSION)=): | $(top_builddir)lib
$(ldso:.$(ABI_VERSION)=): $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a
$(call link.so,$(ldso_FULL_NAME),$(ABI_VERSION))
- # link for backward compatibility
- $(call link.so,$(ldso_FULL_NAME),0)
$($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a: $(ldso-y)
$(Q)$(RM) $@
hooks/post-receive
--
uClibc-ng - small C library for embedded systems