summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Griffin <pgriffin@mpc-data.co.uk>2009-05-08 15:50:54 +0100
committerPaul Mundt <lethal@linux-sh.org>2009-05-09 00:11:27 +0900
commitba0d474082dfa37fb0efd439b4d0c0234ceb1e80 (patch)
tree1726f2fc031d0ab64a208e1b9424871600c34d1b
parente73173dbe55e5b4c2306728aad50c8e42194f6d5 (diff)
downloadlinux-ba0d474082dfa37fb0efd439b4d0c0234ceb1e80.tar.bz2
sh: Add ptrace support for NOMMU debugging
Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/kernel/ptrace_32.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index f7b22dd83b0c..3392e835a374 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -334,6 +334,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
[(addr - (long)&dummy->fpu) >> 2];
} else if (addr == (long) &dummy->u_fpvalid)
tmp = !!tsk_used_math(child);
+ else if (addr == PT_TEXT_ADDR)
+ tmp = child->mm->start_code;
+ else if (addr == PT_DATA_ADDR)
+ tmp = child->mm->start_data;
+ else if (addr == PT_TEXT_END_ADDR)
+ tmp = child->mm->end_code;
+ else if (addr == PT_TEXT_LEN)
+ tmp = child->mm->end_code - child->mm->start_code;
else
tmp = 0;
ret = put_user(tmp, datap);