Commit 25baa35b authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

ptrace: powerpc: implement user_single_step_siginfo()

Suggested by Roland.

Implement user_single_step_siginfo() for powerpc.
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarRoland McGrath <roland@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 85ec7fd9
...@@ -140,6 +140,8 @@ extern void user_enable_single_step(struct task_struct *); ...@@ -140,6 +140,8 @@ extern void user_enable_single_step(struct task_struct *);
extern void user_enable_block_step(struct task_struct *); extern void user_enable_block_step(struct task_struct *);
extern void user_disable_single_step(struct task_struct *); extern void user_disable_single_step(struct task_struct *);
#define ARCH_HAS_USER_SINGLE_STEP_INFO
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -174,6 +174,15 @@ int die(const char *str, struct pt_regs *regs, long err) ...@@ -174,6 +174,15 @@ int die(const char *str, struct pt_regs *regs, long err)
return 0; return 0;
} }
void user_single_step_siginfo(struct task_struct *tsk,
struct pt_regs *regs, siginfo_t *info)
{
memset(info, 0, sizeof(*info));
info->si_signo = SIGTRAP;
info->si_code = TRAP_TRACE;
info->si_addr = (void __user *)regs->nip;
}
void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
{ {
siginfo_t info; siginfo_t info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment