Better types for 64-bit compatibility. Use %p and cast to void * and
prefer uintptr_t to other int-type casts.
This commit is contained in:
parent
f548109087
commit
26b14c6dde
@ -230,13 +230,13 @@ sigreturn(struct thread *td, struct sigreturn_args *uap)
|
|||||||
/* #ifdef DEBUG */
|
/* #ifdef DEBUG */
|
||||||
if (ucp->uc_mcontext.mc_regs[ZERO] != UCONTEXT_MAGIC) {
|
if (ucp->uc_mcontext.mc_regs[ZERO] != UCONTEXT_MAGIC) {
|
||||||
printf("sigreturn: pid %d, ucp %p\n", p->p_pid, ucp);
|
printf("sigreturn: pid %d, ucp %p\n", p->p_pid, ucp);
|
||||||
printf(" old sp %x ra %x pc %x\n",
|
printf(" old sp %p ra %p pc %p\n",
|
||||||
regs->sp, regs->ra, regs->pc);
|
(void *)regs->sp, (void *)regs->ra, (void *)regs->pc);
|
||||||
printf(" new sp %x ra %x pc %x z %x\n",
|
printf(" new sp %p ra %p pc %p z %p\n",
|
||||||
ucp->uc_mcontext.mc_regs[SP],
|
(void *)ucp->uc_mcontext.mc_regs[SP],
|
||||||
ucp->uc_mcontext.mc_regs[RA],
|
(void *)ucp->uc_mcontext.mc_regs[RA],
|
||||||
ucp->uc_mcontext.mc_regs[PC],
|
(void *)ucp->uc_mcontext.mc_regs[PC],
|
||||||
ucp->uc_mcontext.mc_regs[ZERO]);
|
(void *)ucp->uc_mcontext.mc_regs[ZERO]);
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
/* #endif */
|
/* #endif */
|
||||||
@ -327,7 +327,7 @@ ptrace_single_step(struct thread *td)
|
|||||||
/* compute next address after current location */
|
/* compute next address after current location */
|
||||||
if(curinstr != 0) {
|
if(curinstr != 0) {
|
||||||
va = MipsEmulateBranch(locr0, locr0->pc, locr0->fsr,
|
va = MipsEmulateBranch(locr0, locr0->pc, locr0->fsr,
|
||||||
(u_int)&curinstr);
|
(uintptr_t)&curinstr);
|
||||||
} else {
|
} else {
|
||||||
va = locr0->pc + 4;
|
va = locr0->pc + 4;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user