]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/kernel/ptrace.c
Merge branch 's3c-move' into devel
[linux-2.6-omap-h63xx.git] / arch / arm / kernel / ptrace.c
index 5feee722ea9878e08a9f6415fe7de8e45d7595f9..df653ea59250a3152a5e16f4634d10e93251a9dd 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/security.h>
 #include <linux/init.h>
 #include <linux/signal.h>
+#include <linux/uaccess.h>
 
-#include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/traps.h>
@@ -126,7 +126,7 @@ ptrace_getrn(struct task_struct *child, unsigned long insn)
 
        val = get_user_reg(child, reg);
        if (reg == 15)
-               val = pc_pointer(val + 8);
+               val += 8;
 
        return val;
 }
@@ -278,8 +278,7 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
                                else
                                        base -= aluop2;
                        }
-                       if (read_u32(child, base, &alt) == 0)
-                               alt = pc_pointer(alt);
+                       read_u32(child, base, &alt);
                }
                break;
 
@@ -305,8 +304,7 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
 
                        base = ptrace_getrn(child, insn);
 
-                       if (read_u32(child, base + nr_regs, &alt) == 0)
-                               alt = pc_pointer(alt);
+                       read_u32(child, base + nr_regs, &alt);
                        break;
                }
                break;
@@ -382,16 +380,16 @@ static void clear_breakpoint(struct task_struct *task, struct debug_entry *bp)
 
                if (ret != 2 || old_insn.thumb != BREAKINST_THUMB)
                        printk(KERN_ERR "%s:%d: corrupted Thumb breakpoint at "
-                               "0x%08lx (0x%04x)\n", task->comm, task->pid,
-                               addr, old_insn.thumb);
+                               "0x%08lx (0x%04x)\n", task->comm,
+                               task_pid_nr(task), addr, old_insn.thumb);
        } else {
                ret = swap_insn(task, addr & ~3, &old_insn.arm,
                                &bp->insn.arm, 4);
 
                if (ret != 4 || old_insn.arm != BREAKINST_ARM)
                        printk(KERN_ERR "%s:%d: corrupted ARM breakpoint at "
-                               "0x%08lx (0x%08x)\n", task->comm, task->pid,
-                               addr, old_insn.arm);
+                               "0x%08lx (0x%08x)\n", task->comm,
+                               task_pid_nr(task), addr, old_insn.arm);
        }
 }