This defines the new standard arch_has_single_step macro. It makes the
existing set_singlestep and clear_singlestep entry points global, and
renames them to the new standard names user_enable_single_step and
user_disable_single_step, respectively.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-static void set_singlestep(struct task_struct *child)
+void user_enable_single_step(struct task_struct *child)
{
struct pt_regs *regs = get_child_regs(child);
{
struct pt_regs *regs = get_child_regs(child);
child->ptrace |= PT_DTRACE;
}
child->ptrace |= PT_DTRACE;
}
-static void clear_singlestep(struct task_struct *child)
+void user_disable_single_step(struct task_struct *child)
{
/* Always clear TIF_SINGLESTEP... */
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
{
/* Always clear TIF_SINGLESTEP... */
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
*/
void ptrace_disable(struct task_struct *child)
{
*/
void ptrace_disable(struct task_struct *child)
{
- clear_singlestep(child);
+ user_disable_single_step(child);
clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
}
clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
}
}
child->exit_code = data;
/* make sure the single step bit is not set. */
}
child->exit_code = data;
/* make sure the single step bit is not set. */
- clear_singlestep(child);
+ user_disable_single_step(child);
wake_up_process(child);
ret = 0;
break;
wake_up_process(child);
ret = 0;
break;
break;
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
break;
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
- clear_singlestep(child);
+ user_disable_single_step(child);
wake_up_process(child);
break;
wake_up_process(child);
break;
clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
+ user_enable_single_step(child);
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
-static void set_singlestep(struct task_struct *child)
+void user_enable_single_step(struct task_struct *child)
{
struct pt_regs *regs = task_pt_regs(child);
{
struct pt_regs *regs = task_pt_regs(child);
child->ptrace |= PT_DTRACE;
}
child->ptrace |= PT_DTRACE;
}
-static void clear_singlestep(struct task_struct *child)
+void user_disable_single_step(struct task_struct *child)
{
/* Always clear TIF_SINGLESTEP... */
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
{
/* Always clear TIF_SINGLESTEP... */
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
*/
void ptrace_disable(struct task_struct *child)
{
*/
void ptrace_disable(struct task_struct *child)
{
- clear_singlestep(child);
+ user_disable_single_step(child);
}
static int putreg(struct task_struct *child,
}
static int putreg(struct task_struct *child,
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
child->exit_code = data;
/* make sure the single step bit is not set. */
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
child->exit_code = data;
/* make sure the single step bit is not set. */
- clear_singlestep(child);
+ user_disable_single_step(child);
wake_up_process(child);
ret = 0;
break;
wake_up_process(child);
ret = 0;
break;
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
- clear_singlestep(child);
+ user_disable_single_step(child);
wake_up_process(child);
break;
wake_up_process(child);
break;
if (!valid_signal(data))
break;
clear_tsk_thread_flag(child,TIF_SYSCALL_TRACE);
if (!valid_signal(data))
break;
clear_tsk_thread_flag(child,TIF_SYSCALL_TRACE);
+ user_enable_single_step(child);
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
+/*
+ * These are defined as per linux/ptrace.h, which see.
+ */
+#define arch_has_single_step() (1)
+extern void user_enable_single_step(struct task_struct *);
+extern void user_disable_single_step(struct task_struct *);
+
struct user_desc;
extern int do_get_thread_area(struct task_struct *p, int idx,
struct user_desc __user *info);
struct user_desc;
extern int do_get_thread_area(struct task_struct *p, int idx,
struct user_desc __user *info);