X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fkernel%2Fptrace.c;h=1f370cb2e03e13a4b2706a74b8a86936daeab5ae;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c24367432606f7fd65fa7d7f7296cf4ee63a4ea0;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/arch/ppc/kernel/ptrace.c b/arch/ppc/kernel/ptrace.c index c24367432..1f370cb2e 100644 --- a/arch/ppc/kernel/ptrace.c +++ b/arch/ppc/kernel/ptrace.c @@ -35,7 +35,7 @@ /* * Set of msr bits that gdb can change on behalf of a process. */ -#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) #define MSR_DEBUGCHANGE 0 #else #define MSR_DEBUGCHANGE (MSR_SE | MSR_BE) @@ -201,9 +201,9 @@ set_single_step(struct task_struct *task) struct pt_regs *regs = task->thread.regs; if (regs != NULL) { -#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) task->thread.dbcr0 = DBCR0_IDM | DBCR0_IC; - /* MSR.DE should already be set */ + regs->msr |= MSR_DE; #else regs->msr |= MSR_SE; #endif @@ -216,8 +216,9 @@ clear_single_step(struct task_struct *task) struct pt_regs *regs = task->thread.regs; if (regs != NULL) { -#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) task->thread.dbcr0 = 0; + regs->msr &= ~MSR_DE; #else regs->msr &= ~MSR_SE; #endif @@ -379,7 +380,7 @@ int sys_ptrace(long request, long pid, long addr, long data) */ case PTRACE_KILL: { ret = 0; - if (child->state == TASK_ZOMBIE) /* already dead */ + if (child->exit_state == EXIT_ZOMBIE) /* already dead */ break; child->exit_code = SIGKILL; /* make sure the single step bit is not set. */