diff options
author | Anton Kolesov <Anton.Kolesov@synopsys.com> | 2014-06-20 12:28:39 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2014-06-26 00:44:08 -0400 |
commit | a4b6cb735b25aa84a462a1985e3e43bebaf5beb4 (patch) | |
tree | 5ff43d74e50b62fa401e79fa0cbf0715195907f5 /arch/arc | |
parent | bef444a33004f4062930df1fc703a25dd6d7b460 (diff) |
ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)
This patch adds implementation of GET_THREAD_AREA ptrace request type. This
is required by GDB to debug NPTL applications.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r-- | arch/arc/include/uapi/asm/ptrace.h | 1 | ||||
-rw-r--r-- | arch/arc/kernel/ptrace.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/arc/include/uapi/asm/ptrace.h b/arch/arc/include/uapi/asm/ptrace.h index 2618cc13ba75..76a7739aab1c 100644 --- a/arch/arc/include/uapi/asm/ptrace.h +++ b/arch/arc/include/uapi/asm/ptrace.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef _UAPI__ASM_ARC_PTRACE_H | 11 | #ifndef _UAPI__ASM_ARC_PTRACE_H |
12 | #define _UAPI__ASM_ARC_PTRACE_H | 12 | #define _UAPI__ASM_ARC_PTRACE_H |
13 | 13 | ||
14 | #define PTRACE_GET_THREAD_AREA 25 | ||
14 | 15 | ||
15 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
16 | /* | 17 | /* |
diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c index 5d76706139dd..13b3ffb27a38 100644 --- a/arch/arc/kernel/ptrace.c +++ b/arch/arc/kernel/ptrace.c | |||
@@ -146,6 +146,10 @@ long arch_ptrace(struct task_struct *child, long request, | |||
146 | pr_debug("REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n", request, addr, data); | 146 | pr_debug("REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n", request, addr, data); |
147 | 147 | ||
148 | switch (request) { | 148 | switch (request) { |
149 | case PTRACE_GET_THREAD_AREA: | ||
150 | ret = put_user(task_thread_info(child)->thr_ptr, | ||
151 | (unsigned long __user *)data); | ||
152 | break; | ||
149 | default: | 153 | default: |
150 | ret = ptrace_request(child, request, addr, data); | 154 | ret = ptrace_request(child, request, addr, data); |
151 | break; | 155 | break; |