Author: sewardj Date: 2007-11-07 10:39:17 +0000 (Wed, 07 Nov 2007) New Revision: 7108
Log: Format string fixes for ppc32-linux. Modified: branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc32-linux.c branches/FORMATCHECK/coregrind/m_stacktrace.c branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc32-linux.c Modified: branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc32-linux.c =================================================================== --- branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc32-linux.c 2007-11-07 03:09:53 UTC (rev 7107) +++ branches/FORMATCHECK/coregrind/m_sigframe/sigframe-ppc32-linux.c 2007-11-07 10:39:17 UTC (rev 7108) @@ -510,14 +510,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"); @@ -780,14 +780,14 @@ //.. /* tst->m_esp = esp; */ //.. SET_SIGNAL_ESP(tid, esp); //.. -//.. //VG_(printf)("handler = %p\n", handler); +//.. //VG_(printf)("handler = %#lx\n", handler); //.. tst->arch.vex.guest_CIA = (Addr) handler; //.. /* This thread needs to be marked runnable, but we leave that the //.. 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); } @@ -936,7 +936,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=%#lx", tid, has_siginfo, tst->arch.vex.guest_CIA); /* tell the tools */ Modified: branches/FORMATCHECK/coregrind/m_stacktrace.c =================================================================== --- branches/FORMATCHECK/coregrind/m_stacktrace.c 2007-11-07 03:09:53 UTC (rev 7107) +++ branches/FORMATCHECK/coregrind/m_stacktrace.c 2007-11-07 10:39:17 UTC (rev 7108) @@ -352,7 +352,7 @@ fp = (((UWord*)fp)[0]); ips[i++] = ip; if (debug) - VG_(printf)(" ipsF[%d]=%08p\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-ppc32-linux.c =================================================================== --- branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc32-linux.c 2007-11-07 03:09:53 UTC (rev 7107) +++ branches/FORMATCHECK/coregrind/m_syswrap/syswrap-ppc32-linux.c 2007-11-07 10:39:17 UTC (rev 7108) @@ -305,17 +305,18 @@ ctst->client_stack_szB = ctst->client_stack_highest_word - seg->start; 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; } 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; } @@ -405,7 +406,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 */) { @@ -656,7 +657,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, @@ -675,7 +676,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, @@ -693,7 +694,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) ); @@ -706,7 +707,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) ); @@ -722,7 +723,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 ); @@ -736,7 +737,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) ); } @@ -755,7 +756,8 @@ 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, @@ -827,7 +829,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*/ } @@ -894,7 +896,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*/ @@ -941,7 +943,8 @@ { 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, @@ -1370,7 +1373,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); @@ -1379,16 +1382,21 @@ if (ARG2 != 0) { struct vki_old_sigaction *sa = (struct vki_old_sigaction *)ARG2; - PRE_MEM_READ( "sigaction(act->sa_handler)", (Addr)&sa->ksa_handler, sizeof(sa->ksa_handler)); - PRE_MEM_READ( "sigaction(act->sa_mask)", (Addr)&sa->sa_mask, sizeof(sa->sa_mask)); - PRE_MEM_READ( "sigaction(act->sa_flags)", (Addr)&sa->sa_flags, sizeof(sa->sa_flags)); + PRE_MEM_READ( "sigaction(act->sa_handler)", + (Addr)&sa->ksa_handler, sizeof(sa->ksa_handler)); + PRE_MEM_READ( "sigaction(act->sa_mask)", + (Addr)&sa->sa_mask, sizeof(sa->sa_mask)); + PRE_MEM_READ( "sigaction(act->sa_flags)", + (Addr)&sa->sa_flags, sizeof(sa->sa_flags)); if (ML_(safe_to_deref)(sa,sizeof(sa)) && (sa->sa_flags & VKI_SA_RESTORER)) - PRE_MEM_READ( "sigaction(act->sa_restorer)", (Addr)&sa->sa_restorer, sizeof(sa->sa_restorer)); + PRE_MEM_READ( "sigaction(act->sa_restorer)", + (Addr)&sa->sa_restorer, sizeof(sa->sa_restorer)); } if (ARG3 != 0) { - PRE_MEM_WRITE( "sigaction(oldact)", ARG3, sizeof(struct vki_old_sigaction)); + PRE_MEM_WRITE( "sigaction(oldact)", + ARG3, sizeof(struct vki_old_sigaction)); oldp = &old; } @@ -1435,7 +1443,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); } ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers