Skip to content

Commit

Permalink
ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)
Browse files Browse the repository at this point in the history
commit a4b6cb7 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Anton Kolesov authored and Greg Kroah-Hartman committed Jul 28, 2014
1 parent 15c37d7 commit 0163da2
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arc/include/uapi/asm/ptrace.h
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
#ifndef _UAPI__ASM_ARC_PTRACE_H
#define _UAPI__ASM_ARC_PTRACE_H

#define PTRACE_GET_THREAD_AREA 25

#ifndef __ASSEMBLY__
/*
4 changes: 4 additions & 0 deletions arch/arc/kernel/ptrace.c
Original file line number Diff line number Diff line change
@@ -146,6 +146,10 @@ long arch_ptrace(struct task_struct *child, long request,
pr_debug("REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n", request, addr, data);

switch (request) {
case PTRACE_GET_THREAD_AREA:
ret = put_user(task_thread_info(child)->thr_ptr,
(unsigned long __user *)data);
break;
default:
ret = ptrace_request(child, request, addr, data);
break;

0 comments on commit 0163da2

Please sign in to comment.