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 6da5676cbe02149ef64197927b8b2fbec6055fc9 (commit)
from 5d793a8cfcf60e8e0bda3e6e2c1ab7a9aa30c558 (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 6da5676cbe02149ef64197927b8b2fbec6055fc9
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Tue Jun 30 17:46:56 2015 +0530
NPTL/arc: notify kernel of the TP value
Native gdb makes a ptrace (GET_THREAD_AREA) which needs to return the
TP. however when libc sets up TP reg (for main thread), it doesn't call
arc_settls syscall so kernel doesn't know of TP register details
(moreso because clone doesnt have SETTLS flag)
Note that kernel doesn't know about r25 being TP etc.
This commit got lost in merge of NPTL tools into arc-mainline-dev and
showed up again as STAR 9000919529 (native gdb can't debug threaded
apps)
------->8---------------
[ARCLinux]# gdb ./pth
Reading symbols from ./pth...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x106f2
(gdb) r
Starting program: /pth
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
thread_get_info_callback: cannot get thread info: generic error
(gdb) q
------->8---------------
Debugged-by: Anton Kolesov <akolesov(a)synopsys.com>
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
-----------------------------------------------------------------------
Summary of changes:
libpthread/nptl/sysdeps/arc/tls.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libpthread/nptl/sysdeps/arc/tls.h b/libpthread/nptl/sysdeps/arc/tls.h
index 63dd113..4af415a 100644
--- a/libpthread/nptl/sysdeps/arc/tls.h
+++ b/libpthread/nptl/sysdeps/arc/tls.h
@@ -104,8 +104,11 @@ typedef struct
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp, secondcall) \
({ \
- __builtin_set_thread_pointer(tcbp); \
- NULL; \
+ long result_var; \
+ __builtin_set_thread_pointer(tcbp); \
+ result_var = INTERNAL_SYSCALL (arc_settls, err, 1, (tcbp)); \
+ INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ ? "unknown error" : NULL; \
})
/* Return the address of the dtv for the current thread.
hooks/post-receive
--
uClibc-ng - small C library for embedded systems