forked from luck/tmp_suning_uos_patched
powerpc: arch_has_single_step
This defines the new standard arch_has_single_step macro. It makes the existing set_single_step and clear_single_step 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>
This commit is contained in:
parent
227195d4a6
commit
2a84b0d719
@ -256,7 +256,7 @@ static int set_evrregs(struct task_struct *task, unsigned long *data)
|
|||||||
#endif /* CONFIG_SPE */
|
#endif /* CONFIG_SPE */
|
||||||
|
|
||||||
|
|
||||||
static void set_single_step(struct task_struct *task)
|
void user_enable_single_step(struct task_struct *task)
|
||||||
{
|
{
|
||||||
struct pt_regs *regs = task->thread.regs;
|
struct pt_regs *regs = task->thread.regs;
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ static void set_single_step(struct task_struct *task)
|
|||||||
set_tsk_thread_flag(task, TIF_SINGLESTEP);
|
set_tsk_thread_flag(task, TIF_SINGLESTEP);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_single_step(struct task_struct *task)
|
void user_disable_single_step(struct task_struct *task)
|
||||||
{
|
{
|
||||||
struct pt_regs *regs = task->thread.regs;
|
struct pt_regs *regs = task->thread.regs;
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
|
|||||||
void ptrace_disable(struct task_struct *child)
|
void ptrace_disable(struct task_struct *child)
|
||||||
{
|
{
|
||||||
/* make sure the single step bit is not set. */
|
/* make sure the single step bit is not set. */
|
||||||
clear_single_step(child);
|
user_disable_single_step(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -456,7 +456,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||||||
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
||||||
child->exit_code = data;
|
child->exit_code = data;
|
||||||
/* make sure the single step bit is not set. */
|
/* make sure the single step bit is not set. */
|
||||||
clear_single_step(child);
|
user_disable_single_step(child);
|
||||||
wake_up_process(child);
|
wake_up_process(child);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
@ -473,7 +473,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||||||
break;
|
break;
|
||||||
child->exit_code = SIGKILL;
|
child->exit_code = SIGKILL;
|
||||||
/* make sure the single step bit is not set. */
|
/* make sure the single step bit is not set. */
|
||||||
clear_single_step(child);
|
user_disable_single_step(child);
|
||||||
wake_up_process(child);
|
wake_up_process(child);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -483,7 +483,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||||||
if (!valid_signal(data))
|
if (!valid_signal(data))
|
||||||
break;
|
break;
|
||||||
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
|
||||||
set_single_step(child);
|
user_enable_single_step(child);
|
||||||
child->exit_code = data;
|
child->exit_code = data;
|
||||||
/* give it a chance to run. */
|
/* give it a chance to run. */
|
||||||
wake_up_process(child);
|
wake_up_process(child);
|
||||||
|
@ -119,6 +119,13 @@ do { \
|
|||||||
} while (0)
|
} while (0)
|
||||||
#endif /* __powerpc64__ */
|
#endif /* __powerpc64__ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 *);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user