summaryrefslogtreecommitdiff
path: root/arch/um/sys-x86_64/ptrace.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-02-10 01:44:30 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 10:51:24 -0800
commit6e6d74cfac782a3a4cb5111bd9c25cd95d6b7c6c (patch)
treef63c0433740168f56916ece27793e9b69a40e072 /arch/um/sys-x86_64/ptrace.c
parentf355559cf78455ed6be103b020e4b800230c64eb (diff)
[PATCH] uml: x86_64 ptrace fixes
This patch fixes some missing ptrace bits on x86_64. PTRACE_ARCH_PRCTL is hooked up and implemented. This required generalizing arch_prctl_skas slightly to take a task_struct to modify. Previously, it always operated on current. Reading and writing the debug registers is also enabled by un-ifdefing the code that implements that. It turns out that x86_64 is identical to i386, so the same code can be used. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/sys-x86_64/ptrace.c')
-rw-r--r--arch/um/sys-x86_64/ptrace.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86_64/ptrace.c
index 147bbf05cbc2..55b66e09a98c 100644
--- a/arch/um/sys-x86_64/ptrace.c
+++ b/arch/um/sys-x86_64/ptrace.c
@@ -71,8 +71,6 @@ int poke_user(struct task_struct *child, long addr, long data)
if (addr < MAX_REG_OFFSET)
return putreg(child, addr, data);
-
-#if 0 /* Need x86_64 debugregs handling */
else if((addr >= offsetof(struct user, u_debugreg[0])) &&
(addr <= offsetof(struct user, u_debugreg[7]))){
addr -= offsetof(struct user, u_debugreg[0]);
@@ -81,7 +79,6 @@ int poke_user(struct task_struct *child, long addr, long data)
child->thread.arch.debugregs[addr] = data;
return 0;
}
-#endif
return -EIO;
}
@@ -119,14 +116,12 @@ int peek_user(struct task_struct *child, long addr, long data)
if(addr < MAX_REG_OFFSET){
tmp = getreg(child, addr);
}
-#if 0 /* Need x86_64 debugregs handling */
else if((addr >= offsetof(struct user, u_debugreg[0])) &&
(addr <= offsetof(struct user, u_debugreg[7]))){
addr -= offsetof(struct user, u_debugreg[0]);
addr = addr >> 2;
tmp = child->thread.arch.debugregs[addr];
}
-#endif
return put_user(tmp, (unsigned long *) data);
}