From: Nicholas Nethercote Date: Mon, 1 Nov 2004 16:52:43 +0000 (+0000) Subject: 64-bit cleanness tweaks. X-Git-Tag: svn/VALGRIND_3_0_0~1413 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd2b70488dbf26f2ded997f1649fac7a40b1ff93;p=thirdparty%2Fvalgrind.git 64-bit cleanness tweaks. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2893 --- diff --git a/coregrind/stage1.c b/coregrind/stage1.c index 9a9eba675f..c52d66386e 100644 --- a/coregrind/stage1.c +++ b/coregrind/stage1.c @@ -115,7 +115,8 @@ static void *fix_auxv(void *v_init_esp, const struct exeinfo *info, seen = 0; for(; auxv->a_type != AT_NULL; auxv++) { if (0) - printf("doing auxv %p %4x: %d %p\n", auxv, auxv->a_type, auxv->u.a_val, auxv->u.a_ptr); + printf("doing auxv %p %4lld: %lld %p\n", + auxv, (ULong)auxv->a_type, (ULong)auxv->u.a_val, auxv->u.a_ptr); switch(auxv->a_type) { case AT_PHDR: diff --git a/coregrind/ume.c b/coregrind/ume.c index 3ea44d0ffb..bc973a8bb2 100644 --- a/coregrind/ume.c +++ b/coregrind/ume.c @@ -100,7 +100,7 @@ void foreach_map(int (*fn)(char *start, char *end, int ino; void *segstart, *segend; - sscanf(bufptr, "%p-%p %s %Lx %x:%x %d", + sscanf(bufptr, "%p-%p %s %llx %x:%x %d", &segstart, &segend, perm, &offset, &maj, &min, &ino); bufptr = strchr(bufptr, '\n'); if (bufptr != NULL) diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index cc1404fc45..cbe991f4c9 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -880,7 +880,7 @@ static char *copy_str(char **tab, const char *str) *cp++ = '\0'; if (0) - printf("copied %p \"%s\" len %d\n", orig, orig, cp-orig); + printf("copied %p \"%s\" len %lld\n", orig, orig, (Long)(cp-orig)); *tab = cp; @@ -1128,7 +1128,7 @@ static Addr setup_client_stack(void* init_sp, default: /* stomp out anything we don't know about */ if (0) - printf("stomping auxv entry %d\n", auxv->a_type); + printf("stomping auxv entry %lld\n", (ULong)auxv->a_type); auxv->a_type = AT_IGNORE; break; @@ -1284,7 +1284,7 @@ static void load_tool( const char *toolname, void** handle_out, " The major version numbers must match.\n", VG_CORE_INTERFACE_MAJOR_VERSION, VG_CORE_INTERFACE_MINOR_VERSION, - sizeof(*toolinfo), + (Int)sizeof(*toolinfo), toolinfo->interface_major_version, toolinfo->interface_minor_version, toolinfo->sizeof_ToolInfo); diff --git a/coregrind/vg_proxylwp.c b/coregrind/vg_proxylwp.c index 3571c758e7..eded4e74d1 100644 --- a/coregrind/vg_proxylwp.c +++ b/coregrind/vg_proxylwp.c @@ -1019,9 +1019,9 @@ static void sys_wait_results(Bool block, ThreadId tid, enum RequestType reqtype, case PX_RunSyscall: if (VG_(clo_trace_syscalls)) - VG_(message)(Vg_DebugMsg, "sys_wait_results: got PX_RunSyscall for TID %d: syscall %d result %d", + VG_(message)(Vg_DebugMsg, "sys_wait_results: got PX_RunSyscall for TID %d: syscall %d result %lld", res.tid, tst->syscallno, - PLATFORM_SYSCALL_RET(tst->arch)); + (UWord)PLATFORM_SYSCALL_RET(tst->arch)); if (tst->status != VgTs_WaitSys) VG_(printf)("tid %d in status %d\n",