Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79876
b: refs/heads/master
c: 2a84b0d
h: refs/heads/master
v: v3
  • Loading branch information
Roland McGrath authored and Ingo Molnar committed Jan 30, 2008
1 parent babf839 commit 637957c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 227195d4a6185e81855f56ed9bc815cad9a39398
refs/heads/master: 2a84b0d71973692b291f03a870c4d0d13f722d79
12 changes: 6 additions & 6 deletions trunk/arch/powerpc/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int set_evrregs(struct task_struct *task, unsigned long *data)
#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;

Expand All @@ -271,7 +271,7 @@ static void set_single_step(struct task_struct *task)
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;

Expand Down Expand Up @@ -313,7 +313,7 @@ static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
void ptrace_disable(struct task_struct *child)
{
/* make sure the single step bit is not set. */
clear_single_step(child);
user_disable_single_step(child);
}

/*
Expand Down Expand Up @@ -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);
child->exit_code = data;
/* make sure the single step bit is not set. */
clear_single_step(child);
user_disable_single_step(child);
wake_up_process(child);
ret = 0;
break;
Expand All @@ -473,7 +473,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
break;
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
clear_single_step(child);
user_disable_single_step(child);
wake_up_process(child);
break;
}
Expand All @@ -483,7 +483,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
if (!valid_signal(data))
break;
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
set_single_step(child);
user_enable_single_step(child);
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/asm-powerpc/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ do { \
} while (0)
#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 /* __KERNEL__ */
Expand Down

0 comments on commit 637957c

Please sign in to comment.