Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4b6cb73 authored by Anton Kolesov's avatar Anton Kolesov Committed by Vineet Gupta
Browse files

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: default avatarAnton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent bef444a3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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;