X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Falpha%2Fkernel%2Fptrace.c;h=8db4b56b64731b131d64141867ef84013ddae204;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=5d9aae6be7730fa17e560e8f3c01ff2a072e815c;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 5d9aae6be..8db4b56b6 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c @@ -91,15 +91,15 @@ static int regoff[] = { PT_REG( pc) }; -static long zero; +static unsigned long zero; /* * Get address of register REGNO in task TASK. */ -static long * +static unsigned long * get_reg_addr(struct task_struct * task, unsigned long regno) { - long *addr; + unsigned long *addr; if (regno == 30) { addr = &task->thread_info->pcb.usp; @@ -109,7 +109,7 @@ get_reg_addr(struct task_struct * task, unsigned long regno) zero = 0; addr = &zero; } else { - addr = (long *)((long)task->thread_info + regoff[regno]); + addr = (void *)task->thread_info + regoff[regno]; } return addr; } @@ -117,7 +117,7 @@ get_reg_addr(struct task_struct * task, unsigned long regno) /* * Get contents of register REGNO in task TASK. */ -static long +static unsigned long get_reg(struct task_struct * task, unsigned long regno) { /* Special hack for fpcr -- combine hardware and software bits. */ @@ -135,7 +135,7 @@ get_reg(struct task_struct * task, unsigned long regno) * Write contents of register REGNO in task TASK. */ static int -put_reg(struct task_struct *task, unsigned long regno, long data) +put_reg(struct task_struct *task, unsigned long regno, unsigned long data) { if (regno == 63) { task->thread_info->ieee_state @@ -168,11 +168,11 @@ int ptrace_set_bpt(struct task_struct * child) { int displ, i, res, reg_b, nsaved = 0; - u32 insn, op_code; + unsigned int insn, op_code; unsigned long pc; pc = get_reg(child, REG_PC); - res = read_int(child, pc, &insn); + res = read_int(child, pc, (int *) &insn); if (res < 0) return res; @@ -203,7 +203,8 @@ ptrace_set_bpt(struct task_struct * child) /* install breakpoints: */ for (i = 0; i < nsaved; ++i) { - res = read_int(child, child->thread_info->bpt_addr[i], &insn); + res = read_int(child, child->thread_info->bpt_addr[i], + (int *) &insn); if (res < 0) return res; child->thread_info->bpt_insn[i] = insn;