|
From: <sv...@va...> - 2015-08-08 21:45:48
|
Author: florian
Date: Sat Aug 8 22:45:33 2015
New Revision: 15510
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/Makefile.all.am
trunk/configure.ac
trunk/coregrind/m_syswrap/priv_types_n_macros.h
trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-amd64-solaris.c
trunk/coregrind/m_syswrap/syswrap-arm-linux.c
trunk/coregrind/m_syswrap/syswrap-arm64-linux.c
trunk/coregrind/m_syswrap/syswrap-darwin.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/coregrind/m_syswrap/syswrap-mips32-linux.c
trunk/coregrind/m_syswrap/syswrap-mips64-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-s390x-linux.c
trunk/coregrind/m_syswrap/syswrap-solaris.c
trunk/coregrind/m_syswrap/syswrap-tilegx-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-darwin.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-solaris.c
trunk/coregrind/m_syswrap/syswrap-xen.c
Modified: trunk/Makefile.all.am
==============================================================================
--- trunk/Makefile.all.am (original)
+++ trunk/Makefile.all.am Sat Aug 8 22:45:33 2015
@@ -110,6 +110,7 @@
@FLAG_W_WRITE_STRINGS@ \
@FLAG_W_EMPTY_BODY@ \
@FLAG_W_FORMAT@ \
+ @FLAG_W_FORMAT_SIGNEDNESS@ \
@FLAG_W_FORMAT_SECURITY@ \
@FLAG_W_IGNORED_QUALIFIERS@ \
@FLAG_W_MISSING_PARAMETER_TYPE@ \
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Aug 8 22:45:33 2015
@@ -1890,6 +1890,8 @@
AC_GCC_WARNING_SUBST([write-strings], [FLAG_W_WRITE_STRINGS])
AC_GCC_WARNING_SUBST([empty-body], [FLAG_W_EMPTY_BODY])
AC_GCC_WARNING_SUBST([format], [FLAG_W_FORMAT])
+# Disabled for now until all platforms are clean
+# AC_GCC_WARNING_SUBST([format-signedness], [FLAG_W_FORMAT_SIGNEDNESS])
AC_GCC_WARNING_SUBST([cast-qual], [FLAG_W_CAST_QUAL])
AC_GCC_WARNING_SUBST([old-style-declaration], [FLAG_W_OLD_STYLE_DECLARATION])
AC_GCC_WARNING_SUBST([ignored-qualifiers], [FLAG_W_IGNORED_QUALIFIERS])
Modified: trunk/coregrind/m_syswrap/priv_types_n_macros.h
==============================================================================
--- trunk/coregrind/m_syswrap/priv_types_n_macros.h (original)
+++ trunk/coregrind/m_syswrap/priv_types_n_macros.h Sat Aug 8 22:45:33 2015
@@ -320,6 +320,16 @@
#define ARG7 (arrghs->arg7)
#define ARG8 (arrghs->arg8)
+/* Provide signed versions of the argument values */
+#define SARG1 ((Word)ARG1)
+#define SARG2 ((Word)ARG2)
+#define SARG3 ((Word)ARG3)
+#define SARG4 ((Word)ARG4)
+#define SARG5 ((Word)ARG5)
+#define SARG6 ((Word)ARG6)
+#define SARG7 ((Word)ARG7)
+#define SARG8 ((Word)ARG8)
+
/* Reference to the syscall's current result status/value. General
paranoia all round. */
#define SUCCESS (status->what == SsComplete && !sr_isError(status->sres))
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-darwin.c Sat Aug 8 22:45:33 2015
@@ -451,7 +451,7 @@
if (0) VG_(printf)(
"wqthread_hijack: self %#lx, kport %#lx, "
"stackaddr %#lx, workitem %#lx, reuse/flags %x, sp %#lx\n",
- self, kport, stackaddr, workitem, reuse, sp);
+ self, kport, stackaddr, workitem, (UInt)reuse, sp);
/* Start the thread with all signals blocked. VG_(scheduler) will
set the mask correctly when we finally get there. */
@@ -498,10 +498,10 @@
tst = VG_(get_ThreadState)(tid);
- if (0) VG_(printf)("wqthread_hijack reuse %s: tid %d, tst %p, "
+ if (0) VG_(printf)("wqthread_hijack reuse %s: tid %u, tst %p, "
"tst->os_state.pthread %#lx, self %#lx\n",
tst->os_state.pthread == self ? "SAME" : "DIFF",
- tid, tst, tst->os_state.pthread, self);
+ tid, (void *)tst, tst->os_state.pthread, self);
vex = &tst->arch.vex;
vg_assert(tst->os_state.pthread - magic_delta == self);
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c Sat Aug 8 22:45:33 2015
@@ -489,7 +489,7 @@
PRE(sys_arch_prctl)
{
ThreadState* tst;
- PRINT( "arch_prctl ( %ld, %lx )", ARG1, ARG2 );
+ PRINT( "arch_prctl ( %ld, %lx )", SARG1, ARG2 );
vg_assert(VG_(is_valid_tid)(tid));
vg_assert(tid >= 1 && tid < VG_N_THREADS);
@@ -540,7 +540,7 @@
// space, and we should therefore not check anything it points to.
PRE(sys_ptrace)
{
- PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", SARG1, SARG2, ARG3, ARG4);
PRE_REG_READ4(int, "ptrace",
long, request, long, pid, long, addr, long, data);
switch (ARG1) {
@@ -619,7 +619,7 @@
PRE(sys_fadvise64)
{
- PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", SARG1, SARG2, ARG3, SARG4);
PRE_REG_READ4(long, "fadvise64",
int, fd, vki_loff_t, offset, vki_size_t, len, int, advice);
}
@@ -628,12 +628,11 @@
{
SysRes r;
- PRINT("sys_mmap ( %#lx, %llu, %ld, %ld, %d, %ld )",
- ARG1, (ULong)ARG2, ARG3, ARG4, (Int)ARG5, ARG6 );
+ PRINT("sys_mmap ( %#lx, %lu, %ld, %ld, %ld, %ld )",
+ ARG1, ARG2, SARG3, SARG4, SARG5, SARG6 );
PRE_REG_READ6(long, "mmap",
unsigned long, start, unsigned long, length,
- unsigned long, prot, unsigned long, flags,
- unsigned long, fd, unsigned long, offset);
+ int, prot, int, flags, int, fd, vki_off_t, offset);
r = ML_(generic_PRE_sys_mmap)( tid, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 );
SET_STATUS_from_SysRes(r);
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-solaris.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-solaris.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-solaris.c Sat Aug 8 22:45:33 2015
@@ -428,7 +428,7 @@
if (rflags != ~VKI_UC_GUEST_RFLAGS_NEG(uc)) {
VG_(debugLog)(1, "syswrap-solaris",
"The rflags value was restored from an "
- "explicitly set value in thread %d.\n", tid);
+ "explicitly set value in thread %u.\n", tid);
ok_restore = True;
}
else {
@@ -446,7 +446,7 @@
/* Check ok, the full restoration is possible. */
VG_(debugLog)(1, "syswrap-solaris",
"The CC_* guest state values were fully "
- "restored in thread %d.\n", tid);
+ "restored in thread %u.\n", tid);
ok_restore = True;
tst->arch.vex.guest_CC_OP = VKI_UC_GUEST_CC_OP(uc);
@@ -468,7 +468,7 @@
VG_(debugLog)(1, "syswrap-solaris",
"Cannot fully restore the CC_* guest state "
"values, using approximate rflags in thread "
- "%d.\n", tid);
+ "%u.\n", tid);
}
}
@@ -539,7 +539,7 @@
note = LibVEX_GuestAMD64_fxrstor((HWord)fs, &tst->arch.vex);
if (note != EmNote_NONE)
VG_(message)(Vg_UserMsg,
- "Error restoring FP state in thread %d: %s.\n",
+ "Error restoring FP state in thread %u: %s.\n",
tid, LibVEX_EmNote_string(note));
}
}
Modified: trunk/coregrind/m_syswrap/syswrap-arm-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-arm-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-arm-linux.c Sat Aug 8 22:45:33 2015
@@ -352,8 +352,8 @@
// pagesize or 4K-size units in offset? For ppc32/64-linux, this is
// 4K-sized. Assert that the page size is 4K here for safety.
vg_assert(VKI_PAGE_SIZE == 4096);
- PRINT("sys_mmap2 ( %#lx, %llu, %ld, %ld, %ld, %ld )",
- ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
+ PRINT("sys_mmap2 ( %#lx, %lu, %lu, %lu, %lu, %lu )",
+ ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(long, "mmap2",
unsigned long, start, unsigned long, length,
unsigned long, prot, unsigned long, flags,
@@ -370,7 +370,7 @@
// things, eventually, I think. --njn
PRE(sys_lstat64)
{
- PRINT("sys_lstat64 ( %#lx(%s), %#lx )",ARG1,(char*)ARG1,ARG2);
+ PRINT("sys_lstat64 ( %#lx(%s), %#lx )", ARG1, (HChar*)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) );
@@ -386,7 +386,7 @@
PRE(sys_stat64)
{
- PRINT("sys_stat64 ( %#lx(%s), %#lx )",ARG1,(char*)ARG1,ARG2);
+ PRINT("sys_stat64 ( %#lx(%s), %#lx )", ARG1, (HChar*)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) );
@@ -399,7 +399,8 @@
PRE(sys_fstatat64)
{
- PRINT("sys_fstatat64 ( %ld, %#lx(%s), %#lx )",ARG1,ARG2,(char*)ARG2,ARG3);
+ PRINT("sys_fstatat64 ( %ld, %#lx(%s), %#lx )",
+ SARG1, ARG2, (HChar*)ARG2, ARG3);
PRE_REG_READ3(long, "fstatat64",
int, dfd, char *, file_name, struct stat64 *, buf);
PRE_MEM_RASCIIZ( "fstatat64(file_name)", ARG2 );
@@ -413,7 +414,7 @@
PRE(sys_fstat64)
{
- PRINT("sys_fstat64 ( %ld, %#lx )",ARG1,ARG2);
+ PRINT("sys_fstat64 ( %lu, %#lx )", ARG1, ARG2);
PRE_REG_READ2(long, "fstat64", unsigned long, fd, struct stat64 *, buf);
PRE_MEM_WRITE( "fstat64(buf)", ARG2, sizeof(struct vki_stat64) );
}
@@ -577,7 +578,7 @@
that takes a pointer to the signal mask so supports more signals.
*/
*flags |= SfMayBlock;
- PRINT("sys_sigsuspend ( %ld, %ld, %ld )", ARG1,ARG2,ARG3 );
+ PRINT("sys_sigsuspend ( %ld, %ld, %#lx )", SARG1, SARG2, ARG3 );
PRE_REG_READ3(int, "sigsuspend",
int, history0, int, history1,
vki_old_sigset_t, mask);
@@ -609,7 +610,7 @@
// space, and we should therefore not check anything it points to.
PRE(sys_ptrace)
{
- PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_ptrace ( %ld, %ld, %#lx, %#lx )", SARG1, SARG2, ARG3, ARG4);
PRE_REG_READ4(int, "ptrace",
long, request, long, pid, long, addr, long, data);
switch (ARG1) {
Modified: trunk/coregrind/m_syswrap/syswrap-arm64-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-arm64-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-arm64-linux.c Sat Aug 8 22:45:33 2015
@@ -431,7 +431,7 @@
// ARM64 FIXME is this correct?
PRE(sys_fadvise64)
{
- PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", ARG1,ARG2,ARG3,ARG4);
+ PRINT("sys_fadvise64 ( %ld, %ld, %lu, %ld )", SARG1, SARG2, ARG3, SARG4);
PRE_REG_READ4(long, "fadvise64",
int, fd, vki_loff_t, offset, vki_size_t, len, int, advice);
}
@@ -441,8 +441,8 @@
{
SysRes r;
- PRINT("sys_mmap ( %#lx, %llu, %ld, %ld, %d, %ld )",
- ARG1, (ULong)ARG2, ARG3, ARG4, (Int)ARG5, ARG6 );
+ PRINT("sys_mmap ( %#lx, %lu, %lu, %#lx, %lu, %lu )",
+ ARG1, (ULong)ARG2, ARG3, ARG4, ARG5, ARG6 );
PRE_REG_READ6(long, "mmap",
unsigned long, start, unsigned long, length,
unsigned long, prot, unsigned long, flags,
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c Sat Aug 8 22:45:33 2015
@@ -91,8 +91,8 @@
ThreadState* tst = VG_(get_ThreadState)(tid);
VG_(debugLog)(1, "syswrap-darwin",
- "thread_wrapper(tid=%lld): entry\n",
- (ULong)tidW);
+ "thread_wrapper(tid=%u): entry\n",
+ tid);
vg_assert(tst->status == VgTs_Init);
@@ -100,8 +100,8 @@
VG_(acquire_BigLock)(tid, "thread_wrapper");
if (0)
- VG_(printf)("thread tid %d started: stack = %p\n",
- tid, &tid);
+ VG_(printf)("thread tid %u started: stack = %p\n",
+ tid, (void *)&tid);
/* Make sure error reporting is enabled in the new thread. */
tst->err_disablement_level = 0;
@@ -122,8 +122,8 @@
vg_assert(VG_(is_running_thread)(tid));
VG_(debugLog)(1, "syswrap-darwin",
- "thread_wrapper(tid=%lld): done\n",
- (ULong)tidW);
+ "thread_wrapper(tid=%u): done\n",
+ tid);
/* Return to caller, still holding the lock. */
return ret;
@@ -161,7 +161,7 @@
}
}
- VG_(debugLog)( 2, "syswrap-darwin", "stack for tid %d at %p; init_SP=%p\n",
+ VG_(debugLog)( 2, "syswrap-darwin", "stack for tid %u at %p; init_SP=%p\n",
tid,
(void*)tst->os_state.valgrind_stack_base,
(void*)tst->os_state.valgrind_stack_init_SP );
@@ -189,8 +189,8 @@
ThreadState* tst;
VG_(debugLog)(1, "syswrap-darwin",
- "run_a_thread_NORETURN(tid=%lld): pre-thread_wrapper\n",
- (ULong)tidW);
+ "run_a_thread_NORETURN(tid=%u): pre-thread_wrapper\n",
+ tid);
tst = VG_(get_ThreadState)(tid);
vg_assert(tst);
@@ -199,8 +199,8 @@
src = thread_wrapper(tid);
VG_(debugLog)(1, "syswrap-darwin",
- "run_a_thread_NORETURN(tid=%lld): post-thread_wrapper\n",
- (ULong)tidW);
+ "run_a_thread_NORETURN(tid=%u): post-thread_wrapper\n",
+ tid);
c = VG_(count_living_threads)();
vg_assert(c >= 1); /* stay sane */
@@ -222,9 +222,9 @@
);
VG_(debugLog)(
1, "syswrap-linux",
- "run_a_thread_NORETURN(tid=%lld): "
+ "run_a_thread_NORETURN(tid=%u): "
"WARNING: exiting thread has err_disablement_level = %u\n",
- (ULong)tidW, tst->err_disablement_level
+ tid, tst->err_disablement_level
);
}
tst->err_disablement_level = 0;
@@ -232,9 +232,9 @@
if (c == 1) {
VG_(debugLog)(1, "syswrap-darwin",
- "run_a_thread_NORETURN(tid=%lld): "
+ "run_a_thread_NORETURN(tid=%u): "
"last one standing\n",
- (ULong)tidW);
+ tid);
/* We are the last one standing. Keep hold of the lock and
carry on to show final tool results, then exit the entire system.
@@ -246,9 +246,9 @@
mach_msg_header_t msg;
VG_(debugLog)(1, "syswrap-darwin",
- "run_a_thread_NORETURN(tid=%lld): "
+ "run_a_thread_NORETURN(tid=%u): "
"not last one standing\n",
- (ULong)tidW);
+ tid);
/* OK, thread is dead, but others still exist. Just exit. */
@@ -997,8 +997,8 @@
if (0 || VG_(clo_trace_syscalls)) {
VG_(debugLog)(0, "syswrap-darwin",
- "sync_mappings (%s) (\"%s\", \"%s\", 0x%llx)\n",
- show_CheckHowOften(check), when, where, (ULong)num);
+ "sync_mappings (%s) (\"%s\", \"%s\", 0x%lx)\n",
+ show_CheckHowOften(check), when, where, num);
}
// 16 is enough for most cases, but small enough that overflow happens
@@ -1108,12 +1108,12 @@
case VKI_DTRACEHIOC_REMOVE:
case VKI_BIOCFLUSH:
case VKI_BIOCPROMISC:
- PRINT("ioctl ( %ld, 0x%lx )",ARG1,ARG2);
+ PRINT("ioctl ( %lu, 0x%lx )", ARG1, ARG2);
PRE_REG_READ2(long, "ioctl",
unsigned int, fd, unsigned int, request);
return;
default:
- PRINT("ioctl ( %ld, 0x%lx, %#lx )",ARG1,ARG2,ARG3);
+ PRINT("ioctl ( %lu, 0x%lx, %#lx )", ARG1, ARG2, ARG3);
PRE_REG_READ3(long, "ioctl",
unsigned int, fd, unsigned int, request, unsigned long, arg);
}
@@ -1542,7 +1542,7 @@
case VKI_F_GETFD:
case VKI_F_GETFL:
case VKI_F_GETOWN:
- PRINT("fcntl ( %ld, %ld )", ARG1,ARG2);
+ PRINT("fcntl ( %lu, %lu )", ARG1,ARG2);
PRE_REG_READ2(long, "fcntl", unsigned int, fd, unsigned int, cmd);
break;
@@ -1551,7 +1551,7 @@
case VKI_F_SETFD:
case VKI_F_SETFL:
case VKI_F_SETOWN:
- PRINT("fcntl[ARG3=='arg'] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
+ PRINT("fcntl[ARG3=='arg'] ( %lu, %lu, %lu )", ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd, unsigned long, arg);
break;
@@ -1560,7 +1560,7 @@
case VKI_F_GETLK:
case VKI_F_SETLK:
case VKI_F_SETLKW:
- PRINT("fcntl[ARG3=='lock'] ( %ld, %ld, %#lx )", ARG1,ARG2,ARG3);
+ PRINT("fcntl[ARG3=='lock'] ( %lu, %lu, %#lx )", ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct flock64 *, lock);
@@ -1570,7 +1570,7 @@
break;
# if DARWIN_VERS >= DARWIN_10_10
case VKI_F_SETLKWTIMEOUT:
- PRINT("fcntl[ARG3=='locktimeout'] ( %ld, %ld, %#lx )", ARG1,ARG2,ARG3);
+ PRINT("fcntl[ARG3=='locktimeout'] ( %lu, %lu, %#lx )", ARG1,ARG2,ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct flocktimeout *, lock);
@@ -1586,13 +1586,13 @@
case VKI_F_FREEZE_FS:
case VKI_F_THAW_FS:
case VKI_F_GLOBAL_NOCACHE:
- PRINT("fcntl ( %ld, %s )", ARG1, name_for_fcntl(ARG1));
+ PRINT("fcntl ( %lu, %s, %lu )", ARG1, name_for_fcntl(ARG1), ARG2);
PRE_REG_READ2(long, "fcntl", unsigned int, fd, unsigned int, cmd);
break;
// struct fstore
case VKI_F_PREALLOCATE:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct fstore *, fstore);
@@ -1613,7 +1613,7 @@
// off_t
case VKI_F_SETSIZE:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
vki_off_t *, offset);
@@ -1621,7 +1621,7 @@
// struct radvisory
case VKI_F_RDADVISE:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct vki_radvisory *, radvisory);
@@ -1638,7 +1638,7 @@
// struct fbootstraptransfer
case VKI_F_READBOOTSTRAP:
case VKI_F_WRITEBOOTSTRAP:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct fbootstraptransfer *, bootstrap);
@@ -1649,7 +1649,7 @@
// struct log2phys (out)
case VKI_F_LOG2PHYS:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
struct log2phys *, l2p);
@@ -1659,7 +1659,7 @@
// char[maxpathlen] (out)
case VKI_F_GETPATH:
- PRINT("fcntl ( %ld, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
char *, pathbuf);
@@ -1669,8 +1669,8 @@
// char[maxpathlen] (in)
case VKI_F_PATHPKG_CHECK:
- PRINT("fcntl ( %ld, %s, %#lx '%s')", ARG1, name_for_fcntl(ARG2), ARG3,
- (char *)ARG3);
+ PRINT("fcntl ( %lu, %s, %#lx '%s')", ARG1, name_for_fcntl(ARG2), ARG3,
+ (HChar *)ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
char *, pathbuf);
@@ -1678,7 +1678,7 @@
break;
case VKI_F_ADDSIGS: /* Add detached signatures (for code signing) */
- PRINT("fcntl ( %ld, %s )", ARG1, name_for_fcntl(ARG2));
+ PRINT("fcntl ( %lu, %s )", ARG1, name_for_fcntl(ARG2));
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
vki_fsignatures_t *, sigs);
@@ -1697,7 +1697,7 @@
break;
case VKI_F_ADDFILESIGS: /* Add signature from same file (used by dyld for shared libs) */
- PRINT("fcntl ( %ld, %s )", ARG1, name_for_fcntl(ARG2));
+ PRINT("fcntl ( %lu, %s, %#lx )", ARG1, name_for_fcntl(ARG2), ARG3);
PRE_REG_READ3(long, "fcntl",
unsigned int, fd, unsigned int, cmd,
vki_fsignatures_t *, sigs);
@@ -1712,8 +1712,8 @@
break;
default:
- PRINT("fcntl ( %ld, %ld [??] )", ARG1, ARG2);
- log_decaying("UNKNOWN fcntl %ld!", ARG2);
+ PRINT("fcntl ( %lu, %lu [??] )", ARG1, ARG2);
+ log_decaying("UNKNOWN fcntl %lu!", ARG2);
break;
}
}
@@ -1774,7 +1774,7 @@
PRE(futimes)
{
- PRINT("futimes ( %ld, %#lx )", ARG1,ARG2);
+ PRINT("futimes ( %ld, %#lx )", SARG1, ARG2);
PRE_REG_READ2(long, "futimes", int, fd, struct timeval *, tvp);
if (!ML_(fd_allowed)(ARG1, "futimes", tid, False)) {
SET_STATUS_Failure( VKI_EBADF );
@@ -1786,14 +1786,14 @@
PRE(semget)
{
- PRINT("semget ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
+ PRINT("semget ( %ld, %ld, %ld )", SARG1, SARG2, SARG3);
PRE_REG_READ3(long, "semget", vki_key_t, key, int, nsems, int, semflg);
}
PRE(semop)
{
*flags |= SfMayBlock;
- PRINT("semop ( %ld, %#lx, %lu )",ARG1,ARG2,ARG3);
+ PRINT("semop ( %ld, %#lx, %lu )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "semop",
int, semid, struct sembuf *, sops, vki_size_t, nsoops);
ML_(generic_PRE_sys_semop)(tid, ARG1,ARG2,ARG3);
@@ -1804,23 +1804,23 @@
switch (ARG3) {
case VKI_IPC_STAT:
case VKI_IPC_SET:
- PRINT("semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("semctl ( %ld, %ld, %ld, %#lx )", SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, struct semid_ds *, arg);
break;
case VKI_GETALL:
case VKI_SETALL:
- PRINT("semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("semctl ( %ld, %ld, %ld, %#lx )", SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, unsigned short *, arg);
break;
case VKI_SETVAL:
- PRINT("semctl ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("semctl ( %ld, %ld, %ld, %#lx )", SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(long, "semctl",
int, semid, int, semnum, int, cmd, int, arg);
break;
default:
- PRINT("semctl ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
+ PRINT("semctl ( %ld, %ld, %ld )", SARG1, SARG2, SARG3);
PRE_REG_READ3(long, "semctl",
int, semid, int, semnum, int, cmd);
break;
@@ -1836,14 +1836,14 @@
{
if (ARG2 & VKI_O_CREAT) {
// 4-arg version
- PRINT("sem_open ( %#lx(%s), %ld, %ld, %ld )",
- ARG1,(char*)ARG1,ARG2,ARG3,ARG4);
+ PRINT("sem_open ( %#lx(%s), %ld, %lu, %lu )",
+ ARG1, (HChar*)ARG1, SARG2, ARG3, ARG4);
PRE_REG_READ4(vki_sem_t *, "sem_open",
const char *, name, int, oflag, vki_mode_t, mode,
unsigned int, value);
} else {
// 2-arg version
- PRINT("sem_open ( %#lx(%s), %ld )",ARG1,(char*)ARG1,ARG2);
+ PRINT("sem_open ( %#lx(%s), %ld )", ARG1, (HChar*)ARG1, SARG2);
PRE_REG_READ2(vki_sem_t *, "sem_open",
const char *, name, int, oflag);
}
@@ -1861,7 +1861,7 @@
PRE(sem_unlink)
{
- PRINT("sem_unlink( %#lx(%s) )", ARG1,(char*)ARG1);
+ PRINT("sem_unlink( %#lx(%s) )", ARG1, (HChar*)ARG1);
PRE_REG_READ1(int, "sem_unlink", const char *, name);
PRE_MEM_RASCIIZ( "sem_unlink(name)", ARG1 );
}
@@ -1882,7 +1882,7 @@
PRE(sem_init)
{
- PRINT("sem_init( %#lx, %ld, %ld )", ARG1, ARG2, ARG3);
+ PRINT("sem_init( %#lx, %ld, %lu )", ARG1, SARG2, ARG3);
PRE_REG_READ3(int, "sem_init", vki_sem_t *, sem,
int, pshared, unsigned int, value);
PRE_MEM_WRITE("sem_init(sem)", ARG1, sizeof(vki_sem_t));
@@ -1982,7 +1982,7 @@
PRE(kevent)
{
PRINT("kevent( %ld, %#lx, %ld, %#lx, %ld, %#lx )",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(int,"kevent", int,kq,
const struct vki_kevent *,changelist, int,nchanges,
struct vki_kevent *,eventlist, int,nevents,
@@ -2008,7 +2008,7 @@
PRE(kevent64)
{
PRINT("kevent64( %ld, %#lx, %ld, %#lx, %ld, %#lx )",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG1, ARG2, SARG3, ARG4, SARG5, ARG6);
PRE_REG_READ6(int,"kevent64", int,kq,
const struct vki_kevent64 *,changelist, int,nchanges,
struct vki_kevent64 *,eventlist, int,nevents,
@@ -2076,8 +2076,8 @@
PRE(workq_ops)
{
- PRINT("workq_ops( %ld(%s), %#lx, %ld )", ARG1, workqop_name(ARG1), ARG2,
- ARG3);
+ PRINT("workq_ops( %ld(%s), %#lx, %ld )", SARG1, workqop_name(ARG1), ARG2,
+ SARG3);
PRE_REG_READ3(int,"workq_ops", int,"options", void *,"item",
int,"priority");
@@ -2137,7 +2137,7 @@
PRE(__mac_syscall)
{
PRINT("__mac_syscall( %#lx(%s), %ld, %#lx )",
- ARG1, (HChar*)ARG1, ARG2, ARG3);
+ ARG1, (HChar*)ARG1, SARG2, ARG3);
PRE_REG_READ3(int,"__mac_syscall", char *,"policy",
int,"call", void *,"arg");
@@ -2153,7 +2153,7 @@
ThreadId t;
ThreadState* tst;
- PRINT("darwin exit( %ld )", ARG1);
+ PRINT("darwin exit( %ld )", SARG1);
PRE_REG_READ1(void, "exit", int, status);
tst = VG_(get_ThreadState)(tid);
@@ -2181,7 +2181,7 @@
PRE(sigaction)
{
- PRINT("sigaction ( %ld, %#lx, %#lx )", ARG1,ARG2,ARG3);
+ PRINT("sigaction ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "sigaction",
int, signum, vki_sigaction_toK_t *, act,
vki_sigaction_fromK_t *, oldact);
@@ -2214,7 +2214,7 @@
PRE(__pthread_kill)
{
- PRINT("__pthread_kill ( %ld, %ld )", ARG1, ARG2);
+ PRINT("__pthread_kill ( %#lx, %ld )", ARG1, SARG2);
PRE_REG_READ2(long, "__pthread_kill", vki_pthread_t*, thread, int, sig);
}
@@ -2223,7 +2223,7 @@
{
// arguments are identical to sigprocmask (how, sigset_t*, sigset_t*).
UWord arg1;
- PRINT("__pthread_sigmask ( %ld, %#lx, %#lx )", ARG1, ARG2, ARG3);
+ PRINT("__pthread_sigmask ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "__pthread_sigmask",
int, how, vki_sigset_t *, set, vki_sigset_t *, oldset);
if (ARG2 != 0)
@@ -2268,7 +2268,7 @@
*flags |= SfMayBlock; /* might kill this thread??? */
/* I don't think so -- I think it just changes the cancellation
state. But taking no chances. */
- PRINT("__pthread_canceled ( %ld )", ARG1);
+ PRINT("__pthread_canceled ( %#lx )", ARG1);
PRE_REG_READ1(long, "__pthread_canceled", void*, arg1);
}
@@ -2285,7 +2285,7 @@
PRE(__disable_threadsignal)
{
vki_sigset_t set;
- PRINT("__disable_threadsignal(%ld, %ld, %ld)", ARG1, ARG2, ARG3);
+ PRINT("__disable_threadsignal(%ld, %ld, %ld)", SARG1, SARG2, SARG3);
/* I don't think this really looks at its arguments. So don't
bother to check them. */
@@ -2304,7 +2304,7 @@
PRE(__pthread_chdir)
{
- PRINT("__pthread_chdir ( %#lx(%s) )", ARG1, (char*)ARG1);
+ PRINT("__pthread_chdir ( %#lx(%s) )", ARG1, (HChar*)ARG1);
PRE_REG_READ1(long, "__pthread_chdir", const char *, path);
PRE_MEM_RASCIIZ( "__pthread_chdir(path)", ARG1 );
}
@@ -2313,7 +2313,7 @@
PRE(__pthread_fchdir)
{
- PRINT("__pthread_fchdir ( %ld )", ARG1);
+ PRINT("__pthread_fchdir ( %lu )", ARG1);
PRE_REG_READ1(long, "__pthread_fchdir", unsigned int, fd);
}
@@ -2321,7 +2321,7 @@
PRE(kdebug_trace)
{
PRINT("kdebug_trace(%ld, %ld, %ld, %ld, %ld, %ld)",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG1, SARG2, SARG3, SARG4, SARG5, SARG6);
/*
Don't check anything - some clients pass fewer arguments.
PRE_REG_READ6(long, "kdebug_trace",
@@ -2333,20 +2333,20 @@
PRE(seteuid)
{
- PRINT("seteuid(%ld)", ARG1);
+ PRINT("seteuid(%lu)", ARG1);
PRE_REG_READ1(long, "seteuid", vki_uid_t, "uid");
}
PRE(setegid)
{
- PRINT("setegid(%ld)", ARG1);
+ PRINT("setegid(%lu)", ARG1);
PRE_REG_READ1(long, "setegid", vki_uid_t, "uid");
}
PRE(settid)
{
- PRINT("settid(%ld, %ld)", ARG1, ARG2);
+ PRINT("settid(%lu, %lu)", ARG1, ARG2);
PRE_REG_READ2(long, "settid", vki_uid_t, "uid", vki_gid_t, "gid");
}
@@ -2404,7 +2404,7 @@
PRE(getxattr)
{
PRINT("getxattr(%#lx(%s), %#lx(%s), %#lx, %lu, %lu, %ld)",
- ARG1, (char *)ARG1, ARG2, (char *)ARG2, ARG3, ARG4, ARG5, ARG6);
+ ARG1, (HChar *)ARG1, ARG2, (HChar *)ARG2, ARG3, ARG4, ARG5, SARG6);
PRE_REG_READ6(vki_ssize_t, "getxattr",
const char *, path, char *, name, void *, value,
@@ -2425,7 +2425,7 @@
PRE(fgetxattr)
{
PRINT("fgetxattr(%ld, %#lx(%s), %#lx, %lu, %lu, %ld)",
- ARG1, ARG2, (char *)ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG1, ARG2, (HChar *)ARG2, ARG3, ARG4, ARG5, SARG6);
PRE_REG_READ6(vki_ssize_t, "fgetxattr",
int, fd, char *, name, void *, value,
@@ -2443,7 +2443,7 @@
PRE(setxattr)
{
PRINT("setxattr ( %#lx(%s), %#lx(%s), %#lx, %lu, %lu, %ld )",
- ARG1, (char *)ARG1, ARG2, (char*)ARG2, ARG3, ARG4, ARG5, ARG6 );
+ ARG1, (HChar *)ARG1, ARG2, (HChar*)ARG2, ARG3, ARG4, ARG5, SARG6 );
PRE_REG_READ6(int, "setxattr",
const char *,"path", char *,"name", void *,"value",
vki_size_t,"size", uint32_t,"position", int,"options" );
@@ -2457,7 +2457,7 @@
PRE(fsetxattr)
{
PRINT( "fsetxattr ( %ld, %#lx(%s), %#lx, %lu, %lu, %ld )",
- ARG1, ARG2, (char*)ARG2, ARG3, ARG4, ARG5, ARG6 );
+ SARG1, ARG2, (HChar*)ARG2, ARG3, ARG4, ARG5, SARG6 );
PRE_REG_READ6(int, "fsetxattr",
int,"fd", char *,"name", void *,"value",
vki_size_t,"size", uint32_t,"position", int,"options" );
@@ -2470,7 +2470,7 @@
PRE(removexattr)
{
PRINT( "removexattr ( %#lx(%s), %#lx(%s), %ld )",
- ARG1, (HChar*)ARG1, ARG2, (HChar*)ARG2, ARG3 );
+ ARG1, (HChar*)ARG1, ARG2, (HChar*)ARG2, SARG3 );
PRE_REG_READ3(int, "removexattr",
const char*, "path", char*, "attrname", int, "options");
PRE_MEM_RASCIIZ( "removexattr(path)", ARG1 );
@@ -2481,7 +2481,7 @@
PRE(fremovexattr)
{
PRINT( "fremovexattr ( %ld, %#lx(%s), %ld )",
- ARG1, ARG2, (HChar*)ARG2, ARG3 );
+ SARG1, ARG2, (HChar*)ARG2, SARG3 );
PRE_REG_READ3(int, "fremovexattr",
int, "fd", char*, "attrname", int, "options");
PRE_MEM_RASCIIZ( "removexattr(attrname)", ARG2 );
@@ -2491,7 +2491,7 @@
PRE(listxattr)
{
PRINT( "listxattr ( %#lx(%s), %#lx, %lu, %ld )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4 );
+ ARG1, (HChar *)ARG1, ARG2, ARG3, SARG4 );
PRE_REG_READ4 (long, "listxattr",
const char *,"path", char *,"namebuf",
vki_size_t,"size", int,"options" );
@@ -2511,7 +2511,7 @@
PRE(flistxattr)
{
PRINT( "flistxattr ( %ld, %#lx, %lu, %ld )",
- ARG1, ARG2, ARG3, ARG4 );
+ SARG1, ARG2, ARG3, SARG4 );
PRE_REG_READ4 (long, "flistxattr",
int, "fd", char *,"namebuf",
vki_size_t,"size", int,"options" );
@@ -2529,7 +2529,7 @@
PRE(shmat)
{
UWord arg2tmp;
- PRINT("shmat ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("shmat ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "shmat",
int, shmid, const void *, shmaddr, int, shmflg);
arg2tmp = ML_(generic_PRE_sys_shmat)(tid, ARG1,ARG2,ARG3);
@@ -2545,7 +2545,7 @@
PRE(shmctl)
{
- PRINT("shmctl ( %ld, %ld, %#lx )",ARG1,ARG2,ARG3);
+ PRINT("shmctl ( %ld, %ld, %#lx )", SARG1, SARG2, ARG3);
PRE_REG_READ3(long, "shmctl",
int, shmid, int, cmd, struct vki_shmid_ds *, buf);
ML_(generic_PRE_sys_shmctl)(tid, ARG1,ARG2,ARG3);
@@ -2569,13 +2569,13 @@
PRE(shmget)
{
- PRINT("shmget ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
+ PRINT("shmget ( %ld, %lu, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "shmget", vki_key_t, key, vki_size_t, size, int, shmflg);
}
PRE(shm_open)
{
- PRINT("shm_open(%#lx(%s), %ld, %ld)", ARG1, (char *)ARG1, ARG2, ARG3);
+ PRINT("shm_open(%#lx(%s), %ld, %lu)", ARG1, (HChar *)ARG1, SARG2, ARG3);
PRE_REG_READ3(long, "shm_open",
const char *,"name", int,"flags", vki_mode_t,"mode");
@@ -2591,14 +2591,14 @@
SET_STATUS_Failure( VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
- ML_(record_fd_open_with_given_name)(tid, RES, (char*)ARG1);
+ ML_(record_fd_open_with_given_name)(tid, RES, (HChar*)ARG1);
}
}
PRE(shm_unlink)
{
*flags |= SfMayBlock;
- PRINT("shm_unlink ( %#lx(%s) )", ARG1,(char*)ARG1);
+ PRINT("shm_unlink ( %#lx(%s) )", ARG1, (HChar*)ARG1);
PRE_REG_READ1(long, "shm_unlink", const char *, pathname);
PRE_MEM_RASCIIZ( "shm_unlink(pathname)", ARG1 );
}
@@ -2614,7 +2614,7 @@
PRE(stat_extended)
{
PRINT("stat_extended( %#lx(%s), %#lx, %#lx, %#lx )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "stat_extended", char *, file_name, struct stat *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "stat_extended(file_name)", ARG1 );
@@ -2635,7 +2635,7 @@
PRE(lstat_extended)
{
PRINT("lstat_extended( %#lx(%s), %#lx, %#lx, %#lx )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "lstat_extended", char *, file_name, struct stat *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "lstat_extended(file_name)", ARG1 );
@@ -2656,7 +2656,7 @@
PRE(fstat_extended)
{
PRINT("fstat_extended( %ld, %#lx, %#lx, %#lx )",
- ARG1, ARG2, ARG3, ARG4);
+ SARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "fstat_extended", int, fd, struct stat *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_WRITE( "fstat_extended(buf)", ARG2, sizeof(struct vki_stat) );
@@ -2676,7 +2676,7 @@
PRE(stat64_extended)
{
PRINT("stat64_extended( %#lx(%s), %#lx, %#lx, %#lx )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "stat64_extended", char *, file_name, struct stat64 *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "stat64_extended(file_name)", ARG1 );
@@ -2697,7 +2697,7 @@
PRE(lstat64_extended)
{
PRINT("lstat64_extended( %#lx(%s), %#lx, %#lx, %#lx )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "lstat64_extended", char *, file_name, struct stat64 *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_RASCIIZ( "lstat64_extended(file_name)", ARG1 );
@@ -2718,7 +2718,7 @@
PRE(fstat64_extended)
{
PRINT("fstat64_extended( %ld, %#lx, %#lx, %#lx )",
- ARG1, ARG2, ARG3, ARG4);
+ SARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "fstat64_extended", int, fd, struct stat64 *, buf,
void *, fsacl, vki_size_t *, fsacl_size);
PRE_MEM_WRITE( "fstat64_extended(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -2739,7 +2739,7 @@
{
/* DDD: Note: this is not really correct. Handling of
chmod_extended is broken in the same way. */
- PRINT("fchmod_extended ( %ld, %ld, %ld, %ld, %#lx )",
+ PRINT("fchmod_extended ( %lu, %lu, %lu, %lu, %#lx )",
ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(long, "fchmod_extended",
unsigned int, fildes,
@@ -2782,9 +2782,9 @@
{
/* DDD: Note: this is not really correct. Handling of
{,f}chmod_extended is broken in the same way. */
- PRINT("open_extended ( %#lx(%s), 0x%lx, %ld, %ld, %ld, %#lx )",
+ PRINT("open_extended ( %#lx(%s), %ld, %lu, %lu, %lu, %#lx )",
ARG1, ARG1 ? (HChar*)ARG1 : "(null)",
- ARG2, ARG3, ARG4, ARG5, ARG6);
+ SARG2, ARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(long, "open_extended",
char*, path,
int, flags,
@@ -2827,7 +2827,7 @@
PRE(access_extended)
{
PRINT("access_extended( %#lx(%s), %lu, %#lx, %lu )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
// XXX: the accessx_descriptor struct contains padding, so this can cause
// unnecessary undefined value errors. But you arguably shouldn't be
// passing undefined values to the kernel anyway...
@@ -2887,7 +2887,7 @@
PRE(chflags)
{
- PRINT("chflags ( %#lx(%s), %lu )", ARG1, (char *)ARG1, ARG2);
+ PRINT("chflags ( %#lx(%s), %lu )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(int, "chflags", const char *,path, unsigned int,flags);
PRE_MEM_RASCIIZ("chflags(path)", ARG1);
@@ -2896,7 +2896,7 @@
PRE(fchflags)
{
- PRINT("fchflags ( %ld, %lu )", ARG1, ARG2);
+ PRINT("fchflags ( %ld, %lu )", SARG1, ARG2);
PRE_REG_READ2(int, "fchflags", int,fd, unsigned int,flags);
// GrP fixme sanity-check flags value?
@@ -2904,7 +2904,7 @@
PRE(stat64)
{
- PRINT("stat64 ( %#lx(%s), %#lx )", ARG1, (char *)ARG1, ARG2);
+ PRINT("stat64 ( %#lx(%s), %#lx )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(long, "stat", const char *,path, struct stat64 *,buf);
PRE_MEM_RASCIIZ("stat64(path)", ARG1);
PRE_MEM_WRITE( "stat64(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -2916,7 +2916,7 @@
PRE(lstat64)
{
- PRINT("lstat64 ( %#lx(%s), %#lx )", ARG1, (char *)ARG1, ARG2);
+ PRINT("lstat64 ( %#lx(%s), %#lx )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(long, "stat", const char *,path, struct stat64 *,buf);
PRE_MEM_RASCIIZ("lstat64(path)", ARG1);
PRE_MEM_WRITE( "lstat64(buf)", ARG2, sizeof(struct vki_stat64) );
@@ -2928,7 +2928,7 @@
PRE(fstat64)
{
- PRINT("fstat64 ( %ld, %#lx )", ARG1,ARG2);
+ PRINT("fstat64 ( %lu, %#lx )", ARG1,ARG2);
PRE_REG_READ2(long, "fstat", unsigned int, fd, struct stat64 *, buf);
PRE_MEM_WRITE( "fstat64(buf)", ARG2, sizeof(struct vki_stat64) );
}
@@ -2939,7 +2939,7 @@
PRE(getfsstat)
{
- PRINT("getfsstat(%#lx, %ld, %ld)", ARG1, ARG2, ARG3);
+ PRINT("getfsstat(%#lx, %ld, %ld)", ARG1, SARG2, SARG3);
PRE_REG_READ3(int, "getfsstat",
struct vki_statfs *, buf, int, bufsize, int, flags);
if (ARG1) {
@@ -2957,7 +2957,7 @@
PRE(getfsstat64)
{
- PRINT("getfsstat64(%#lx, %ld, %ld)", ARG1, ARG2, ARG3);
+ PRINT("getfsstat64(%#lx, %ld, %ld)", ARG1, SARG2, SARG3);
PRE_REG_READ3(int, "getfsstat64",
struct vki_statfs64 *, buf, int, bufsize, int, flags);
if (ARG1) {
@@ -2980,7 +2980,7 @@
// by 'data'.
*flags |= SfMayBlock;
PRINT("sys_mount( %#lx(%s), %#lx(%s), %#lx, %#lx )",
- ARG1,(char*)ARG1, ARG2,(char*)ARG2, ARG3, ARG4);
+ ARG1, (HChar*)ARG1, ARG2, (HChar*)ARG2, ARG3, ARG4);
PRE_REG_READ4(long, "mount",
const char *, type, const char *, dir,
int, flags, void *, data);
@@ -3170,7 +3170,7 @@
PRE(getattrlist)
{
PRINT("getattrlist(%#lx(%s), %#lx, %#lx, %lu, %lu)",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4, ARG5);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(int, "getattrlist",
const char *,path, struct vki_attrlist *,attrList,
void *,attrBuf, vki_size_t,attrBufSize, unsigned int,options);
@@ -3198,7 +3198,7 @@
PRE(setattrlist)
{
PRINT("setattrlist(%#lx(%s), %#lx, %#lx, %lu, %lu)",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4, ARG5);
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4, ARG5);
PRE_REG_READ5(int, "setattrlist",
const char *,path, struct vki_attrlist *,attrList,
void *,attrBuf, vki_size_t,attrBufSize, unsigned int,options);
@@ -3210,8 +3210,8 @@
PRE(getdirentriesattr)
{
- PRINT("getdirentriesattr(%ld, %#lx, %#lx, %ld, %#lx, %#lx, %#lx, %ld)",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);
+ PRINT("getdirentriesattr(%ld, %#lx, %#lx, %lu, %#lx, %#lx, %#lx, %lu)",
+ SARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);
PRE_REG_READ8(int, "getdirentriesattr",
int,fd, struct vki_attrlist *,attrList,
void *,attrBuf, size_t,attrBufSize,
@@ -3253,7 +3253,7 @@
PRE(exchangedata)
{
PRINT("exchangedata(%#lx(%s), %#lx(%s), %lu)",
- ARG1, (char*)ARG1, ARG2, (char*)ARG2, ARG3);
+ ARG1, (HChar*)ARG1, ARG2, (HChar*)ARG2, ARG3);
PRE_REG_READ3(int, "exchangedata",
char *, path1, char *, path2, unsigned long, options);
PRE_MEM_RASCIIZ( "exchangedata(path1)", ARG1 );
@@ -3262,8 +3262,8 @@
PRE(fsctl)
{
- PRINT("fsctl ( %#lx(%s), %ld, %#lx, %ld )",
- ARG1, (char *)ARG1, ARG2, ARG3, ARG4);
+ PRINT("fsctl ( %#lx(%s), %lu, %#lx, %lu )",
+ ARG1, (HChar *)ARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4( long, "fsctl",
char *,"path", unsigned int,"request",
void *,"data", unsigned int,"options");
@@ -3321,7 +3321,7 @@
PRE(initgroups)
{
- PRINT("initgroups(%s, %#lx, %lu)", (char *)ARG1, ARG2, ARG3);
+ PRINT("initgroups(%s, %#lx, %lu)", (HChar *)ARG1, ARG2, ARG3);
PRE_REG_READ3(long, "initgroups",
int, setlen, vki_gid_t *, gidset, vki_uid_t, gmuid);
PRE_MEM_READ("gidset", ARG2, ARG1 * sizeof(vki_gid_t));
@@ -3579,7 +3579,7 @@
PRE(socket)
{
- PRINT("socket ( %ld, %ld, %ld )",ARG1,ARG2,ARG3);
+ PRINT("socket ( %ld, %ld, %ld )", SARG1, SARG2, SARG3);
PRE_REG_READ3(long, "socket", int, domain, int, type, int, protocol);
}
@@ -3595,7 +3595,7 @@
PRE(setsockopt)
{
PRINT("setsockopt ( %ld, %ld, %ld, %#lx, %ld )",
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ SARG1, SARG2, SARG3, ARG4, SARG5);
PRE_REG_READ5(long, "setsockopt",
int, s, int, level, int, optname,
const void *, optval, vki_socklen_t, optlen);
@@ -3608,7 +3608,7 @@
Addr optval_p = ARG4;
Addr optlen_p = ARG5;
PRINT("getsockopt ( %ld, %ld, %ld, %#lx, %#lx )",
- ARG1,ARG2,ARG3,ARG4,ARG5);
+ SARG1, SARG2, SARG3, ARG4, ARG5);
PRE_REG_READ5(long, "getsockopt",
int, s, int, level, int, optname,
void *, optval, vki_socklen_t *, optlen);
@@ -3641,7 +3641,7 @@
PRE(connect)
{
*flags |= SfMayBlock;
- PRINT("connect ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("connect ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "connect",
int, sockfd, struct sockaddr *, serv_addr, int, addrlen);
ML_(generic_PRE_sys_connect)(tid, ARG1,ARG2,ARG3);
@@ -3651,9 +3651,9 @@
PRE(accept)
{
*flags |= SfMayBlock;
- PRINT("accept ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("accept ( %ld, %#lx, %#lx )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "accept",
- int, s, struct sockaddr *, addr, int, *addrlen);
+ int, s, struct sockaddr *, addr, int *, addrlen);
ML_(generic_PRE_sys_accept)(tid, ARG1,ARG2,ARG3);
}
@@ -3669,7 +3669,7 @@
PRE(mkfifo)
{
*flags |= SfMayBlock;
- PRINT("mkfifo ( %#lx(%s), %lld )",ARG1,(char *)ARG1,(ULong)ARG2);
+ PRINT("mkfifo ( %#lx(%s), %lx )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(long, "mkfifo", const char *, path, vki_mode_t, mode);
PRE_MEM_RASCIIZ( "mkfifo(path)", ARG1 );
}
@@ -3690,7 +3690,7 @@
{
*flags |= SfMayBlock;
PRINT("sendto ( %ld, %s, %ld, %lu, %#lx, %ld )",
- ARG1,(char *)ARG2,ARG3,ARG4,ARG5,ARG6);
+ SARG1, (HChar *)ARG2, SARG3, ARG4, ARG5, SARG6);
PRE_REG_READ6(long, "sendto",
int, s, const void *, msg, int, len,
unsigned int, flags,
@@ -3702,7 +3702,7 @@
{
#if VG_WORDSIZE == 4
PRINT("sendfile(%ld, %ld, %llu, %#lx, %#lx, %ld)",
- ARG1, ARG2, LOHI64(ARG3, ARG4), ARG5, ARG6, ARG7);
+ SARG1, SARG2, LOHI64(ARG3, ARG4), ARG5, ARG6, SARG7);
PRE_REG_READ7(long, "sendfile",
int, fromfd, int, tofd,
@@ -3711,8 +3711,8 @@
PRE_MEM_WRITE("sendfile(nwritten)", ARG5, sizeof(vki_uint64_t));
if (ARG6) PRE_MEM_WRITE("sendfile(sf_header)", ARG6, sizeof(struct sf_hdtr));
#else
- PRINT("sendfile(%ld, %ld, %ld, %#lx, %#lx, %ld)",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);
+ PRINT("sendfile(%ld, %ld, %lu, %#lx, %#lx, %ld)",
+ SARG1, SARG2, ARG3, ARG4, ARG5, SARG6);
PRE_REG_READ6(long, "sendfile",
int, fromfd, int, tofd,
@@ -3739,7 +3739,7 @@
{
*flags |= SfMayBlock;
PRINT("recvfrom ( %ld, %#lx, %ld, %lu, %#lx, %#lx )",
- ARG1,ARG2,ARG3,ARG4,ARG5,ARG6);
+ SARG1, ARG2, SARG3, ARG4, ARG5, ARG6);
PRE_REG_READ6(long, "recvfrom",
int, s, void *, buf, int, len, unsigned int, flags,
struct sockaddr *, from, int *, fromlen);
@@ -3757,7 +3757,7 @@
PRE(sendmsg)
{
*flags |= SfMayBlock;
- PRINT("sendmsg ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("sendmsg ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "sendmsg",
int, s, const struct msghdr *, msg, int, flags);
ML_(generic_PRE_sys_sendmsg)(tid, "msg", (struct vki_msghdr *)ARG2);
@@ -3767,7 +3767,7 @@
PRE(recvmsg)
{
*flags |= SfMayBlock;
- PRINT("recvmsg ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("recvmsg ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "recvmsg", int, s, struct msghdr *, msg, int, flags);
ML_(generic_PRE_sys_recvmsg)(tid, "msg", (struct vki_msghdr *)ARG2);
}
@@ -3781,14 +3781,14 @@
PRE(shutdown)
{
*flags |= SfMayBlock;
- PRINT("shutdown ( %ld, %ld )",ARG1,ARG2);
+ PRINT("shutdown ( %ld, %ld )", SARG1, SARG2);
PRE_REG_READ2(int, "shutdown", int, s, int, how);
}
PRE(bind)
{
- PRINT("bind ( %ld, %#lx, %ld )",ARG1,ARG2,ARG3);
+ PRINT("bind ( %ld, %#lx, %ld )", SARG1, ARG2, SARG3);
PRE_REG_READ3(long, "bind",
int, sockfd, struct sockaddr *, my_addr, int, addrlen);
ML_(generic_PRE_sys_bind)(tid, ARG1,ARG2,ARG3);
@@ -3797,14 +3797,14 @@
PRE(listen)
{
- PRINT("listen ( %ld, %ld )",ARG1,ARG2);
+ PRINT("listen ( %ld, %ld )", SARG1, SARG2);
PRE_REG_READ2(long, "listen", int, s, int, backlog);
}
PRE(getsockname)
{
- PRINT("getsockname ( %ld, %#lx, %#lx )",ARG1,ARG2,ARG3);
+ PRINT("getsockname ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "getsockname",
int, s, struct sockaddr *, name, int *, namelen);
ML_(generic_PRE_sys_getsockname)(tid, ARG1,ARG2,ARG3);
@@ -3820,7 +3820,7 @@
PRE(getpeername)
{
- PRINT("getpeername ( %ld, %#lx, %#lx )",ARG1,ARG2,ARG3);
+ PRINT("getpeername ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "getpeername",
int, s, struct sockaddr *, name, int *, namelen);
ML_(generic_PRE_sys_getpeername)(tid, ARG1,ARG2,ARG3);
@@ -3836,7 +3836,7 @@
PRE(socketpair)
{
- PRINT("socketpair ( %ld, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4);
+ PRINT("socketpair ( %ld, %ld, %ld, %#lx )", SARG1, SARG2, SARG3, ARG4);
PRE_REG_READ4(long, "socketpair",
int, d, int, type, int, protocol, int *, sv);
ML_(generic_PRE_sys_socketpair)(tid, ARG1,ARG2,ARG3,ARG4);
@@ -3899,7 +3899,7 @@
PRE(getlogin)
{
- PRINT("getlogin ( %#lx, %ld )", ARG1, ARG2);
+ PRINT("getlogin ( %#lx, %lu )", ARG1, ARG2);
PRE_REG_READ2(long, "getlogin",
char *,"namebuf", unsigned int,"namelen");
@@ -3914,7 +3914,7 @@
PRE(ptrace)
{
- PRINT("ptrace ( %ld, %ld, %#lx, %ld )", ARG1, ARG2, ARG3, ARG4);
+ PRINT("ptrace ( %ld, %ld, %#lx, %ld )", SARG1, SARG2, ARG3, SARG4);
PRE_REG_READ4(long, "ptrace",
int,"request", vki_pid_t,"pid",
vki_caddr_t,"addr", int,"data");
@@ -3946,7 +3946,7 @@
PRE(lseek)
{
- PRINT("lseek ( %ld, %ld, %ld )", ARG1,ARG2,ARG3);
+ PRINT("lseek ( %lu, %ld, %ld )", ARG1, SARG2, SARG3);
PRE_REG_READ4(vki_off_t, "lseek",
unsigned int,fd, int,offset_hi, int,offset_lo,
unsigned int,whence);
@@ -3955,7 +3955,7 @@
PRE(pathconf)
{
- PRINT("pathconf(%#lx(%s), %ld)", ARG1,(char *)ARG1,ARG2);
+ PRINT("pathconf(%#lx(%s), %ld)", ARG1, (HChar *)ARG1, SARG2);
PRE_REG_READ2(long,"pathconf", const char *,"path", int,"name");
PRE_MEM_RASCIIZ("pathconf(path)", ARG1);
}
@@ -3963,7 +3963,7 @@
PRE(fpathconf)
{
- PRINT("fpathconf(%ld, %ld)", ARG1,ARG2);
+ PRINT("fpathconf(%ld, %ld)", SARG1, SARG2);
PRE_REG_READ2(long,"fpathconf", int,"fd", int,"name");
if (!ML_(fd_allowed)(ARG1, "fpathconf", tid, False))
@@ -3973,7 +3973,7 @@
PRE(getdirentries)
{
- PRINT("getdirentries(%ld, %#lx, %ld, %#lx)", ARG1, ARG2, ARG3, ARG4);
+ PRINT("getdirentries(%ld, %#lx, %ld, %#lx)", SARG1, ARG2, SARG3, ARG4);
PRE_REG_READ4(int, "getdirentries",
int, fd, char *, buf, int, nbytes, long *, basep);
PRE_MEM_WRITE("getdirentries(basep)", ARG4, sizeof(long));
@@ -3990,7 +3990,7 @@
PRE(getdirentries64)
{
- PRINT("getdirentries64(%ld, %#lx, %lu, %#lx)", ARG1, ARG2, ARG3, ARG4);
+ PRINT("getdirentries64(%ld, %#lx, %lu, %#lx)", SARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(vki_ssize_t, "getdirentries",
int,fd, char *,buf, vki_size_t,nbytes, vki_off_t *,basep);
/* JRS 18-Nov-2014: it appears that sometimes |basep| doesn't point
@@ -4015,7 +4015,7 @@
PRE(statfs64)
{
- PRINT("statfs64 ( %#lx(%s), %#lx )",ARG1,(char *)ARG1,ARG2);
+ PRINT("statfs64 ( %#lx(%s), %#lx )", ARG1, (HChar *)ARG1, ARG2);
PRE_REG_READ2(long, "statfs64", const char *, path, struct statfs64 *, buf);
PRE_MEM_RASCIIZ( "statfs64(path)", ARG1 );
PRE_MEM_WRITE( "statfs64(buf)", ARG2, sizeof(struct vki_statfs64) );
@@ -4028,7 +4028,7 @@
PRE(fstatfs64)
{
- PRINT("fstatfs64 ( %ld, %#lx )",ARG1,ARG2);
+ PRINT("fstatfs64 ( %lu, %#lx )", ARG1, ARG2);
PRE_REG_READ2(long, "fstatfs64",
unsigned int, fd, struct statfs *, buf);
PRE_MEM_WRITE( "fstatfs64(buf)", ARG2, sizeof(struct vki_statfs64) );
@@ -4040,7 +4040,7 @@
PRE(csops)
{
- PRINT("csops ( %ld, %#lx, %#lx, %lu )", ARG1, ARG2, ARG3, ARG4);
+ PRINT("csops ( %ld, %#lx, %#lx, %lu )", SARG1, ARG2, ARG3, ARG4);
PRE_REG_READ4(int, "csops",
vki_pid_t, pid, uint32_t, ops,
void *, useraddr, vki_size_t, usersize);
@@ -4065,7 +4065,7 @@
PRE(auditon)
{
- PRINT("auditon ( %ld, %#lx, %ld )", ARG1, ARG2, ARG3);
+ PRINT("auditon ( %ld, %#lx, %lu )", SARG1, ARG2, ARG3);
PRE_REG_READ3(int,"auditon",
int,"cmd", void*,"data", unsigned int,"length");
@@ -4181,7 +4181,7 @@
PRE(getaudit_addr)
{
- PRINT("getaudit_addr(%#lx, %lu)", ARG1, ARG2);
+ PRINT("getaudit_addr(%#lx, %ld)", ARG1, SARG2);
PRE_REG_READ1(void*, "auditinfo_addr", int, "length");
PRE_MEM_WRITE("getaudit_addr(auditinfo_addr)", ARG1, ARG2);
}
@@ -4197,8 +4197,8 @@
if (0) VG_(am_do_sync_check)("(PRE_MMAP)",__FILE__,__LINE__);
#if VG_WORDSIZE == 4
- PRINT("mmap ( %#lx, %lu, %ld, %ld, %ld, %lld )",
- ARG1, ARG2, ARG3, ARG4, ARG5, LOHI64(ARG6, ARG7) );
+ PRINT("mmap ( %#lx, %lu, %ld, %ld, %ld, %llu )",
+ ARG1, ARG2, SARG3, SARG4, SARG5, LOHI64(ARG6, ARG7) );
PRE_REG_READ7(Addr, "mmap",
Addr,start, vki_size_t,length, int,prot, int,flags, int,fd,
unsigned long,offset_hi, unsigned long,offset_lo);
@@ -4208,7 +4208,7 @@
// (Off64T)LOHI64(ARG6, ARG7) );
#else
PRINT("mmap ( %#lx, %lu, %ld, %ld, %ld, %ld )",
- ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 );
+ ARG1, ARG2, SARG3, SARG4, SARG5, SARG6 );
PRE_REG_READ6(long, "mmap",
Addr,start, vki_size_t,length, int,prot, int,flags, int,fd,
Off64T,offset);
@@ -4305,7 +4305,7 @@
UWord newp = ARG5;
UWord newlen = ARG6;
- PRINT( "__sysctl ( %#lx, %ld, %#lx, %#lx, %#lx, %ld )",
+ PRINT( "__sysctl ( %#lx, %lu, %#lx, %#lx, %#lx, %#lx )",
name, namelen, oldp, oldlenp, newp, newlen );
PRE_REG_READ6(int, "__sysctl", int*, name, unsigned int, namelen,
@@ -4367,7 +4367,7 @@
PRE(sigprocmask)
{
UWord arg1;
- PRINT("sigprocmask ( %ld, %#lx, %#lx )", ARG1, ARG2, ARG3);
+ PRINT("sigprocmask ( %ld, %#lx, %#lx )", SARG1, ARG2, ARG3);
PRE_REG_READ3(long, "sigprocmask",
int, how, vki_sigset_t *, set, vki_sigset_t *, oldset);
if (ARG2 != 0)
@@ -4922,7 +4922,7 @@
Reply *reply = (Reply *)ARG1;
if (!reply->RetCode) {
- PRINT("page size %llu", (ULong)reply->out_page_size);
+ PRINT("page size %llu", (ULong)reply->out_page_size);
} else {
PRINT("mig return %d", reply->RetCode);
}
@@ -6329,7 +6329,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_allocate (%s, at %#llx, size %lld, flags %#x)",
+ PRINT("vm_allocate (%s, at %#llx, size %llu, flags %#x)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size, req->flags);
@@ -6386,7 +6386,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_deallocate(%s, at %#llx, size %lld)",
+ PRINT("vm_deallocate(%s, at %#llx, size %llu)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size);
@@ -6444,7 +6444,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_protect(%s, at %#llx, size %lld, set_max %d, prot %d)",
+ PRINT("vm_protect(%s, at %#llx, size %llu, set_max %d, prot %d)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size,
req->set_maximum, req->new_protection);
@@ -6505,7 +6505,7 @@
Request *req = (Request *)ARG1;
- PRINT("vm_inherit(%s, at %#llx, size %lld, value %d)",
+ PRINT("vm_inherit(%s, at %#llx, size %llu, value %d)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size,
req->new_inheritance);
@@ -6759,7 +6759,7 @@
Request *req = (Request *)ARG1;
// GrP fixme check these
- PRINT("vm_map(in %s, at %#llx, size %lld, from %s ...)",
+ PRINT("vm_map(in %s, at %#llx, size %llu, from %s ...)",
name_for_port(MACH_REMOTE),
(ULong)req->address, (ULong)req->size,
name_for_port(req->object.name));
@@ -6827,12 +6827,12 @@
mach_port_name_t source_task = req->src_task.name;
if (source_task == mach_task_self()) {
PRINT("vm_remap(mach_task_self(), "
- "to %#llx size %lld, from mach_task_self() at %#llx, ...)",
+ "to %#llx size %llu, from mach_task_self() at %#llx, ...)",
(ULong)req->target_address,
(ULong)req->size, (ULong)req->src_address);
} else {
PRINT("vm_remap(mach_task_self(), "
- "to %#llx size %lld, from task %u at %#llx, ...)",
+ "to %#llx size %llu, from task %u at %#llx, ...)",
(ULong)req->target_address, (ULong)req->size,
source_task, (ULong)req->src_address);
}
@@ -6983,7 +6983,7 @@
PRINT("mach_vm_purgable_control(%s, 0x%llx, %d, %d)",
name_for_port(MACH_REMOTE),
- (unsigned long long)req->address, req->control, req->state);
+ (ULong)req->address, req->control, req->state);
// GrP fixme verify address?
@@ -7024,7 +7024,7 @@
Request *req = (Request *)ARG1;
- PRINT("mach_vm_allocate (%s, at 0x%llx, size %lld, flags 0x%x)",
+ PRINT("mach_vm_allocate (%s, at 0x%llx, size %llu, flags 0x%x)",
name_for_port(MACH_REMOTE),
req->address, req->size, req->flags);
@@ -7080,7 +7080,7 @@
Request *req = (Request *)ARG1;
- PRINT("mach_vm_deallocate(%s, at 0x%llx, size %lld)",
+ PRINT("mach_vm_deallocate(%s, at 0x%llx, size %llu)",
name_for_port(MACH_REMOTE),
req->address, req->size);
@@ -7138,7 +7138,7 @@
Request *req = (Request *)ARG1;
- PRINT("mach_vm_protect(%s, at 0x%llx, size %lld, set_max %d, prot %d)",
+ PRINT("mach_vm_protect(%s, at 0x%llx, size %llu, set_max %d, prot %d)",
name_for_port(MACH_REMOTE), req->address, req->size,
req->set_maximum, req->new_protection);
@@ -8650,7 +8650,7 @@
PRE(syscall_thread_switch)
{
PRINT("syscall_thread_switch(%s, %ld, %ld)",
- name_for_port(ARG1), ARG2, ARG3);
+ name_for_port(ARG1), SARG2, SARG3);
PRE_REG_READ3(long, "syscall_thread_switch",
mach_port_t,"thread", int,"option", natural_t,"timeout");
@@ -8735,7 +8735,7 @@
int timeout, int relative,
time_t tv_sec, time_t tv_nsec */
PRINT("__semwait_signal(wait %s, signal %s, %ld, %ld, %lds:%ldns)",
- name_for_port(ARG1), name_for_port(ARG2), ARG3, ARG4, ARG5, ARG6);
+ name_for_port(ARG1), name_for_port(ARG2), SARG3, SARG4, SARG5, SARG6);
PRE_REG_READ6(long, "__semwait_signal",
int,"cond_sem", int,"mutex_sem",
int,"timeout", int,"relative",
@@ -8767,7 +8767,7 @@
PRE(task_for_pid)
{
- PRINT("task_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), ARG2, ARG3);
+ PRINT("task_for_pid(%s, %ld, %#lx)", name_for_port(ARG1), SARG2, ARG3);
PRE_REG_READ3(long, "task_for_pid",
mach_port_t,"target",
vki_pid_t, "pid", mach_port_t *,"task");
@@ -8923,7 +8923,7 @@
PRE(swtch_pri)
{
- PRINT("swtch_pri ( %ld )", ARG1);
+ PRINT("swtch_pri ( %ld )", SARG1);
PRE_REG_READ1(long, "swtch_pri", int,"pri");
*flags |= SfMayBlock;
@@ -9586,7 +9586,7 @@
{
// int necp_match_policy(uint8_t *parameters, size_t parameters_size,
// struct necp_aggregate_result *returned_result)
- PRINT("necp_match_policy(FIXME)(%lx,%ld, %lx)", ARG1, ARG2, ARG3);
+ PRINT("necp_match_policy(FIXME)(%lx,%lu, %lx)", ARG1, ARG2, ARG3);
PRE_REG_READ3(int, "necp_match_policy", uint8_t*, parameters,
size_t, parameters_size, struct necp_aggregate_result*,
returned_result);
@@ -9604,14 +9604,14 @@
UWord oldp = ARG3;
UWord oldlenp = ARG4;
UWord newp = ARG5;
- UWord newlen = ARG6;
+ UWord newlen = ARG6; // FIXME: or newlenp ??
- PRINT( "sysctlbyname ( %#lx,%ld, %#lx,%#lx, %#lx,%ld )",
+ PRINT( "sysctlbyname ( %#lx,%lu, %#lx,%#lx, %#lx,%lu )",
...
[truncated message content] |