aboutsummaryrefslogtreecommitdiffstats
path: root/arch/hexagon/kernel/ptrace.c
diff options
context:
space:
mode:
authorRichard Kuo <rkuo@codeaurora.org>2013-03-07 13:03:10 -0500
committerRichard Kuo <rkuo@codeaurora.org>2013-04-30 20:40:25 -0400
commit7777746c40876834c1527689336e43c8381b1921 (patch)
treeb3257768e29db418ab9292a4e9a27c56e1e88fed /arch/hexagon/kernel/ptrace.c
parentf8722a4d5243e779d6795e2d775c9114c44a6c26 (diff)
Hexagon: add support for single-stepping (v4+)
Hardware single-step is only available on v4 and later architectures. Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Diffstat (limited to 'arch/hexagon/kernel/ptrace.c')
-rw-r--r--arch/hexagon/kernel/ptrace.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/hexagon/kernel/ptrace.c b/arch/hexagon/kernel/ptrace.c
index 3982d9c9ec2b..70df50d797d8 100644
--- a/arch/hexagon/kernel/ptrace.c
+++ b/arch/hexagon/kernel/ptrace.c
@@ -32,6 +32,21 @@
32 32
33#include <asm/user.h> 33#include <asm/user.h>
34 34
35#if arch_has_single_step()
36/* Both called from ptrace_resume */
37void user_enable_single_step(struct task_struct *child)
38{
39 pt_set_singlestep(task_pt_regs(child));
40 set_tsk_thread_flag(child, TIF_SINGLESTEP);
41}
42
43void user_disable_single_step(struct task_struct *child)
44{
45 pt_clr_singlestep(task_pt_regs(child));
46 clear_tsk_thread_flag(child, TIF_SINGLESTEP);
47}
48#endif
49
35static int genregs_get(struct task_struct *target, 50static int genregs_get(struct task_struct *target,
36 const struct user_regset *regset, 51 const struct user_regset *regset,
37 unsigned int pos, unsigned int count, 52 unsigned int pos, unsigned int count,