From: <sv...@va...> - 2008-06-30 10:28:21
|
Author: bart Date: 2008-06-30 11:28:16 +0100 (Mon, 30 Jun 2008) New Revision: 8315 Log: Fixed ppc-specific format string mismatches. Modified: branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc32-linux.c branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc64-linux.c branches/FORMATCHECK/coregrind/m_stacktrace.c branches/FORMATCHECK/coregrind/m_syswrap/syswrap-main.c branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc32-linux.c branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc64-linux.c Modified: branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc32-linux.c =================================================================== --- branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc32-linux.c 2008-06-30 08:57:23 UTC (rev 8314) +++ branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc32-linux.c 2008-06-30 10:28:16 UTC (rev 8315) @@ -511,14 +511,14 @@ if (VG_(extend_stack)(addr, tst->client_stack_szB)) { stackseg = VG_(am_find_nsegment)(addr); if (0 && stackseg) - VG_(printf)("frame=%p seg=%p-%p\n", + VG_(printf)("frame=%#lx seg=%#lx-%#lx\n", addr, stackseg->start, stackseg->end); } if (stackseg == NULL || !stackseg->hasR || !stackseg->hasW) { VG_(message)( Vg_UserMsg, - "Can't extend stack to %p during signal delivery for thread %d:", + "Can't extend stack to %#lx during signal delivery for thread %d:", addr, tid); if (stackseg == NULL) VG_(message)(Vg_UserMsg, " no stack segment"); @@ -789,8 +789,8 @@ //.. caller to do. */ if (0) - VG_(printf)("pushed signal frame; %R1 now = %p, " - "next %%CIA = %p, status=%d\n", + VG_(printf)("pushed signal frame; %%R1 now = %#lx, " + "next %%CIA = %#x, status=%d\n", sp, tst->arch.vex.guest_CIA, tst->status); } @@ -940,7 +940,7 @@ if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "vg_pop_signal_frame (thread %d): isRT=%d valid magic; EIP=%p", + "vg_pop_signal_frame (thread %d): isRT=%d valid magic; EIP=%#x", tid, has_siginfo, tst->arch.vex.guest_CIA); /* tell the tools */ Modified: branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc64-linux.c =================================================================== --- branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc64-linux.c 2008-06-30 08:57:23 UTC (rev 8314) +++ branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc64-linux.c 2008-06-30 10:28:16 UTC (rev 8315) @@ -141,14 +141,14 @@ if (VG_(extend_stack)(addr, tst->client_stack_szB)) { stackseg = VG_(am_find_nsegment)(addr); if (0 && stackseg) - VG_(printf)("frame=%p seg=%p-%p\n", + VG_(printf)("frame=%#lx seg=%#lx-%#lx\n", addr, stackseg->start, stackseg->end); } if (stackseg == NULL || !stackseg->hasR || !stackseg->hasW) { VG_(message)( Vg_UserMsg, - "Can't extend stack to %p during signal delivery for thread %d:", + "Can't extend stack to %#lx during signal delivery for thread %d:", addr, tid); if (stackseg == NULL) VG_(message)(Vg_UserMsg, " no stack segment"); @@ -307,8 +307,8 @@ priv->vex_shadow2 = tst->arch.vex_shadow2; if (0) - VG_(printf)("pushed signal frame; %R1 now = %p, " - "next %%CIA = %p, status=%d\n", + VG_(printf)("pushed signal frame; %%R1 now = %#lx, " + "next %%CIA = %#llx, status=%d\n", sp, tst->arch.vex.guest_CIA, tst->status); } @@ -375,7 +375,7 @@ if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "vg_pop_signal_frame (thread %d): isRT=%d valid magic; EIP=%p", + "vg_pop_signal_frame (thread %d): isRT=%d valid magic; EIP=%#llx", tid, has_siginfo, tst->arch.vex.guest_CIA); /* tell the tools */ Modified: branches/FORMATCHECK/coregrind/m_stacktrace.c =================================================================== --- branches/FORMATCHECK/coregrind/m_stacktrace.c 2008-06-30 08:57:23 UTC (rev 8314) +++ branches/FORMATCHECK/coregrind/m_stacktrace.c 2008-06-30 10:28:16 UTC (rev 8315) @@ -407,7 +407,7 @@ if (fps) fps[i] = fp; ips[i++] = ip; if (debug) - VG_(printf)(" ipsF[%d]=%#08x\n", i-1, ips[i-1]); + VG_(printf)(" ipsF[%d]=%#08lx\n", i-1, ips[i-1]); continue; } Modified: branches/FORMATCHECK/coregrind/m_syswrap/syswrap-main.c =================================================================== --- branches/FORMATCHECK/coregrind/m_syswrap/syswrap-main.c 2008-06-30 08:57:23 UTC (rev 8314) +++ branches/FORMATCHECK/coregrind/m_syswrap/syswrap-main.c 2008-06-30 10:28:16 UTC (rev 8315) @@ -1193,8 +1193,8 @@ if (p[0] != 0x44 || p[1] != 0x0 || p[2] != 0x0 || p[3] != 0x02) VG_(message)(Vg_DebugMsg, - "?! restarting over syscall at %#lx %02x %02x %02x %02x\n", - arch->vex.guest_CIA, p[0], p[1], p[2], p[3]); + "?! restarting over syscall at %#llx %02x %02x %02x %02x\n", + arch->vex.guest_CIA + 0ULL, p[0], p[1], p[2], p[3]); vg_assert(p[0] == 0x44 && p[1] == 0x0 && p[2] == 0x0 && p[3] == 0x2); } Modified: branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc32-linux.c =================================================================== --- branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc32-linux.c 2008-06-30 08:57:23 UTC (rev 8314) +++ branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc32-linux.c 2008-06-30 10:28:16 UTC (rev 8315) @@ -308,10 +308,10 @@ VG_(register_stack)(seg->start, ctst->client_stack_highest_word); if (debug) - VG_(printf)("\ntid %d: guessed client stack range %p-%p\n", + VG_(printf)("\ntid %d: guessed client stack range %#lx-%#lx\n", ctid, seg->start, VG_PGROUNDUP(sp)); } else { - VG_(message)(Vg_UserMsg, "!? New thread %d starts with R1(%p) unmapped\n", + VG_(message)(Vg_UserMsg, "!? New thread %d starts with R1(%#lx) unmapped\n", ctid, sp); ctst->client_stack_szB = 0; } @@ -324,7 +324,7 @@ if (flags & VKI_CLONE_SETTLS) { if (debug) - VG_(printf)("clone child has SETTLS: tls at %p\n", child_tls); + VG_(printf)("clone child has SETTLS: tls at %#lx\n", child_tls); ctst->arch.vex.guest_GPR2 = child_tls; } @@ -417,7 +417,7 @@ # define ARG2_5 (((UWord*)ARG2)[5]) *flags |= SfMayBlock; - PRINT("sys_socketcall ( %d, %p )",ARG1,ARG2); + PRINT("sys_socketcall ( %ld, %#lx )",ARG1,ARG2); PRE_REG_READ2(long, "socketcall", int, call, unsigned long *, args); switch (ARG1 /* request */) { @@ -549,7 +549,7 @@ } default: - VG_(message)(Vg_DebugMsg,"Warning: unhandled socketcall 0x%x",ARG1); + VG_(message)(Vg_DebugMsg,"Warning: unhandled socketcall 0x%lx",ARG1); SET_STATUS_Failure( VKI_EINVAL ); break; } @@ -652,7 +652,7 @@ break; default: - VG_(message)(Vg_DebugMsg,"FATAL: unhandled socketcall 0x%x",ARG1); + VG_(message)(Vg_DebugMsg,"FATAL: unhandled socketcall 0x%lx",ARG1); VG_(core_panic)("... bye!\n"); break; /*NOTREACHED*/ } @@ -668,7 +668,7 @@ { SysRes r; - PRINT("sys_mmap ( %p, %llu, %d, %d, %d, %d )", + PRINT("sys_mmap ( %#lx, %llu, %ld, %ld, %ld, %ld )", ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 ); PRE_REG_READ6(long, "mmap", unsigned long, start, unsigned long, length, @@ -687,7 +687,7 @@ // Exactly like old_mmap() except: // - the file offset is specified in 4K units rather than bytes, // so that it can be used for files bigger than 2^32 bytes. - PRINT("sys_mmap2 ( %p, %llu, %d, %d, %d, %d )", + PRINT("sys_mmap2 ( %#lx, %llu, %ld, %ld, %ld, %ld )", ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 ); PRE_REG_READ6(long, "mmap2", unsigned long, start, unsigned long, length, @@ -705,7 +705,7 @@ // things, eventually, I think. --njn PRE(sys_stat64) { - PRINT("sys_stat64 ( %p, %p )",ARG1,ARG2); + PRINT("sys_stat64 ( %#lx, %#lx )",ARG1,ARG2); PRE_REG_READ2(long, "stat64", char *, file_name, struct stat64 *, buf); PRE_MEM_RASCIIZ( "stat64(file_name)", ARG1 ); PRE_MEM_WRITE( "stat64(buf)", ARG2, sizeof(struct vki_stat64) ); @@ -718,7 +718,7 @@ PRE(sys_lstat64) { - PRINT("sys_lstat64 ( %p(%s), %p )",ARG1,ARG1,ARG2); + PRINT("sys_lstat64 ( %#lx(%s), %#lx )",ARG1,(char*)ARG1,ARG2); PRE_REG_READ2(long, "lstat64", char *, file_name, struct stat64 *, buf); PRE_MEM_RASCIIZ( "lstat64(file_name)", ARG1 ); PRE_MEM_WRITE( "lstat64(buf)", ARG2, sizeof(struct vki_stat64) ); @@ -734,7 +734,7 @@ PRE(sys_fstatat64) { - PRINT("sys_fstatat64 ( %d, %p(%s), %p )",ARG1,ARG2,ARG2,ARG3); + PRINT("sys_fstatat64 ( %ld, %#lx(%s), %#lx )",ARG1,ARG2,(char*)ARG2,ARG3); PRE_REG_READ3(long, "fstatat64", int, dfd, char *, file_name, struct stat64 *, buf); PRE_MEM_RASCIIZ( "fstatat64(file_name)", ARG2 ); @@ -748,7 +748,7 @@ PRE(sys_fstat64) { - PRINT("sys_fstat64 ( %d, %p )",ARG1,ARG2); + PRINT("sys_fstat64 ( %ld, %#lx )",ARG1,ARG2); PRE_REG_READ2(long, "fstat64", unsigned long, fd, struct stat64 *, buf); PRE_MEM_WRITE( "fstat64(buf)", ARG2, sizeof(struct vki_stat64) ); } @@ -767,7 +767,7 @@ PRE(sys_ipc) { - PRINT("sys_ipc ( %d, %d, %d, %d, %p, %d )", ARG1,ARG2,ARG3,ARG4,ARG5,ARG6); + PRINT("sys_ipc ( %ld, %ld, %ld, %ld, %#lx, %ld )", ARG1,ARG2,ARG3,ARG4,ARG5,ARG6); // XXX: this is simplistic -- some args are not used in all circumstances. PRE_REG_READ6(int, "ipc", vki_uint, call, int, first, int, second, int, third, @@ -839,7 +839,7 @@ ML_(generic_PRE_sys_shmctl)( tid, ARG2, ARG3, ARG5 ); break; default: - VG_(message)(Vg_DebugMsg, "FATAL: unhandled syscall(ipc) %d", ARG1 ); + VG_(message)(Vg_DebugMsg, "FATAL: unhandled syscall(ipc) %ld", ARG1 ); VG_(core_panic)("... bye!\n"); break; /*NOTREACHED*/ } @@ -904,7 +904,7 @@ break; default: VG_(message)(Vg_DebugMsg, - "FATAL: unhandled syscall(ipc) %d", + "FATAL: unhandled syscall(ipc) %ld", ARG1 ); VG_(core_panic)("... bye!\n"); break; /*NOTREACHED*/ @@ -951,7 +951,7 @@ { UInt cloneflags; - PRINT("sys_clone ( %x, %p, %p, %p, %p )",ARG1,ARG2,ARG3,ARG4,ARG5); + PRINT("sys_clone ( %lx, %#lx, %#lx, %#lx, %#lx )",ARG1,ARG2,ARG3,ARG4,ARG5); PRE_REG_READ5(int, "clone", unsigned long, flags, void *, child_stack, @@ -1011,7 +1011,7 @@ default: /* should we just ENOSYS? */ - VG_(message)(Vg_UserMsg, "Unsupported clone() flags: 0x%x", ARG1); + VG_(message)(Vg_UserMsg, "Unsupported clone() flags: 0x%lx", ARG1); VG_(message)(Vg_UserMsg, ""); VG_(message)(Vg_UserMsg, "The only supported clone() uses are:"); VG_(message)(Vg_UserMsg, " - via a threads library (LinuxThreads or NPTL)"); @@ -1380,7 +1380,7 @@ struct vki_sigaction new, old; struct vki_sigaction *newp, *oldp; - PRINT("sys_sigaction ( %d, %p, %p )", ARG1,ARG2,ARG3); + PRINT("sys_sigaction ( %ld, %#lx, %#lx )", ARG1,ARG2,ARG3); PRE_REG_READ3(int, "sigaction", int, signum, const struct old_sigaction *, act, struct old_sigaction *, oldact); @@ -1445,7 +1445,7 @@ that takes a pointer to the signal mask so supports more signals. */ *flags |= SfMayBlock; - PRINT("sys_sigsuspend ( %d )", ARG1 ); + PRINT("sys_sigsuspend ( %ld )", ARG1 ); PRE_REG_READ1(int, "sigsuspend", vki_old_sigset_t, mask); } Modified: branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc64-linux.c =================================================================== --- branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc64-linux.c 2008-06-30 08:57:23 UTC (rev 8314) +++ branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc64-linux.c 2008-06-30 10:28:16 UTC (rev 8315) @@ -336,10 +336,10 @@ VG_(register_stack)(seg->start, ctst->client_stack_highest_word); if (debug) - VG_(printf)("\ntid %d: guessed client stack range %p-%p\n", + VG_(printf)("\ntid %d: guessed client stack range %#lx-%#lx\n", ctid, seg->start, VG_PGROUNDUP(sp)); } else { - VG_(message)(Vg_UserMsg, "!? New thread %d starts with R1(%p) unmapped\n", + VG_(message)(Vg_UserMsg, "!? New thread %d starts with R1(%#lx) unmapped\n", ctid, sp); ctst->client_stack_szB = 0; } @@ -352,7 +352,7 @@ if (flags & VKI_CLONE_SETTLS) { if (debug) - VG_(printf)("clone child has SETTLS: tls at %p\n", child_tls); + VG_(printf)("clone child has SETTLS: tls at %#lx\n", child_tls); ctst->arch.vex.guest_GPR13 = child_tls; } @@ -446,7 +446,7 @@ # define ARG2_5 (((UWord*)ARG2)[5]) *flags |= SfMayBlock; - PRINT("sys_socketcall ( %d, %p )",ARG1,ARG2); + PRINT("sys_socketcall ( %ld, %#lx )",ARG1,ARG2); PRE_REG_READ2(long, "socketcall", int, call, unsigned long *, args); switch (ARG1 /* request */) { @@ -578,7 +578,7 @@ } default: - VG_(message)(Vg_DebugMsg,"Warning: unhandled socketcall 0x%x",ARG1); + VG_(message)(Vg_DebugMsg,"Warning: unhandled socketcall 0x%lx",ARG1); SET_STATUS_Failure( VKI_EINVAL ); break; } @@ -681,7 +681,7 @@ break; default: - VG_(message)(Vg_DebugMsg,"FATAL: unhandled socketcall 0x%x",ARG1); + VG_(message)(Vg_DebugMsg,"FATAL: unhandled socketcall 0x%lx",ARG1); VG_(core_panic)("... bye!\n"); break; /*NOTREACHED*/ } @@ -697,7 +697,7 @@ { SysRes r; - PRINT("sys_mmap ( %p, %llu, %d, %d, %d, %d )", + PRINT("sys_mmap ( %#lx, %llu, %ld, %ld, %ld, %ld )", ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 ); PRE_REG_READ6(long, "mmap", unsigned long, start, unsigned long, length, @@ -782,7 +782,7 @@ PRE(sys_ipc) { - PRINT("sys_ipc ( %d, %d, %d, %d, %p, %d )", ARG1,ARG2,ARG3,ARG4,ARG5,ARG6); + PRINT("sys_ipc ( %ld, %ld, %ld, %ld, %#lx, %ld )", ARG1,ARG2,ARG3,ARG4,ARG5,ARG6); // XXX: this is simplistic -- some args are not used in all circumstances. PRE_REG_READ6(int, "ipc", vki_uint, call, int, first, int, second, int, third, @@ -854,7 +854,7 @@ ML_(generic_PRE_sys_shmctl)( tid, ARG2, ARG3, ARG5 ); break; default: - VG_(message)(Vg_DebugMsg, "FATAL: unhandled syscall(ipc) %d", ARG1 ); + VG_(message)(Vg_DebugMsg, "FATAL: unhandled syscall(ipc) %ld", ARG1 ); VG_(core_panic)("... bye!\n"); break; /*NOTREACHED*/ } @@ -919,7 +919,7 @@ break; default: VG_(message)(Vg_DebugMsg, - "FATAL: unhandled syscall(ipc) %d", + "FATAL: unhandled syscall(ipc) %ld", ARG1 ); VG_(core_panic)("... bye!\n"); break; /*NOTREACHED*/ @@ -930,7 +930,7 @@ { UInt cloneflags; - PRINT("sys_clone ( %x, %p, %p, %p, %p )",ARG1,ARG2,ARG3,ARG4,ARG5); + PRINT("sys_clone ( %lx, %#lx, %#lx, %#lx, %#lx )",ARG1,ARG2,ARG3,ARG4,ARG5); PRE_REG_READ5(int, "clone", unsigned long, flags, void *, child_stack, @@ -990,7 +990,7 @@ default: /* should we just ENOSYS? */ - VG_(message)(Vg_UserMsg, "Unsupported clone() flags: 0x%x", ARG1); + VG_(message)(Vg_UserMsg, "Unsupported clone() flags: 0x%lx", ARG1); VG_(message)(Vg_UserMsg, ""); VG_(message)(Vg_UserMsg, "The only supported clone() uses are:"); VG_(message)(Vg_UserMsg, " - via a threads library (LinuxThreads or NPTL)"); @@ -1013,7 +1013,7 @@ PRE(sys_fadvise64) { - PRINT("sys_fadvise64 ( %d, %lld, %llu, %d )", ARG1,ARG2,ARG3,ARG4); + PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", ARG1,ARG2,ARG3,ARG4); PRE_REG_READ4(long, "fadvise64", int, fd, vki_loff_t, offset, vki_size_t, len, int, advice); } |