You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(32) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(6) |
|
2
(4) |
3
(9) |
4
(11) |
5
(16) |
6
(6) |
7
(1) |
8
(11) |
|
9
(11) |
10
(6) |
11
(10) |
12
(23) |
13
(23) |
14
(6) |
15
(10) |
|
16
(5) |
17
(13) |
18
(9) |
19
(4) |
20
(6) |
21
(16) |
22
(3) |
|
23
(5) |
24
(7) |
25
(6) |
26
(4) |
27
(8) |
28
|
29
(3) |
|
30
(2) |
31
(17) |
|
|
|
|
|
|
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] |
|
From: Florian K. <fl...@ei...> - 2015-08-08 21:25:09
|
On 08.08.2015 16:45, Дмитрий Дьяченко wrote: > Why do not build in-tree MPC/MPFR/GMP? > I.e., download and unpack tarballs into gcc-topdir. > > gcc themself will check prerequisites, build-script will be simpler... > May be you can use ./gcc/contrib/download_prerequisite script also. > I didn't know about it. Thanks for the pointer. I changed the script Florian |
|
From: <sv...@va...> - 2015-08-08 21:23:02
|
Author: florian
Date: Sat Aug 8 22:22:55 2015
New Revision: 15509
Log:
Simplify the build script a lot by using the download_prerequisites
script and build prerequisites in tree. Suggested by Dimitry <di...@gm...>
Also add --disable-bootstrap and some verbiage as to how to speed
up the GCC build even further.
Modified:
trunk/auxprogs/build-gcc
Modified: trunk/auxprogs/build-gcc
==============================================================================
--- trunk/auxprogs/build-gcc (original)
+++ trunk/auxprogs/build-gcc Sat Aug 8 22:22:55 2015
@@ -1,19 +1,26 @@
#!/bin/sh -e
-# Simple script to build GCC including its prerequisites.
-# "Simple" means: no error recovery, no signature verification,
-# no checking whether the prerequisites are new enough for the
-# chosen GCC version. You need to figure this out by yourself.
+# Simple script to build GCC natively including its prerequisites.
#
-# Define the following 6 variables:
+# Depending on your needs you maybe able to speed up the GCC build:
+#
+# (a) Do not build a c++ compiler
+# c++ is only needed for "make check" and running regression tests
+# --> choose LANGUEGES=c below
+# (b) Do not build a compiler that can produce 32-bit executables
+# on a 64-bit platform
+# --> choose MULTILIB=--disable-multilib below
+#
+# Define the following 5 variables:
BUILD_DIR=/tmp/build-gcc
INSTALL_DIR=/tmp/install
GCC_VERSION=5.1.0
-GMP_VERSION=5.1.3
-MPC_VERSION=1.0.3
-MPFR_VERSION=3.1.3
+LANGUAGES=c,c++
+MULTILIB=
+#LANGUAGES=c
+#MULTILIB=--disable-multilib
#-----------------------------------------------------------
# No changes should be needed below this line
@@ -25,58 +32,21 @@
cd $BUILD_DIR
# Download tarballs
-echo "...downloading tarballs"
+echo "...downloading tarball"
wget ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2
-wget ftp://ftp.gnu.org/gnu/gmp/gmp-$GMP_VERSION.tar.bz2
-wget ftp://ftp.gnu.org/gnu/mpfr/mpfr-$MPFR_VERSION.tar.bz2
-wget ftp://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.gz
-
-# Build GMP
-echo "...building GMP"
-cd $BUILD_DIR
-rm -rf gmp-$GMP_VERSION
-tar xf gmp-$GMP_VERSION.tar.bz2
-cd gmp-$GMP_VERSION
-./configure --prefix=$INSTALL_DIR 2>&1 > gmp-config.log
-make -s 2>&1 > gmp-make.log
-make -s install 2>&1 > gmp-install.log
-mv gmp-config.log gmp-make.log gmp-install.log ..
-
-# Build MPFR
-echo "...building MPFR"
-cd $BUILD_DIR
-rm -rf mpfr-$MPFR_VERSION
-tar xf mpfr-$MPFR_VERSION.tar.bz2
-cd mpfr-$MPFR_VERSION
-./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > mpfr-config.log
-make -s 2>&1 > mpfr-make.log
-make -s install 2>&1 > mpfr-install.log
-mv mpfr-config.log mpfr-make.log mpfr-install.log ..
-
-# Build MPC
-echo "...building MPC"
-cd $BUILD_DIR
-rm -rf mpc-$MPC_VERSION
-tar xf mpc-$MPC_VERSION.tar.gz
-cd mpc-$MPC_VERSION
-./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > mpc-config.log
-make -s 2>&1 > mpc-make.log
-make -s install 2>&1 > mpc-install.log
-mv mpc-config.log mpc-make.log mpc-install.log ..
# Build GCC
echo "...building GCC"
-cd $BUILD_DIR
rm -rf gcc-$GCC_VERSION
tar xf gcc-$GCC_VERSION.tar.bz2
+cd gcc-$GCC_VERSION
+./contrib/download_prerequisites
+cd ..
rm -rf objdir
mkdir objdir
cd objdir
-../gcc-$GCC_VERSION/configure --prefix=$INSTALL_DIR \
- --enable-languages=c,c++ \
- --with-mpfr=$INSTALL_DIR \
- --with-mpc=$INSTALL_DIR \
- --with-gmp=$INSTALL_DIR 2>&1 > gcc-config.log
+../gcc-$GCC_VERSION/configure --prefix=$INSTALL_DIR --disable-bootstrap \
+ $MULTILIB --enable-languages=$LANGUAGES 2>&1 > gcc-config.log
make -s 2>&1 > gcc-make.log
make -s install 2>&1 > gcc-install.log
mv gcc-config.log gcc-make.log gcc-install.log ..
|
|
From: <sv...@va...> - 2015-08-08 21:08:39
|
Author: florian
Date: Sat Aug 8 22:08:31 2015
New Revision: 15508
Log:
Fix two more format inconsistencies found on s390. The one
in m_stacktrace.c also existed for other architectures. Fixed
as well.
Modified:
trunk/coregrind/m_machine.c
trunk/coregrind/m_stacktrace.c
Modified: trunk/coregrind/m_machine.c
==============================================================================
--- trunk/coregrind/m_machine.c (original)
+++ trunk/coregrind/m_machine.c Sat Aug 8 22:08:31 2015
@@ -1411,7 +1411,7 @@
HChar *p = fac_str;
p += VG_(sprintf)(p, "machine %4d ", model);
for (i=0; i < sizeof fac_hwcaps / sizeof fac_hwcaps[0]; ++i) {
- p += VG_(sprintf)(p, " %s %1d", fac_hwcaps[i].name,
+ p += VG_(sprintf)(p, " %s %1u", fac_hwcaps[i].name,
fac_hwcaps[i].installed);
}
*p++ = '\0';
Modified: trunk/coregrind/m_stacktrace.c
==============================================================================
--- trunk/coregrind/m_stacktrace.c (original)
+++ trunk/coregrind/m_stacktrace.c Sat Aug 8 22:08:31 2015
@@ -730,7 +730,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx ip=0x%lx fp=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max, ip, fp);
@@ -995,7 +995,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("\nmax_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("\nmax_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx r15=0x%lx r13=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.r15, uregs.r13);
@@ -1139,7 +1139,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("\nmax_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("\nmax_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx PC=0x%lx SP=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.pc, uregs.sp);
@@ -1228,7 +1228,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx IA=0x%lx SP=0x%lx FP=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.ia, uregs.sp,uregs.fp);
@@ -1321,7 +1321,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx pc=0x%lx sp=0x%lx fp=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.pc, uregs.sp, uregs.fp);
@@ -1467,7 +1467,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx pc=0x%lx sp=0x%lx fp=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.pc, uregs.sp, uregs.fp);
|
|
From: Дмитрий Д. <di...@gm...> - 2015-08-08 14:45:09
|
Why do not build in-tree MPC/MPFR/GMP? I.e., download and unpack tarballs into gcc-topdir. gcc themself will check prerequisites, build-script will be simpler... May be you can use ./gcc/contrib/download_prerequisite script also. Dmitry 08.08.2015 17:07 пользователь <sv...@va...> написал: > Author: florian > Date: Sat Aug 8 15:07:07 2015 > New Revision: 15507 > > Log: > Initial checkin > > Added: > trunk/auxprogs/build-gcc (with props) > > Added: trunk/auxprogs/build-gcc > > ============================================================================== > --- trunk/auxprogs/build-gcc (added) > +++ trunk/auxprogs/build-gcc Sat Aug 8 15:07:07 2015 > @@ -0,0 +1,85 @@ > +#!/bin/sh -e > + > +# Simple script to build GCC including its prerequisites. > +# "Simple" means: no error recovery, no signature verification, > +# no checking whether the prerequisites are new enough for the > +# chosen GCC version. You need to figure this out by yourself. > +# > +# Define the following 6 variables: > + > +BUILD_DIR=/tmp/build-gcc > +INSTALL_DIR=/tmp/install > + > +GCC_VERSION=5.1.0 > +GMP_VERSION=5.1.3 > +MPC_VERSION=1.0.3 > +MPFR_VERSION=3.1.3 > + > +#----------------------------------------------------------- > +# No changes should be needed below this line > +#----------------------------------------------------------- > + > +# Create build directory > +echo "...creating build directory $BUILD_DIR" > +mkdir -p $BUILD_DIR > +cd $BUILD_DIR > + > +# Download tarballs > +echo "...downloading tarballs" > +wget ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2 > +wget ftp://ftp.gnu.org/gnu/gmp/gmp-$GMP_VERSION.tar.bz2 > +wget ftp://ftp.gnu.org/gnu/mpfr/mpfr-$MPFR_VERSION.tar.bz2 > +wget ftp://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.gz > + > +# Build GMP > +echo "...building GMP" > +cd $BUILD_DIR > +rm -rf gmp-$GMP_VERSION > +tar xf gmp-$GMP_VERSION.tar.bz2 > +cd gmp-$GMP_VERSION > +./configure --prefix=$INSTALL_DIR 2>&1 > gmp-config.log > +make -s 2>&1 > gmp-make.log > +make -s install 2>&1 > gmp-install.log > +mv gmp-config.log gmp-make.log gmp-install.log .. > + > +# Build MPFR > +echo "...building MPFR" > +cd $BUILD_DIR > +rm -rf mpfr-$MPFR_VERSION > +tar xf mpfr-$MPFR_VERSION.tar.bz2 > +cd mpfr-$MPFR_VERSION > +./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > > mpfr-config.log > +make -s 2>&1 > mpfr-make.log > +make -s install 2>&1 > mpfr-install.log > +mv mpfr-config.log mpfr-make.log mpfr-install.log .. > + > +# Build MPC > +echo "...building MPC" > +cd $BUILD_DIR > +rm -rf mpc-$MPC_VERSION > +tar xf mpc-$MPC_VERSION.tar.gz > +cd mpc-$MPC_VERSION > +./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > > mpc-config.log > +make -s 2>&1 > mpc-make.log > +make -s install 2>&1 > mpc-install.log > +mv mpc-config.log mpc-make.log mpc-install.log .. > + > +# Build GCC > +echo "...building GCC" > +cd $BUILD_DIR > +rm -rf gcc-$GCC_VERSION > +tar xf gcc-$GCC_VERSION.tar.bz2 > +rm -rf objdir > +mkdir objdir > +cd objdir > +../gcc-$GCC_VERSION/configure --prefix=$INSTALL_DIR \ > + --enable-languages=c,c++ \ > + --with-mpfr=$INSTALL_DIR \ > + --with-mpc=$INSTALL_DIR \ > + --with-gmp=$INSTALL_DIR 2>&1 > gcc-config.log > +make -s 2>&1 > gcc-make.log > +make -s install 2>&1 > gcc-install.log > +mv gcc-config.log gcc-make.log gcc-install.log .. > + > +# done > +echo "...done" > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
From: <sv...@va...> - 2015-08-08 14:07:15
|
Author: florian
Date: Sat Aug 8 15:07:07 2015
New Revision: 15507
Log:
Initial checkin
Added:
trunk/auxprogs/build-gcc (with props)
Added: trunk/auxprogs/build-gcc
==============================================================================
--- trunk/auxprogs/build-gcc (added)
+++ trunk/auxprogs/build-gcc Sat Aug 8 15:07:07 2015
@@ -0,0 +1,85 @@
+#!/bin/sh -e
+
+# Simple script to build GCC including its prerequisites.
+# "Simple" means: no error recovery, no signature verification,
+# no checking whether the prerequisites are new enough for the
+# chosen GCC version. You need to figure this out by yourself.
+#
+# Define the following 6 variables:
+
+BUILD_DIR=/tmp/build-gcc
+INSTALL_DIR=/tmp/install
+
+GCC_VERSION=5.1.0
+GMP_VERSION=5.1.3
+MPC_VERSION=1.0.3
+MPFR_VERSION=3.1.3
+
+#-----------------------------------------------------------
+# No changes should be needed below this line
+#-----------------------------------------------------------
+
+# Create build directory
+echo "...creating build directory $BUILD_DIR"
+mkdir -p $BUILD_DIR
+cd $BUILD_DIR
+
+# Download tarballs
+echo "...downloading tarballs"
+wget ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2
+wget ftp://ftp.gnu.org/gnu/gmp/gmp-$GMP_VERSION.tar.bz2
+wget ftp://ftp.gnu.org/gnu/mpfr/mpfr-$MPFR_VERSION.tar.bz2
+wget ftp://ftp.gnu.org/gnu/mpc/mpc-$MPC_VERSION.tar.gz
+
+# Build GMP
+echo "...building GMP"
+cd $BUILD_DIR
+rm -rf gmp-$GMP_VERSION
+tar xf gmp-$GMP_VERSION.tar.bz2
+cd gmp-$GMP_VERSION
+./configure --prefix=$INSTALL_DIR 2>&1 > gmp-config.log
+make -s 2>&1 > gmp-make.log
+make -s install 2>&1 > gmp-install.log
+mv gmp-config.log gmp-make.log gmp-install.log ..
+
+# Build MPFR
+echo "...building MPFR"
+cd $BUILD_DIR
+rm -rf mpfr-$MPFR_VERSION
+tar xf mpfr-$MPFR_VERSION.tar.bz2
+cd mpfr-$MPFR_VERSION
+./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > mpfr-config.log
+make -s 2>&1 > mpfr-make.log
+make -s install 2>&1 > mpfr-install.log
+mv mpfr-config.log mpfr-make.log mpfr-install.log ..
+
+# Build MPC
+echo "...building MPC"
+cd $BUILD_DIR
+rm -rf mpc-$MPC_VERSION
+tar xf mpc-$MPC_VERSION.tar.gz
+cd mpc-$MPC_VERSION
+./configure --prefix=$INSTALL_DIR --with-gmp=$INSTALL_DIR 2>&1 > mpc-config.log
+make -s 2>&1 > mpc-make.log
+make -s install 2>&1 > mpc-install.log
+mv mpc-config.log mpc-make.log mpc-install.log ..
+
+# Build GCC
+echo "...building GCC"
+cd $BUILD_DIR
+rm -rf gcc-$GCC_VERSION
+tar xf gcc-$GCC_VERSION.tar.bz2
+rm -rf objdir
+mkdir objdir
+cd objdir
+../gcc-$GCC_VERSION/configure --prefix=$INSTALL_DIR \
+ --enable-languages=c,c++ \
+ --with-mpfr=$INSTALL_DIR \
+ --with-mpc=$INSTALL_DIR \
+ --with-gmp=$INSTALL_DIR 2>&1 > gcc-config.log
+make -s 2>&1 > gcc-make.log
+make -s install 2>&1 > gcc-install.log
+mv gcc-config.log gcc-make.log gcc-install.log ..
+
+# done
+echo "...done"
|
|
From: <sv...@va...> - 2015-08-08 07:18:16
|
Author: sewardj
Date: Sat Aug 8 08:18:08 2015
New Revision: 3168
Log:
Removed unused code that has been lying around since the major refactoring
of this file a couple of years back.
Modified:
trunk/priv/guest_amd64_toIR.c
Modified: trunk/priv/guest_amd64_toIR.c
==============================================================================
--- trunk/priv/guest_amd64_toIR.c (original)
+++ trunk/priv/guest_amd64_toIR.c Sat Aug 8 08:18:08 2015
@@ -31685,193 +31685,7 @@
else
goto decode_success; /* \o/ */
-#if 0 /* XYZZY */
- /* ---------------------------------------------------- */
- /* --- The SSE/SSE2 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* What did I do to deserve SSE ? Perhaps I was really bad in a
- previous life? */
-
- /* Note, this doesn't handle SSE3 right now. All amd64s support
- SSE2 as a minimum so there is no point distinguishing SSE1 vs
- SSE2. */
-
- insn = &guest_code[delta];
-
- /* FXSAVE is spuriously at the start here only because it is
- thusly placed in guest-x86/toIR.c. */
-
- /* ------ SSE decoder main ------ */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSE decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- start of the SSE2 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSE/SSE2 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- start of the SSE3 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSE3 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- start of the SSSE3 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSSE3 decoder. --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- start of the SSE4 decoder --- */
- /* ---------------------------------------------------- */
-
- /* ---------------------------------------------------- */
- /* --- end of the SSE4 decoder --- */
- /* ---------------------------------------------------- */
-
- /*after_sse_decoders:*/
-
- /* Get the primary opcode. */
- opc = getUChar(delta); delta++;
-
- /* We get here if the current insn isn't SSE, or this CPU doesn't
- support SSE. */
-
- switch (opc) {
-
- /* ------------------------ Control flow --------------- */
-
- /* ------------------------ CWD/CDQ -------------------- */
-
- /* ------------------------ FPU ops -------------------- */
-
- /* ------------------------ INT ------------------------ */
-
- case 0xCD: { /* INT imm8 */
- IRJumpKind jk = Ijk_Boring;
- if (have66orF2orF3(pfx)) goto decode_failure;
- d64 = getUChar(delta); delta++;
- switch (d64) {
- case 32: jk = Ijk_Sys_int32; break;
- default: goto decode_failure;
- }
- guest_RIP_next_mustcheck = True;
- guest_RIP_next_assumed = guest_RIP_bbstart + delta;
- jmp_lit(jk, guest_RIP_next_assumed);
- /* It's important that all ArchRegs carry their up-to-date value
- at this point. So we declare an end-of-block here, which
- forces any TempRegs caching ArchRegs to be flushed. */
- vassert(dres.whatNext == Dis_StopHere);
- DIP("int $0x%02x\n", (UInt)d64);
- break;
- }
-
- /* ------------------------ Jcond, byte offset --------- */
-
- /* ------------------------ IMUL ----------------------- */
-
- /* ------------------------ MOV ------------------------ */
-
- /* ------------------------ MOVx ------------------------ */
-
- /* ------------------------ opl imm, A ----------------- */
-
- /* ------------------------ opl Ev, Gv ----------------- */
-
- /* ------------------------ opl Gv, Ev ----------------- */
-
- /* ------------------------ POP ------------------------ */
-
- /* ------------------------ PUSH ----------------------- */
-
- /* ------ AE: SCAS variants ------ */
-
- /* ------ A6, A7: CMPS variants ------ */
-
- /* ------ AA, AB: STOS variants ------ */
-
- /* ------ A4, A5: MOVS variants ------ */
-
- /* ------------------------ XCHG ----------------------- */
-
- /* ------------------------ IN / OUT ----------------------- */
-
- /* ------------------------ (Grp1 extensions) ---------- */
-
- /* ------------------------ (Grp2 extensions) ---------- */
-
- /* ------------------------ (Grp3 extensions) ---------- */
-
- /* ------------------------ (Grp4 extensions) ---------- */
-
- /* ------------------------ (Grp5 extensions) ---------- */
-
- /* ------------------------ Escapes to 2-byte opcodes -- */
-
- case 0x0F: {
- opc = getUChar(delta); delta++;
- switch (opc) {
-
- /* =-=-=-=-=-=-=-=-=- Grp8 =-=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- BSF/BSR -=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- BSWAP -=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- BT/BTS/BTR/BTC =-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- CMOV =-=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- CMPXCHG -=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- CPUID -=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- MOVZX, MOVSX =-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- MUL/IMUL =-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- NOPs =-=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- Jcond d32 -=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- PREFETCH =-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- RDTSC -=-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- SETcc Eb =-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- SHLD/SHRD -=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- SYSCALL -=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- XADD -=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- SGDT and SIDT =-=-=-=-=-=-=-=-=-=-= */
-
- /* =-=-=-=-=-=-=-=-=- unimp2 =-=-=-=-=-=-=-=-=-=-= */
-
- default:
- goto decode_failure;
- } /* switch (opc) for the 2-byte opcodes */
- goto decode_success;
- } /* case 0x0F: of primary opcode */
-
- /* ------------------------ ??? ------------------------ */
-#endif /* XYZZY */
-
- //default:
decode_failure:
/* All decode failures end up here. */
if (sigill_diag) {
@@ -31917,7 +31731,6 @@
*expect_CAS = False;
return dres;
- // } /* switch (opc) for the main (primary) opcode switch. */
decode_success:
/* All decode successes end up here. */
|
|
From: <sv...@va...> - 2015-08-08 00:21:34
|
Author: iraisr
Date: Sat Aug 8 01:21:26 2015
New Revision: 15506
Log:
Document another limitation of the Solaris port
regarding to AT_SUN_SYSSTAT_ADDR and AT_SUN_SYSSTAT_ZONE_ADDR.
n-i-bz
Modified:
trunk/README.solaris
Modified: trunk/README.solaris
==============================================================================
--- trunk/README.solaris (original)
+++ trunk/README.solaris Sat Aug 8 01:21:26 2015
@@ -79,6 +79,15 @@
possible for Valgrind to arrange mapping of a kernel shared page at the
address specified in the mapfile for the guest application. There is currently
no such mechanism in Solaris. Hacky workarounds are possible, though.
+- Guest programs do not contain entries for AT_SUN_SYSSTAT_ADDR and
+ AT_SUN_SYSSTAT_ZONE_ADDR in their auxilliary vectors. There is no direct way
+ how to obtain addresses of these pages shared with the kernel as they are
+ passed in auxv and kernel does not create auxv for statically linked binaries
+ (such as Valgrind analysis tools).
+ Indirect methods, such as scanning 1-page mappings found at Valgrind
+ startup surrounded by reservations, could be possible. But it is hard to tell
+ which page is which because their contents are filled only when a system
+ cyclic is started. See get_hrusec() for reference.
- When a thread has no stack then all system calls will result in Valgrind
crash, even though such system calls use just parameters passed in registers.
This should happen only in pathological situations when a thread is created
|
|
From: <sv...@va...> - 2015-08-07 13:25:32
|
Author: zliu
Date: Fri Aug 7 14:25:24 2015
New Revision: 15505
Log:
Disable gdb XML file for TileGX
There will be no support --vgdb-shadow-registers=yes
for TileGX platform.
Modified:
trunk/coregrind/m_gdbserver/valgrind-low-tilegx.c
Modified: trunk/coregrind/m_gdbserver/valgrind-low-tilegx.c
==============================================================================
--- trunk/coregrind/m_gdbserver/valgrind-low-tilegx.c (original)
+++ trunk/coregrind/m_gdbserver/valgrind-low-tilegx.c Fri Aug 7 14:25:24 2015
@@ -225,11 +225,13 @@
static
const char* target_xml ( Bool shadow_mode )
{
- if (shadow_mode) {
+ return NULL;
+#if 0
+ if (shadow_mode)
return "tilegx-linux-valgrind.xml";
- } else {
+ else
return "tilegx-linux.xml";
- }
+#endif
}
static CORE_ADDR** target_get_dtv (ThreadState *tst)
|
|
From: Philippe W. <phi...@sk...> - 2015-08-06 17:05:29
|
On Wed, 2015-08-05 at 22:30 -0400, Zhi-Gang Liu wrote:
> Philippe,
>
>
> I'm not sure how to create the right XML files for tilegx right now.
> For ARM64, its target_xml() just simply returns NULL.
>
> I'd like to do same here i.e. the patch below. Any thought?
Defining xml files allows GDB to display shadow registers.
The classical way to define xml files is to start from the xml
files part of gdb, in directory gdb/features.
However, I see that in GDB 7.9.1, there is no tilegx xml files.
So, the alternative is to start from an existing file set
(e.g. starting from mips64-linux.xml and mips64-linux-valgrind.xml)
and modify the file content (and the content of the included files).
Basically, you describe the registers as expected by GDB,
using the predefined types.
This file has then to be duplicated to define the equivalent
shadow 1 and shadow 2 sets.
So, in theory, no difficulty expected
(but maybe tilegx is special, as gdb has no xml files for it?).
Otherwise, the alternative is the patch below, which effectively
ensures no xml files are needed (but it means users cannot look
at shadow registers).
If no user complained for lack of --vgdb-shadow-registers=yes support
on tilegx, then the patch below will ensure a consistent distribution.
Thanks
Philippe
>
>
> ---ZhiGang
>
>
>
> Index: coregrind/m_gdbserver/valgrind-low-tilegx.c
> ===================================================================
> --- coregrind/m_gdbserver/valgrind-low-tilegx.c (revision 15500)
> +++ coregrind/m_gdbserver/valgrind-low-tilegx.c (working copy)
> @@ -225,11 +225,13 @@
> static
> const char* target_xml ( Bool shadow_mode )
> {
> - if (shadow_mode) {
> + return NULL;
> +#if 0
> + if (shadow_mode)
> return "tilegx-linux-valgrind.xml";
> - } else {
> + else
> return "tilegx-linux.xml";
> - }
> +#endif
> }
>
> static CORE_ADDR** target_get_dtv (ThreadState *tst)
>
>
> On Wed, Aug 5, 2015 at 12:49 PM, Philippe Waroquiers
> <phi...@sk...> wrote:
> On Mon, 2015-08-03 at 11:33 +0200, Florian Krohm wrote:
> > You ought to run "make regtest" when making changes that
> have the
> > potential to break stuff.
> > There are zillions of messages like this one:
> >
> > none/tests/tilegx/Makefile.am:1: error:
> > insn_test_ldnt4u_add_X1.stderr.exp is in EXTRA_DIST but
> doesn't exist
> > none/tests/tilegx/Makefile.am:1: error:
> insn_test_ldnt4u_add_X1.vgtest
> > is in EXTRA_DIST but doesn't exist
> > none/tests/tilegx/Makefile.am:1: error:
> insn_test_ldnt_add_X1.stdout.exp
> > is in EXTRA_DIST but doesn't exist
> Hello Zhigang,
>
> While we are speaking about missing files ...
>
>
> The tilegx xml files are referenced in
> coregrind/m_gdbserver/valgrind-low-tilegx.c
> but are not present in coregrind/m_gdbserver directory
> and are not mentionned in coregrind/Makefile.am
>
>
> So, could you also add the missing tilegx gdbserver xml files
> and add them to the Makefile.am 'GDBSERVER_XML_FILES =' ?
>
> Thanks
>
> Philippe
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
>
>
>
|
|
From: <sv...@va...> - 2015-08-06 16:42:20
|
Author: philippe
Date: Thu Aug 6 17:42:12 2015
New Revision: 15504
Log:
Ensure gdbserver_tests/mcbreak.vgtest works with gcc 4.9
At least on x86+gcc4.9, the test fails because step+finish
makes the program stop on the breakme call line (after the call)
instead of reaching line 120.
So; change the gdb commands so as to ensure we reach line 120
Modified:
trunk/gdbserver_tests/mcbreak.stdinB.gdb
trunk/gdbserver_tests/mcbreak.stdoutB.exp
Modified: trunk/gdbserver_tests/mcbreak.stdinB.gdb
==============================================================================
--- trunk/gdbserver_tests/mcbreak.stdinB.gdb (original)
+++ trunk/gdbserver_tests/mcbreak.stdinB.gdb Thu Aug 6 17:42:12 2015
@@ -51,9 +51,9 @@
print whoami("after next: inferior call pushed from mcbreak.stdinB.gdb")
continue
#
-# encountered second break
-step
-finish
+# encountered second break. Ensure we stop on line 120 : if (argc > 1)
+break 120
+continue
# delete all breaks
delete
continue
Modified: trunk/gdbserver_tests/mcbreak.stdoutB.exp
==============================================================================
--- trunk/gdbserver_tests/mcbreak.stdoutB.exp (original)
+++ trunk/gdbserver_tests/mcbreak.stdoutB.exp Thu Aug 6 17:42:12 2015
@@ -36,10 +36,9 @@
Continuing.
Breakpoint 2, main (argc=1, argv=0x........) at t.c:118
118 breakme(__LINE__); //break2
-breakme (line=118) at t.c:101
-101 if (line > 1000)
-Run till exit from #0 breakme (line=118) at t.c:101
-main (argc=1, argv=0x........) at t.c:120
+Breakpoint 3 at 0x........: file t.c, line 120.
+Continuing.
+Breakpoint 3, main (argc=1, argv=0x........) at t.c:120
120 if (argc > 1)
Delete all breakpoints? (y or n) [answered Y; input not from terminal]
Continuing.
|
|
From: <sv...@va...> - 2015-08-06 12:11:40
|
Author: florian
Date: Thu Aug 6 13:11:33 2015
New Revision: 15503
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/coregrind/m_gdbserver/m_gdbserver.c
trunk/coregrind/m_gdbserver/remote-utils.c
trunk/coregrind/m_gdbserver/server.c
trunk/coregrind/m_gdbserver/signals.c
trunk/coregrind/m_gdbserver/target.c
trunk/coregrind/m_gdbserver/utils.c
Modified: trunk/coregrind/m_gdbserver/m_gdbserver.c
==============================================================================
--- trunk/coregrind/m_gdbserver/m_gdbserver.c (original)
+++ trunk/coregrind/m_gdbserver/m_gdbserver.c Thu Aug 6 13:11:33 2015
@@ -425,7 +425,7 @@
vg_assert (kind == access_watchpoint
|| kind == read_watchpoint
|| kind == write_watchpoint);
- dlog(1, "tid %d VG_(is_watched) %s addr %p szB %d\n",
+ dlog(1, "tid %u VG_(is_watched) %s addr %p szB %d\n",
tid, VG_(ppPointKind) (kind), C2v(addr), szB);
for (i = 0; i < n_elems; i++) {
@@ -622,7 +622,7 @@
data from its parent */
static void gdbserver_cleanup_in_child_after_fork(ThreadId me)
{
- dlog(1, "thread %d gdbserver_cleanup_in_child_after_fork pid %d\n",
+ dlog(1, "thread %u gdbserver_cleanup_in_child_after_fork pid %d\n",
me, VG_(getpid) ());
/* finish connection inheritated from parent */
@@ -663,7 +663,7 @@
Addr saved_pc;
dlog(1,
- "entering call_gdbserver %s ... pid %d tid %d status %s "
+ "entering call_gdbserver %s ... pid %d tid %u status %s "
"sched_jmpbuf_valid %d\n",
ppCallReason (reason),
VG_(getpid) (), tid, VG_(name_of_ThreadStatus)(tst->status),
@@ -754,7 +754,7 @@
Otherwise we just return to continue executing the
current block. */
if (VG_(get_IP) (tid) != saved_pc) {
- dlog(1, "tid %d %s PC changed from %s to %s\n",
+ dlog(1, "tid %u %s PC changed from %s to %s\n",
tid, VG_(name_of_ThreadStatus) (tst->status),
sym(saved_pc, /* is_code */ True),
sym(VG_(get_IP) (tid), /* is_code */ True));
@@ -841,7 +841,7 @@
ptrace handling. */
vg_assert2(0,
"vgdb did not took control. Did you kill vgdb ?\n"
- "busy %d vgdb_interrupted_tid %d\n",
+ "busy %d vgdb_interrupted_tid %u\n",
busy, vgdb_interrupted_tid);
#else /* defined(VGO_solaris) */
/* On Solaris, this code is run within the context of an agent thread
@@ -912,12 +912,12 @@
From here onwards, function calls are ok: it is
safe to call valgrind core functions: all threads are blocked in
a system call or are yielding or ... */
- dlog(1, "invoke_gdbserver running_tid %d vgdb_interrupted_tid %d\n",
+ dlog(1, "invoke_gdbserver running_tid %u vgdb_interrupted_tid %u\n",
VG_(running_tid), vgdb_interrupted_tid);
call_gdbserver (vgdb_interrupted_tid, vgdb_reason);
vgdb_interrupted_tid = 0;
dlog(1,
- "exit invoke_gdbserver running_tid %d\n", VG_(running_tid));
+ "exit invoke_gdbserver running_tid %u\n", VG_(running_tid));
give_control_back_to_vgdb();
vg_assert2(0, "end of invoke_gdbserver reached");
@@ -948,7 +948,7 @@
ThreadId tid)
{
dlog(1, "VG core calling %s "
- "vki_nr %d %s gdb_nr %d %s tid %d\n",
+ "vki_nr %d %s gdb_nr %u %s tid %u\n",
who,
info->si_signo, VG_(signame)(info->si_signo),
target_signal_from_host (info->si_signo),
@@ -1014,7 +1014,7 @@
void VG_(gdbserver_exit) (ThreadId tid, VgSchedReturnCode tids_schedretcode)
{
- dlog(1, "VG core calling VG_(gdbserver_exit) tid %d will exit\n", tid);
+ dlog(1, "VG core calling VG_(gdbserver_exit) tid %u will exit\n", tid);
if (remote_connected()) {
/* Make sure vgdb knows we are about to die and why. */
switch(tids_schedretcode) {
@@ -1505,7 +1505,7 @@
VG_(umsg)
("nr of calls to gdbserver: %d\n"
"single stepping %d\n"
- "interrupts intr_tid %d gs_non_busy %d gs_busy %d tid_non_intr %d\n"
+ "interrupts intr_tid %u gs_non_busy %d gs_busy %d tid_non_intr %d\n"
"gdbserved addresses %d (-1 = not initialized)\n"
"watchpoints %d (-1 = not initialized)\n"
"vgdb-error %d\n"
Modified: trunk/coregrind/m_gdbserver/remote-utils.c
==============================================================================
--- trunk/coregrind/m_gdbserver/remote-utils.c (original)
+++ trunk/coregrind/m_gdbserver/remote-utils.c Thu Aug 6 13:11:33 2015
@@ -53,7 +53,7 @@
VG_(dmsg)("current sigmask value { ");
for (i = 1; i <= _VKI_NSIG; i++) {
if (VG_(sigismember)(&cursigset, i))
- VG_(dmsg)("%u ", i);
+ VG_(dmsg)("%d ", i);
}
VG_(dmsg)("}\n");
}
@@ -598,7 +598,7 @@
else if (a >= 'a' && a <= 'f')
return a - 'a' + 10;
else
- error ("Reply contains invalid hex digit 0x%x\n", a);
+ error ("Reply contains invalid hex digit 0x%x\n", (unsigned)a);
return 0;
}
@@ -878,7 +878,7 @@
cc = readchar (1);
if (cc > 0)
- dlog(3, "[received '%c' (0x%x)]\n", cc, cc);
+ dlog(3, "[received '%c' (0x%x)]\n", cc, (unsigned)cc);
if (cc <= 0) {
if (cc == 0)
@@ -1038,7 +1038,7 @@
break;
dlog (0, "Bad checksum, sentsum=0x%x, csum=0x%x, buf=%s\n",
- (c1 << 4) + c2, csum, buf);
+ (unsigned)(c1 << 4) + c2, (unsigned)csum, buf);
if (!ensure_write_remote_desc()) {
dlog(1, "getpkt(write nack) no write_remote_desc");
}
@@ -1164,7 +1164,7 @@
((struct inferior_list_entry *)current_inferior)->id;
gdb_id_from_wait = thread_to_gdb_id (current_inferior);
- dlog(1, "Writing resume reply for %ld\n", thread_from_wait);
+ dlog(1, "Writing resume reply for %lu\n", thread_from_wait);
/* This if (1) ought to be unnecessary. But remote_wait in GDB
will claim this event belongs to inferior_ptid if we do not
specify a thread, and there's no way for gdbserver to know
Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Thu Aug 6 13:11:33 2015
@@ -375,7 +375,7 @@
VG_(show_all_errors)(/* verbosity */ 2, /* xml */ False);
break;
case 1: // n_errs_found
- VG_(printf) ("n_errs_found %d n_errs_shown %d (vgdb-error %d) %s\n",
+ VG_(printf) ("n_errs_found %u n_errs_shown %u (vgdb-error %d) %s\n",
VG_(get_n_errs_found) (),
VG_(get_n_errs_shown) (),
VG_(dyn_vgdb_error),
@@ -763,12 +763,12 @@
len = (PBUFSIZ + POVERHSIZ) / 2;
char status[len];
if (tst->thread_name) {
- VG_(snprintf) (status, sizeof(status), "tid %d %s %s",
+ VG_(snprintf) (status, sizeof(status), "tid %u %s %s",
tst->tid,
VG_(name_of_ThreadStatus)(tst->status),
tst->thread_name);
} else {
- VG_(snprintf) (status, sizeof(status), "tid %d %s",
+ VG_(snprintf) (status, sizeof(status), "tid %u %s",
tst->tid,
VG_(name_of_ThreadStatus)(tst->status));
}
@@ -900,7 +900,7 @@
UWord *client_auxv = VG_(client_auxv);
unsigned int client_auxv_len = 0;
while (*client_auxv != 0) {
- dlog(4, "auxv %lld %llx\n",
+ dlog(4, "auxv %llu %llx\n",
(ULong)*client_auxv,
(ULong)*(client_auxv+1));
client_auxv++;
@@ -908,7 +908,7 @@
client_auxv_len += 2 * sizeof(UWord);
}
client_auxv_len += 2 * sizeof(UWord);
- dlog(4, "auxv len %d\n", client_auxv_len);
+ dlog(4, "auxv len %u\n", client_auxv_len);
if (ofs >= client_auxv_len)
n = -1;
@@ -1030,7 +1030,7 @@
/* Protocol features query. */
if (strncmp ("qSupported", arg_own_buf, 10) == 0
&& (arg_own_buf[10] == ':' || arg_own_buf[10] == '\0')) {
- VG_(sprintf) (arg_own_buf, "PacketSize=%x", PBUFSIZ - 1);
+ VG_(sprintf) (arg_own_buf, "PacketSize=%x", (UInt)PBUFSIZ - 1);
/* Note: max packet size including frame and checksum, but without
trailing null byte, which is not sent/received. */
@@ -1414,7 +1414,7 @@
VG_(umsg) ("\nChild exited with status %d\n", zignal);
if (status == 'X')
VG_(umsg) ("\nChild terminated with signal = 0x%x (%s)\n",
- target_signal_to_host (zignal),
+ (UInt)target_signal_to_host (zignal),
target_signal_to_name (zignal));
if (status == 'W' || status == 'X') {
VG_(umsg) ("Process exiting\n");
Modified: trunk/coregrind/m_gdbserver/signals.c
==============================================================================
--- trunk/coregrind/m_gdbserver/signals.c (original)
+++ trunk/coregrind/m_gdbserver/signals.c Thu Aug 6 13:11:33 2015
@@ -741,7 +741,7 @@
}
#endif
error ("Valgrind GDBSERVER bug: (do_target_signal_to_host):"
- " unrecognized target signal %d\n", oursig);
+ " unrecognized target signal %u\n", oursig);
*oursig_ok = 0;
return 0;
}
Modified: trunk/coregrind/m_gdbserver/target.c
==============================================================================
--- trunk/coregrind/m_gdbserver/target.c (original)
+++ trunk/coregrind/m_gdbserver/target.c Thu Aug 6 13:11:33 2015
@@ -44,7 +44,7 @@
char *image_ptid(unsigned long ptid)
{
static char result[50]; // large enough
- VG_(sprintf) (result, "id %ld", ptid);
+ VG_(sprintf) (result, "id %lu", ptid);
return result;
}
#define get_thread(inf) ((struct thread_info *)(inf))
@@ -74,7 +74,7 @@
/* call add_thread for all valgrind threads not known in gdb all_threads */
for (tid = 1; tid < VG_N_THREADS; tid++) {
-#define LOCAL_THREAD_TRACE " ti* %p vgtid %d status %s as gdb ptid %s lwpid %d\n", \
+#define LOCAL_THREAD_TRACE " ti* %p vgtid %u status %s as gdb ptid %s lwpid %d\n", \
ti, tid, VG_(name_of_ThreadStatus) (ts->status), \
image_ptid (ptid), ts->os_state.lwpid
@@ -293,7 +293,7 @@
if (*ourstatus == 'X') {
sig = target_signal_from_host(exit_code_to_report);
exit_code_to_report = 0;
- dlog(1, "exit valgrind_wait status X signal %d\n", sig);
+ dlog(1, "exit valgrind_wait status X signal %u\n", sig);
return sig;
}
}
@@ -320,7 +320,7 @@
stop_pc = (*the_low_target.get_pc) ();
dlog(1,
- "exit valgrind_wait status T ptid %s stop_pc %s signal %d\n",
+ "exit valgrind_wait status T ptid %s stop_pc %s signal %u\n",
image_ptid (wptid), sym (stop_pc), sig);
return sig;
}
@@ -351,7 +351,7 @@
if (mod && VG_(debugLog_getLevel)() > 1) {
char bufimage [2*size + 1];
heximage (bufimage, buf, size);
- dlog(3, "fetched register %d size %d name %s value %s tid %d status %s\n",
+ dlog(3, "fetched register %d size %d name %s value %s tid %u status %s\n",
regno, size, the_low_target.reg_defs[regno].name, bufimage,
tid, VG_(name_of_ThreadStatus) (tst->status));
}
@@ -419,7 +419,7 @@
heximage (bufimage, buf, size);
dlog(2,
"stored register %d size %d name %s value %s "
- "tid %d status %s\n",
+ "tid %u status %s\n",
regno, size, the_low_target.reg_defs[regno].name, bufimage,
tid, VG_(name_of_ThreadStatus) (tst->status));
}
@@ -681,7 +681,7 @@
// Check we can read at least 2 address at the beginning of dtv.
CHECK_DEREF(dtv, 2*sizeof(CORE_ADDR), "dtv 2 first entries");
- dlog (2, "tid %d dtv %p\n", tst->tid, (void*)dtv);
+ dlog (2, "tid %u dtv %p\n", tst->tid, (void*)dtv);
// Check we can read the modid
CHECK_DEREF(lm+lm_modid_offset, sizeof(unsigned long int), "link_map modid");
@@ -766,7 +766,7 @@
{
ThreadState *tst = (ThreadState *) inferior_target_data (current_inferior);
ThreadId tid = tst->tid;
- dlog(1, "set_desired_inferior use_general %d found %p tid %d lwpid %d\n",
+ dlog(1, "set_desired_inferior use_general %d found %p tid %u lwpid %d\n",
use_general, found, tid, tst->os_state.lwpid);
}
}
Modified: trunk/coregrind/m_gdbserver/utils.c
==============================================================================
--- trunk/coregrind/m_gdbserver/utils.c (original)
+++ trunk/coregrind/m_gdbserver/utils.c Thu Aug 6 13:11:33 2015
@@ -30,7 +30,7 @@
{
va_list args;
if (sr_isError (sr))
- VG_(umsg) ("error %ld %s\n", sr_Err(sr), VG_(strerror) (sr_Err(sr)));
+ VG_(umsg) ("error %lu %s\n", sr_Err(sr), VG_(strerror) (sr_Err(sr)));
else
VG_(umsg) ("sr_perror called with no error!!!\n");
va_start (args, string);
|
|
From: <sv...@va...> - 2015-08-06 09:34:27
|
Author: florian
Date: Thu Aug 6 10:34:20 2015
New Revision: 15502
Log:
As per discussion with Julian comment out some dead assignments.
Now matches what is done for arm64.
Modified:
trunk/coregrind/m_sigframe/sigframe-arm-linux.c
Modified: trunk/coregrind/m_sigframe/sigframe-arm-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-arm-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-arm-linux.c Thu Aug 6 10:34:20 2015
@@ -279,25 +279,25 @@
sigNo = priv->sigNo_private;
- //XXX: restore regs
-# define REST(reg,REG) tst->arch.vex.guest_##REG = mc->arm_##reg;
- REST(r0,R0);
- REST(r1,R1);
- REST(r2,R2);
- REST(r3,R3);
- REST(r4,R4);
- REST(r5,R5);
- REST(r6,R6);
- REST(r7,R7);
- REST(r8,R8);
- REST(r9,R9);
- REST(r10,R10);
- REST(fp,R11);
- REST(ip,R12);
- REST(sp,R13);
- REST(lr,R14);
- REST(pc,R15T);
-# undef REST
+//ZZ //XXX: restore regs
+//ZZ # define REST(reg,REG) tst->arch.vex.guest_##REG = mc->arm_##reg;
+//ZZ REST(r0,R0);
+//ZZ REST(r1,R1);
+//ZZ REST(r2,R2);
+//ZZ REST(r3,R3);
+//ZZ REST(r4,R4);
+//ZZ REST(r5,R5);
+//ZZ REST(r6,R6);
+//ZZ REST(r7,R7);
+//ZZ REST(r8,R8);
+//ZZ REST(r9,R9);
+//ZZ REST(r10,R10);
+//ZZ REST(fp,R11);
+//ZZ REST(ip,R12);
+//ZZ REST(sp,R13);
+//ZZ REST(lr,R14);
+//ZZ REST(pc,R15T);
+//ZZ # undef REST
/* Uh, the next line makes all the REST() above pointless. */
tst->arch.vex = priv->vex;
|
|
From: <sv...@va...> - 2015-08-06 09:00:57
|
Author: florian
Date: Thu Aug 6 10:00:48 2015
New Revision: 15501
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/coregrind/m_sigframe/sigframe-amd64-darwin.c
trunk/coregrind/m_sigframe/sigframe-amd64-linux.c
trunk/coregrind/m_sigframe/sigframe-arm-linux.c
trunk/coregrind/m_sigframe/sigframe-arm64-linux.c
trunk/coregrind/m_sigframe/sigframe-common.c
trunk/coregrind/m_sigframe/sigframe-mips32-linux.c
trunk/coregrind/m_sigframe/sigframe-mips64-linux.c
trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c
trunk/coregrind/m_sigframe/sigframe-s390x-linux.c
trunk/coregrind/m_sigframe/sigframe-solaris.c
trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c
trunk/coregrind/m_sigframe/sigframe-x86-darwin.c
trunk/coregrind/m_sigframe/sigframe-x86-linux.c
Modified: trunk/coregrind/m_sigframe/sigframe-amd64-darwin.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-amd64-darwin.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-amd64-darwin.c Thu Aug 6 10:00:48 2015
@@ -222,7 +222,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "sigframe_create (thread %d): "
+ "sigframe_create (thread %u): "
"next RIP=%#lx, next RSP=%#lx\n",
tid, (Addr)handler, (Addr)frame );
}
Modified: trunk/coregrind/m_sigframe/sigframe-amd64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-amd64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-amd64-linux.c Thu Aug 6 10:00:48 2015
@@ -494,7 +494,7 @@
if (0)
VG_(printf)("pushed signal frame; %%RSP now = %#lx, "
"next %%RIP = %#llx, status=%d\n",
- rsp, tst->arch.vex.guest_RIP, tst->status);
+ rsp, tst->arch.vex.guest_RIP, (Int)tst->status);
}
@@ -510,7 +510,7 @@
{
if (frame->magicPI != 0x31415927 ||
frame->magicE != 0x27182818) {
- VG_(message)(Vg_UserMsg, "Thread %d return signal frame "
+ VG_(message)(Vg_UserMsg, "Thread %u return signal frame "
"corrupted. Killing process.\n",
tst->tid);
VG_(set_default_handler)(VKI_SIGSEGV);
@@ -594,7 +594,7 @@
if (VG_(clo_trace_signals))
VG_(message)(
Vg_DebugMsg,
- "VG_(signal_return) (thread %d): isRT=%d valid magic; RIP=%#llx\n",
+ "VG_(signal_return) (thread %u): isRT=%d valid magic; RIP=%#llx\n",
tid, isRT, tst->arch.vex.guest_RIP);
/* tell the tools */
Modified: trunk/coregrind/m_sigframe/sigframe-arm-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-arm-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-arm-linux.c Thu Aug 6 10:00:48 2015
@@ -310,7 +310,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "vg_pop_signal_frame (thread %d): "
+ "vg_pop_signal_frame (thread %u): "
"isRT=%d valid magic; PC=%#x\n",
tid, has_siginfo, tst->arch.vex.guest_R15T);
Modified: trunk/coregrind/m_sigframe/sigframe-arm64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-arm64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-arm64-linux.c Thu Aug 6 10:00:48 2015
@@ -283,7 +283,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "vg_pop_signal_frame (thread %d): "
+ "vg_pop_signal_frame (thread %u): "
"isRT=%d valid magic; PC=%#llx\n",
tid, has_siginfo, tst->arch.vex.guest_PC);
Modified: trunk/coregrind/m_sigframe/sigframe-common.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-common.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-common.c Thu Aug 6 10:00:48 2015
@@ -83,7 +83,7 @@
if (stackseg == NULL || !stackseg->hasR || !stackseg->hasW) {
VG_(umsg)("Can't extend stack to %#lx during signal delivery for "
- "thread %d:\n", addr, tid);
+ "thread %u:\n", addr, tid);
if (stackseg == NULL)
VG_(umsg)(" no stack segment\n");
else
Modified: trunk/coregrind/m_sigframe/sigframe-mips32-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-mips32-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-mips32-linux.c Thu Aug 6 10:00:48 2015
@@ -339,7 +339,7 @@
VG_TRACK(die_mem_stack_signal, sp, frame_size);
if (VG_(clo_trace_signals))
VG_(message)( Vg_DebugMsg,
- "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#x\n",
+ "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#x\n",
tid, isRT, tst->arch.vex.guest_PC);
/* tell the tools */
VG_TRACK( post_deliver_signal, tid, sigNo );
Modified: trunk/coregrind/m_sigframe/sigframe-mips64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-mips64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-mips64-linux.c Thu Aug 6 10:00:48 2015
@@ -266,7 +266,7 @@
VG_TRACK(die_mem_stack_signal, sp, frame_size);
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#llx\n",
+ "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#llx\n",
tid, isRT, tst->arch.vex.guest_PC);
/* tell the tools */
VG_TRACK( post_deliver_signal, tid, sigNo );
Modified: trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-ppc32-linux.c Thu Aug 6 10:00:48 2015
@@ -752,7 +752,7 @@
if (0)
VG_(printf)("pushed signal frame; %%R1 now = %#lx, "
"next %%CIA = %#x, status=%d\n",
- sp, tst->arch.vex.guest_CIA, tst->status);
+ sp, tst->arch.vex.guest_CIA, (Int)tst->status);
}
@@ -901,7 +901,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "vg_pop_signal_frame (thread %d): "
+ "vg_pop_signal_frame (thread %u): "
"isRT=%d valid magic; EIP=%#x\n",
tid, has_siginfo, tst->arch.vex.guest_CIA);
@@ -928,7 +928,7 @@
//.. if (VG_(clo_trace_signals))
//.. VG_(message)(
//.. Vg_DebugMsg,
-//.. "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%p",
+//.. "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%p",
//.. tid, isRT, tst->arch.vex.guest_EIP);
//..
//.. /* tell the tools */
Modified: trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-ppc64-linux.c Thu Aug 6 10:00:48 2015
@@ -279,7 +279,7 @@
if (0)
VG_(printf)("pushed signal frame; %%R1 now = %#lx, "
"next %%CIA = %#llx, status=%d\n",
- sp, tst->arch.vex.guest_CIA, tst->status);
+ sp, tst->arch.vex.guest_CIA, (Int)tst->status);
}
@@ -345,7 +345,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "vg_pop_signal_frame (thread %d): isRT=%d "
+ "vg_pop_signal_frame (thread %u): isRT=%d "
"valid magic; EIP=%#llx\n",
tid, has_siginfo, tst->arch.vex.guest_CIA);
Modified: trunk/coregrind/m_sigframe/sigframe-s390x-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-s390x-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-s390x-linux.c Thu Aug 6 10:00:48 2015
@@ -449,7 +449,7 @@
{
if (frame->magicPI != 0x31415927 ||
frame->magicE != 0x27182818) {
- VG_(message)(Vg_UserMsg, "Thread %d return signal frame "
+ VG_(message)(Vg_UserMsg, "Thread %u return signal frame "
"corrupted. Killing process.\n",
tst->tid);
VG_(set_default_handler)(VKI_SIGSEGV);
@@ -495,7 +495,7 @@
Addr sp;
ThreadState* tst;
SizeT size;
- Int sigNo;
+ Int sigNo;
tst = VG_(get_ThreadState)(tid);
@@ -515,7 +515,7 @@
if (VG_(clo_trace_signals))
VG_(message)(
Vg_DebugMsg,
- "VG_(sigframe_destroy) (thread %d): isRT=%d valid magic; IP=%#llx\n",
+ "VG_(sigframe_destroy) (thread %u): isRT=%d valid magic; IP=%#llx\n",
tid, isRT, tst->arch.vex.guest_IA);
/* tell the tools */
Modified: trunk/coregrind/m_sigframe/sigframe-solaris.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-solaris.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-solaris.c Thu Aug 6 10:00:48 2015
@@ -221,7 +221,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "sigframe_create (thread %d): next IP=%#lx, "
+ "sigframe_create (thread %u): next IP=%#lx, "
"next SP=%#lx\n",
tid, (Addr)handler, (Addr)frame);
}
@@ -256,7 +256,7 @@
/* Returning from a signal handler. */
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "sigframe_return (thread %d): IP=%#lx\n",
+ "sigframe_return (thread %u): IP=%#lx\n",
tid, VG_(get_IP)(tid));
/* Tell the tool. */
Modified: trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-tilegx-linux.c Thu Aug 6 10:00:48 2015
@@ -239,7 +239,7 @@
if (0)
VG_(printf)("pushed signal frame; sp now = %lx, "
"next %pc = %lx, status=%d\n",
- (Addr)frame, tst->arch.vex.guest_pc, tst->status);
+ (Addr)frame, tst->arch.vex.guest_pc, (Int)tst->status);
}
/* EXPORTED */
@@ -264,7 +264,7 @@
if (0)
VG_(printf)("destroy signal frame; sp = %lx, "
" %pc = %lx, status=%d\n",
- (Addr)frame, tst->arch.vex.guest_pc, tst->status);
+ (Addr)frame, tst->arch.vex.guest_pc, (Int)tst->status);
frame_size = sizeof(*frame);
mc = &ucp->uc_mcontext;
@@ -339,7 +339,7 @@
VG_TRACK(die_mem_stack_signal, sp, frame_size);
if (VG_(clo_trace_signals))
VG_(message)( Vg_DebugMsg,
- "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#x\n",
+ "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#x\n",
tid, isRT, tst->arch.vex.guest_pc);
/* tell the tools */
VG_TRACK( post_deliver_signal, tid, sigNo );
Modified: trunk/coregrind/m_sigframe/sigframe-x86-darwin.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-x86-darwin.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-x86-darwin.c Thu Aug 6 10:00:48 2015
@@ -209,7 +209,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "sigframe_create (thread %d): "
+ "sigframe_create (thread %u): "
"next EIP=%#lx, next ESP=%#lx\n",
tid, (Addr)handler, (Addr)frame );
}
@@ -252,7 +252,7 @@
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,
- "sigframe_destroy (thread %d): "
+ "sigframe_destroy (thread %u): "
"valid magic; next EIP=%#x\n",
tid, tst->arch.vex.guest_EIP);
Modified: trunk/coregrind/m_sigframe/sigframe-x86-linux.c
==============================================================================
--- trunk/coregrind/m_sigframe/sigframe-x86-linux.c (original)
+++ trunk/coregrind/m_sigframe/sigframe-x86-linux.c Thu Aug 6 10:00:48 2015
@@ -567,7 +567,7 @@
if (0)
VG_(printf)("pushed signal frame; %%ESP now = %#lx, "
"next %%EIP = %#x, status=%d\n",
- esp, tst->arch.vex.guest_EIP, tst->status);
+ esp, tst->arch.vex.guest_EIP, (Int)tst->status);
}
@@ -583,7 +583,7 @@
{
if (frame->magicPI != 0x31415927 ||
frame->magicE != 0x27182818) {
- VG_(message)(Vg_UserMsg, "Thread %d return signal frame "
+ VG_(message)(Vg_UserMsg, "Thread %u return signal frame "
"corrupted. Killing process.\n",
tst->tid);
VG_(set_default_handler)(VKI_SIGSEGV);
@@ -673,7 +673,7 @@
if (VG_(clo_trace_signals))
VG_(message)(
Vg_DebugMsg,
- "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#x\n",
+ "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#x\n",
tid, isRT, tst->arch.vex.guest_EIP);
/* tell the tools */
|
|
From: Zhi-Gang L. <zh...@gm...> - 2015-08-06 02:30:54
|
Philippe,
I'm not sure how to create the right XML files for tilegx right now. For
ARM64, its target_xml() just simply returns NULL.
I'd like to do same here i.e. the patch below. Any thought?
---ZhiGang
Index: coregrind/m_gdbserver/valgrind-low-tilegx.c
===================================================================
--- coregrind/m_gdbserver/valgrind-low-tilegx.c (revision 15500)
+++ coregrind/m_gdbserver/valgrind-low-tilegx.c (working copy)
@@ -225,11 +225,13 @@
static
const char* target_xml ( Bool shadow_mode )
{
- if (shadow_mode) {
+ return NULL;
+#if 0
+ if (shadow_mode)
return "tilegx-linux-valgrind.xml";
- } else {
+ else
return "tilegx-linux.xml";
- }
+#endif
}
static CORE_ADDR** target_get_dtv (ThreadState *tst)
On Wed, Aug 5, 2015 at 12:49 PM, Philippe Waroquiers <
phi...@sk...> wrote:
> On Mon, 2015-08-03 at 11:33 +0200, Florian Krohm wrote:
> > You ought to run "make regtest" when making changes that have the
> > potential to break stuff.
> > There are zillions of messages like this one:
> >
> > none/tests/tilegx/Makefile.am:1: error:
> > insn_test_ldnt4u_add_X1.stderr.exp is in EXTRA_DIST but doesn't exist
> > none/tests/tilegx/Makefile.am:1: error: insn_test_ldnt4u_add_X1.vgtest
> > is in EXTRA_DIST but doesn't exist
> > none/tests/tilegx/Makefile.am:1: error: insn_test_ldnt_add_X1.stdout.exp
> > is in EXTRA_DIST but doesn't exist
> Hello Zhigang,
>
> While we are speaking about missing files ...
>
>
> The tilegx xml files are referenced in
> coregrind/m_gdbserver/valgrind-low-tilegx.c
> but are not present in coregrind/m_gdbserver directory
> and are not mentionned in coregrind/Makefile.am
>
>
> So, could you also add the missing tilegx gdbserver xml files
> and add them to the Makefile.am 'GDBSERVER_XML_FILES =' ?
>
> Thanks
>
> Philippe
>
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
>
|
|
From: <sv...@va...> - 2015-08-05 22:27:34
|
Author: florian
Date: Wed Aug 5 23:27:24 2015
New Revision: 15500
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/coregrind/m_debuginfo/d3basics.c
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/coregrind/m_debuginfo/image.c
trunk/coregrind/m_debuginfo/readdwarf.c
trunk/coregrind/m_debuginfo/readdwarf3.c
trunk/coregrind/m_debuginfo/readelf.c
trunk/coregrind/m_debuginfo/readexidx.c
trunk/coregrind/m_debuginfo/readpdb.c
trunk/coregrind/m_debuginfo/storage.c
trunk/coregrind/m_debuginfo/tytypes.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_scheduler/ticket-lock-linux.c
Modified: trunk/coregrind/m_debuginfo/d3basics.c
==============================================================================
--- trunk/coregrind/m_debuginfo/d3basics.c (original)
+++ trunk/coregrind/m_debuginfo/d3basics.c Wed Aug 5 23:27:24 2015
@@ -974,8 +974,8 @@
aMax = ML_(read_Addr)(p); p += sizeof(Addr);
nbytes = ML_(read_UShort)(p); p += sizeof(UShort);
nGuards++;
- if (0) VG_(printf)(" guard %d: %#lx %#lx\n",
- (Int)nGuards, aMin,aMax);
+ if (0) VG_(printf)(" guard %lu: %#lx %#lx\n",
+ nGuards, aMin,aMax);
if (regs == NULL) {
vg_assert(aMin == (Addr)0);
vg_assert(aMax == ~(Addr)0);
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
==============================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c (original)
+++ trunk/coregrind/m_debuginfo/debuginfo.c Wed Aug 5 23:27:24 2015
@@ -621,9 +621,9 @@
n = VG_(sizeXA)(maps);
for (i = 0; i < n; i++) {
const DebugInfoMapping* map = VG_(indexXA)(maps, i);
- TRACE_SYMTAB(" [%ld] avma 0x%-16llx size %-8lu "
- "foff %-8lld %s %s %s\n",
- i, (ULong)map->avma, map->size, (Long)map->foff,
+ TRACE_SYMTAB(" [%ld] avma 0x%-16lx size %-8lu "
+ "foff %-8ld %s %s %s\n",
+ i, map->avma, map->size, map->foff,
map->rx ? "rx" : "--",
map->rw ? "rw" : "--",
map->ro ? "ro" : "--");
@@ -1222,7 +1222,7 @@
VG_(message)(Vg_UserMsg,
"LOAD_PDB_DEBUGINFO: clreq: fd=%d, avma=%#lx, total_size=%lu, "
"bias=%#lx\n",
- fd_obj, avma_obj, total_size, bias_obj
+ fd_obj, avma_obj, total_size, (UWord)bias_obj
);
}
@@ -2302,7 +2302,7 @@
/* Print in XML format, dumping in as much info as we know.
Ensure all tags are balanced. */
APPEND("<frame>");
- VG_(sprintf)(ibuf,"<ip>0x%llX</ip>", (ULong)eip);
+ VG_(sprintf)(ibuf,"<ip>0x%lX</ip>", eip);
APPEND(maybe_newline);
APPEND(ibuf);
if (know_objname) {
@@ -2330,7 +2330,7 @@
APPEND("</file>");
APPEND(maybe_newline);
APPEND("<line>");
- VG_(sprintf)(ibuf,"%d",lineno);
+ VG_(sprintf)(ibuf,"%u",lineno);
APPEND(ibuf);
APPEND("</line>");
}
@@ -2350,7 +2350,7 @@
// 0x80483BF: ??? (a.c:20)
// 0x80483BF: ???
//
- VG_(sprintf)(ibuf,"0x%llX: ", (ULong)eip);
+ VG_(sprintf)(ibuf,"0x%lX: ", eip);
APPEND(ibuf);
if (know_fnname) {
APPEND(buf_fn);
@@ -2388,7 +2388,7 @@
}
APPEND(buf_srcloc);
APPEND(":");
- VG_(sprintf)(ibuf,"%d",lineno);
+ VG_(sprintf)(ibuf,"%u",lineno);
APPEND(ibuf);
APPEND(")");
} else if (know_objname) {
@@ -3042,10 +3042,10 @@
Word j;
if (0) {
/* debug printing only */
- VG_(printf)("look for %#lx size %ld i %ld\n",
+ VG_(printf)("look for %#lx size %lu i %ld\n",
*ipP, di->fpo_size, i);
for (j = 0; j < di->fpo_size; j++)
- VG_(printf)("[%02ld] %#x %d\n",
+ VG_(printf)("[%02ld] %#x %u\n",
j, di->fpo[j].ulOffStart, di->fpo[j].cbProcSize);
}
vg_assert(i >= 0 && i < di->fpo_size);
@@ -3296,19 +3296,19 @@
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside local var \"%pS\",",
+ "Location 0x%lx is %ld byte%s inside local var \"%pS\",",
data_addr, var_offset, vo_plural, var->name );
TAGR( dn1 );
TAGL( dn2 );
p2XA( dn2,
- "in frame #%d of thread %d", frameNo, (Int)tid );
+ "in frame #%d of thread %u", frameNo, tid );
TAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside local var \"%s\",",
+ "Location 0x%lx is %ld byte%s inside local var \"%s\",",
data_addr, var_offset, vo_plural, var->name );
p2XA( dn2,
- "in frame #%d of thread %d", frameNo, (Int)tid );
+ "in frame #%d of thread %u", frameNo, tid );
}
}
else
@@ -3320,14 +3320,14 @@
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside local var \"%pS\"",
+ "Location 0x%lx is %ld byte%s inside local var \"%pS\"",
data_addr, var_offset, vo_plural, var->name );
TAGR( dn1 );
XAGL( dn2 );
TXTL( dn2 );
p2XA( dn2,
- "declared at %pS:%d, in frame #%d of thread %d",
- fileName, var->lineNo, frameNo, (Int)tid );
+ "declared at %pS:%d, in frame #%d of thread %u",
+ fileName, var->lineNo, frameNo, tid );
TXTR( dn2 );
// FIXME: also do <dir>
p2XA( dn2,
@@ -3336,11 +3336,11 @@
XAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside local var \"%s\"",
+ "Location 0x%lx is %ld byte%s inside local var \"%s\"",
data_addr, var_offset, vo_plural, var->name );
p2XA( dn2,
- "declared at %s:%d, in frame #%d of thread %d",
- fileName, var->lineNo, frameNo, (Int)tid );
+ "declared at %s:%d, in frame #%d of thread %u",
+ fileName, var->lineNo, frameNo, tid );
}
}
else
@@ -3352,21 +3352,21 @@
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %pS%pS",
+ "Location 0x%lx is %ld byte%s inside %pS%pS",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
TAGR( dn1 );
TAGL( dn2 );
p2XA( dn2,
- "in frame #%d of thread %d", frameNo, (Int)tid );
+ "in frame #%d of thread %u", frameNo, tid );
TAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %s%s",
+ "Location 0x%lx is %ld byte%s inside %s%s",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
p2XA( dn2,
- "in frame #%d of thread %d", frameNo, (Int)tid );
+ "in frame #%d of thread %u", frameNo, tid );
}
}
else
@@ -3376,15 +3376,15 @@
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %pS%pS,",
+ "Location 0x%lx is %ld byte%s inside %pS%pS,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
TAGR( dn1 );
XAGL( dn2 );
TXTL( dn2 );
p2XA( dn2,
- "declared at %pS:%d, in frame #%d of thread %d",
- fileName, var->lineNo, frameNo, (Int)tid );
+ "declared at %pS:%d, in frame #%d of thread %u",
+ fileName, var->lineNo, frameNo, tid );
TXTR( dn2 );
// FIXME: also do <dir>
p2XA( dn2,
@@ -3393,12 +3393,12 @@
XAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %s%s,",
+ "Location 0x%lx is %ld byte%s inside %s%s,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
p2XA( dn2,
- "declared at %s:%d, in frame #%d of thread %d",
- fileName, var->lineNo, frameNo, (Int)tid );
+ "declared at %s:%d, in frame #%d of thread %u",
+ fileName, var->lineNo, frameNo, tid );
}
}
else
@@ -3410,12 +3410,12 @@
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside global var \"%pS\"",
+ "Location 0x%lx is %ld byte%s inside global var \"%pS\"",
data_addr, var_offset, vo_plural, var->name );
TAGR( dn1 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside global var \"%s\"",
+ "Location 0x%lx is %ld byte%s inside global var \"%s\"",
data_addr, var_offset, vo_plural, var->name );
}
}
@@ -3428,7 +3428,7 @@
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside global var \"%pS\"",
+ "Location 0x%lx is %ld byte%s inside global var \"%pS\"",
data_addr, var_offset, vo_plural, var->name );
TAGR( dn1 );
XAGL( dn2 );
@@ -3444,7 +3444,7 @@
XAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside global var \"%s\"",
+ "Location 0x%lx is %ld byte%s inside global var \"%s\"",
data_addr, var_offset, vo_plural, var->name );
p2XA( dn2,
"declared at %s:%d",
@@ -3460,7 +3460,7 @@
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %pS%pS,",
+ "Location 0x%lx is %ld byte%s inside %pS%pS,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
TAGR( dn1 );
@@ -3470,9 +3470,9 @@
TAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %s%s,",
+ "Location 0x%lx is %ld byte%s inside %s%s,",
data_addr, residual_offset, ro_plural, var->name,
- (char*)(VG_(indexXA)(described,0)) );
+ (HChar*)(VG_(indexXA)(described,0)) );
p2XA( dn2,
"a global variable");
}
@@ -3484,7 +3484,7 @@
if (xml) {
TAGL( dn1 );
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %pS%pS,",
+ "Location 0x%lx is %ld byte%s inside %pS%pS,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
TAGR( dn1 );
@@ -3501,7 +3501,7 @@
XAGR( dn2 );
} else {
p2XA( dn1,
- "Location 0x%lx is %lu byte%s inside %s%s,",
+ "Location 0x%lx is %ld byte%s inside %s%s,",
data_addr, residual_offset, ro_plural, var->name,
(HChar*)(VG_(indexXA)(described,0)) );
p2XA( dn2,
@@ -3935,8 +3935,8 @@
res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
vg_assert(res.kind == GXR_Addr);
if (debug)
- VG_(printf)(" %5ld .. %5ld (sp) %s\n",
- res.word, res.word + ((UWord)mul.ul) - 1, var->name);
+ VG_(printf)(" %5lu .. %5llu (sp) %s\n",
+ res.word, res.word + mul.ul - 1, var->name);
block.base = res.word;
block.szB = (SizeT)mul.ul;
block.spRel = True;
@@ -3954,8 +3954,8 @@
res = ML_(evaluate_GX)( var->gexpr, var->fbGX, ®s, di );
vg_assert(res.kind == GXR_Addr);
if (debug)
- VG_(printf)(" %5ld .. %5ld (FP) %s\n",
- res.word, res.word + ((UWord)mul.ul) - 1, var->name);
+ VG_(printf)(" %5lu .. %5llu (FP) %s\n",
+ res.word, res.word + mul.ul - 1, var->name);
block.base = res.word;
block.szB = (SizeT)mul.ul;
block.spRel = False;
@@ -4357,8 +4357,8 @@
if (0)
VG_(printf)(
- "addr=%#lx di=%p %s got=%#lx,%ld plt=%#lx,%ld "
- "data=%#lx,%ld bss=%#lx,%ld\n",
+ "addr=%#lx di=%p %s got=%#lx,%lu plt=%#lx,%lu "
+ "data=%#lx,%lu bss=%#lx,%lu\n",
a, di, di->fsm.filename,
di->got_avma, di->got_size,
di->plt_avma, di->plt_size,
Modified: trunk/coregrind/m_debuginfo/image.c
==============================================================================
--- trunk/coregrind/m_debuginfo/image.c (original)
+++ trunk/coregrind/m_debuginfo/image.c Wed Aug 5 23:27:24 2015
@@ -474,7 +474,7 @@
UInt delay = now - t_last;
t_last = now;
nread += len;
- VG_(printf)("XXXXXXXX (tot %'lld) read %'ld offset %'lld delay %'u\n",
+ VG_(printf)("XXXXXXXX (tot %'llu) read %'lu offset %'llu delay %'u\n",
nread, len, off, delay);
}
@@ -804,10 +804,10 @@
{
VG_(umsg)("Valgrind: debuginfo reader: ensure_valid failed:\n");
VG_(umsg)("Valgrind: during call to %s\n", caller);
- VG_(umsg)("Valgrind: request for range [%llu, +%llu) exceeds\n",
- (ULong)offset, (ULong)size);
- VG_(umsg)("Valgrind: valid image size of %llu for image:\n",
- (ULong)img->size);
+ VG_(umsg)("Valgrind: request for range [%llu, +%lu) exceeds\n",
+ offset, size);
+ VG_(umsg)("Valgrind: valid image size of %lu for image:\n",
+ img->size);
VG_(umsg)("Valgrind: \"%s\"\n", img->source.name);
give_up__image_overrun();
}
Modified: trunk/coregrind/m_debuginfo/readdwarf.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readdwarf.c (original)
+++ trunk/coregrind/m_debuginfo/readdwarf.c Wed Aug 5 23:27:24 2015
@@ -269,7 +269,8 @@
switch (op_code) {
case DW_LNE_end_sequence:
if (0) VG_(printf)("1001: si->o %#lx, smr.a %#lx\n",
- di->text_debug_bias, state_machine_regs.address );
+ (UWord)di->text_debug_bias,
+ state_machine_regs.address );
/* JRS: added for compliance with spec; is pointless due to
reset_state_machine below */
state_machine_regs.end_sequence = 1;
@@ -618,10 +619,11 @@
Int advAddr = adv;
state_machine_regs.address += adv;
- if (0) VG_(printf)("smr.a += %#lx\n", adv );
+ if (0) VG_(printf)("smr.a += %#lx\n", (UWord)adv );
adv = (op_code % info.li_line_range) + info.li_line_base;
if (0) VG_(printf)("1002: di->o %#lx, smr.a %#lx\n",
- di->text_debug_bias, state_machine_regs.address );
+ (UWord)di->text_debug_bias,
+ state_machine_regs.address );
state_machine_regs.line += adv;
if (di->ddump_line)
@@ -660,7 +662,8 @@
case DW_LNS_copy:
if (0) VG_(printf)("1002: di->o %#lx, smr.a %#lx\n",
- di->text_debug_bias, state_machine_regs.address );
+ (UWord)di->text_debug_bias,
+ state_machine_regs.address );
if (state_machine_regs.is_stmt) {
/* only add a statement if there was a previous boundary */
if (state_machine_regs.last_address) {
@@ -684,11 +687,11 @@
break;
case DW_LNS_advance_pc: {
- Word adv = info.li_min_insn_length * step_leb128U(&data);
+ UWord adv = info.li_min_insn_length * step_leb128U(&data);
state_machine_regs.address += adv;
if (0) VG_(printf)("smr.a += %#lx\n", adv );
if (di->ddump_line)
- VG_(printf)(" Advance PC by %ld to 0x%lx\n",
+ VG_(printf)(" Advance PC by %lu to 0x%lx\n",
adv, state_machine_regs.address);
break;
}
@@ -733,7 +736,7 @@
Word adv = (((255 - info.li_opcode_base) / info.li_line_range)
* info.li_min_insn_length);
state_machine_regs.address += adv;
- if (0) VG_(printf)("smr.a += %#lx\n", adv );
+ if (0) VG_(printf)("smr.a += %#lx\n", (UWord)adv );
if (di->ddump_line)
VG_(printf)(" Advance PC by constant %ld to 0x%lx\n",
adv, (Addr)state_machine_regs.address);
@@ -741,7 +744,7 @@
}
case DW_LNS_fixed_advance_pc: {
/* XXX: Need something to get 2 bytes */
- Word adv = ML_(cur_step_UShort)(&data);
+ UWord adv = ML_(cur_step_UShort)(&data);
state_machine_regs.address += adv;
if (0) VG_(printf)("smr.a += %#lx\n", adv );
if (di->ddump_line)
@@ -1131,7 +1134,7 @@
if (0) {
HChar* str_name = ML_(cur_read_strdup)(ui.name, "di.rdd3.3");
- VG_(printf)("debug_line_sz %lld, ui.stmt_list %lld %s\n",
+ VG_(printf)("debug_line_sz %llu, ui.stmt_list %llu %s\n",
escn_debug_line.szB, ui.stmt_list, str_name );
ML_(dinfo_free)(str_name);
}
@@ -3446,30 +3449,30 @@
case DW_CFA_advance_loc1:
delta = (UInt)ML_(cur_step_UChar)(&instr);
- VG_(printf)(" sci:DW_CFA_advance_loc1(%d)\n", delta);
+ VG_(printf)(" sci:DW_CFA_advance_loc1(%u)\n", delta);
break;
case DW_CFA_advance_loc2:
delta = (UInt)ML_(cur_step_UShort)(&instr);
- VG_(printf)(" sci:DW_CFA_advance_loc2(%d)\n", delta);
+ VG_(printf)(" sci:DW_CFA_advance_loc2(%u)\n", delta);
break;
case DW_CFA_advance_loc4:
delta = (UInt)ML_(cur_step_UInt)(&instr);
- VG_(printf)(" DW_CFA_advance_loc4(%d)\n", delta);
+ VG_(printf)(" DW_CFA_advance_loc4(%u)\n", delta);
break;
case DW_CFA_def_cfa:
reg = step_leb128( &instr, 0 );
off = step_leb128( &instr, 0 );
- VG_(printf)(" DW_CFA_def_cfa: r%d ofs %d\n", (Int)reg, (Int)off);
+ VG_(printf)(" DW_CFA_def_cfa: r%d ofs %d\n", reg, off);
break;
case DW_CFA_def_cfa_sf:
reg = step_leb128( &instr, 0 );
off = step_leb128( &instr, 1 );
VG_(printf)(" DW_CFA_def_cfa_sf: r%d ofs %d\n",
- (Int)reg, (Int)(off * data_a_f));
+ reg, off * data_a_f);
break;
case DW_CFA_register:
@@ -3740,7 +3743,7 @@
if (di->trace_cfi) {
VG_(printf)("\n-----------------------------------------------\n");
- VG_(printf)("CFI info: szB %lld, _avma %#lx\n",
+ VG_(printf)("CFI info: szB %llu, _avma %#lx\n",
escn_frame.szB, frame_avma );
VG_(printf)("CFI info: name %s\n", di->fsm.filename );
}
@@ -3788,11 +3791,11 @@
ciefde_start = data;
if (di->trace_cfi)
VG_(printf)("\ncie/fde.start = (frame_image + 0x%llx)\n",
- ML_(cur_minus)(ciefde_start, frame_image));
+ (ULong)ML_(cur_minus)(ciefde_start, frame_image));
ciefde_len = (ULong)ML_(cur_step_UInt)(&data);
if (di->trace_cfi)
- VG_(printf)("cie/fde.length = %lld\n", ciefde_len);
+ VG_(printf)("cie/fde.length = %llu\n", ciefde_len);
/* Apparently, if the .length field is zero, we are at the end
of the sequence. This is stated in the Generic Elf
@@ -3801,7 +3804,7 @@
if (ciefde_len == 0) {
if (di->ddump_frames)
VG_(printf)("%08llx ZERO terminator\n\n",
- ML_(cur_minus)(ciefde_start, frame_image));
+ (ULong)ML_(cur_minus)(ciefde_start, frame_image));
return;
}
@@ -3825,7 +3828,7 @@
}
if (di->trace_cfi)
- VG_(printf)("cie.pointer = %lld\n", cie_pointer);
+ VG_(printf)("cie.pointer = %llu\n", cie_pointer);
/* If cie_pointer is zero for .eh_frame or all ones for .debug_frame,
we've got a CIE; else it's an FDE. */
@@ -4056,7 +4059,7 @@
look_for = cie_pointer;
for (cie = 0; cie < n_CIEs; cie++) {
- if (0) VG_(printf)("look for %lld %lld\n",
+ if (0) VG_(printf)("look for %llu %llu\n",
look_for, the_CIEs[cie].offset );
if (the_CIEs[cie].offset == look_for)
break;
Modified: trunk/coregrind/m_debuginfo/readdwarf3.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readdwarf3.c (original)
+++ trunk/coregrind/m_debuginfo/readdwarf3.c Wed Aug 5 23:27:24 2015
@@ -671,7 +671,7 @@
set_position_of_Cursor( &loc, debug_loc_offset );
TRACE_D3("make_general_GX (.debug_loc_offset = %llu, ioff = %llu) {\n",
- debug_loc_offset, (ULong)get_DiCursor_from_Cursor(&loc).ioff );
+ debug_loc_offset, get_DiCursor_from_Cursor(&loc).ioff );
/* Who frees this xa? It is freed before this fn exits. */
xa = VG_(newXA)( ML_(dinfo_zalloc), "di.readdwarf3.mgGX.1",
@@ -965,8 +965,8 @@
VG_(memcpy) (ht_ta, ta, SZ_G_ABBV(ta_nf_n));
VG_(HT_add_node) ( cc->ht_abbvs, ht_ta );
if (TD3) {
- TRACE_D3(" Adding abbv_code %llu TAG %s [%s] nf %d ",
- (ULong) ht_ta->abbv_code, ML_(pp_DW_TAG)(ht_ta->atag),
+ TRACE_D3(" Adding abbv_code %lu TAG %s [%s] nf %u ",
+ ht_ta->abbv_code, ML_(pp_DW_TAG)(ht_ta->atag),
ML_(pp_DW_children)(ht_ta->has_children),
ta_nf_n);
TRACE_D3(" ");
@@ -1019,7 +1019,7 @@
= get_Initial_Length( &cc->is_dw64, c,
"parse_CU_Header: invalid initial-length field" );
- TRACE_D3(" Length: %lld\n", cc->unit_length );
+ TRACE_D3(" Length: %llu\n", cc->unit_length );
/* version */
cc->version = get_UShort( c );
@@ -1031,7 +1031,7 @@
debug_abbrev_offset = get_Dwarfish_UWord( c, cc->is_dw64 );
if (debug_abbrev_offset >= escn_debug_abbv.szB)
cc->barf( "parse_CU_Header: invalid debug_abbrev_offset" );
- TRACE_D3(" Abbrev Offset: %lld\n", debug_abbrev_offset );
+ TRACE_D3(" Abbrev Offset: %llu\n", debug_abbrev_offset );
/* address size. If this isn't equal to the host word size, just
give up. This makes it safe to assume elsewhere that
@@ -1167,12 +1167,12 @@
case DW_FORM_sdata:
cts->u.val = (ULong)(Long)get_SLEB128(c);
cts->szB = 8;
- TRACE_D3("%lld", (Long)cts->u.val);
+ TRACE_D3("%llu", cts->u.val);
break;
case DW_FORM_udata:
cts->u.val = (ULong)(Long)get_ULEB128(c);
cts->szB = 8;
- TRACE_D3("%llu", (Long)cts->u.val);
+ TRACE_D3("%llu", cts->u.val);
break;
case DW_FORM_addr:
/* note, this is a hack. DW_FORM_addr is defined as getting
@@ -1444,7 +1444,7 @@
default:
VG_(printf)(
- "get_Form_contents: unhandled %d (%s) at <%llx>\n",
+ "get_Form_contents: unhandled %u (%s) at <%llx>\n",
form, ML_(pp_DW_FORM)(form), get_position_of_Cursor(c));
c->barf("get_Form_contents: unhandled DW_FORM");
}
@@ -1526,7 +1526,7 @@
return sizeof_Dwarfish_UWord(cc->is_dw64);
default:
VG_(printf)(
- "get_Form_szB: unhandled %d (%s)\n",
+ "get_Form_szB: unhandled %u (%s)\n",
form, ML_(pp_DW_FORM)(form));
cc->barf("get_Form_contents: unhandled DW_FORM");
}
@@ -1923,7 +1923,7 @@
else
dirname = NULL;
fndn_ix = ML_(addFnDn)( cc->di, str, dirname);
- TRACE_D3(" read_filename_table: %ld fndn_ix %d %s %s\n",
+ TRACE_D3(" read_filename_table: %ld fndn_ix %u %s %s\n",
VG_(sizeXA)(fndn_ix_Table), fndn_ix,
dirname, str);
VG_(addToXA)( fndn_ix_Table, &fndn_ix );
@@ -2318,7 +2318,7 @@
&& ftabIx < VG_(sizeXA)( parser->fndn_ix_Table )) {
fndn_ix = *(UInt*)VG_(indexXA)( parser->fndn_ix_Table, ftabIx );
}
- if (0) VG_(printf)("XXX filename fndn_ix = %d %s\n", fndn_ix,
+ if (0) VG_(printf)("XXX filename fndn_ix = %u %s\n", fndn_ix,
ML_(fndn_ix2filename) (cc->di, fndn_ix));
}
}
@@ -2758,7 +2758,7 @@
caller_fndn_ix = *(UInt*)
VG_(indexXA)( parser->fndn_ix_Table, ftabIx );
}
- if (0) VG_(printf)("XXX caller_fndn_ix = %d %s\n", caller_fndn_ix,
+ if (0) VG_(printf)("XXX caller_fndn_ix = %u %s\n", caller_fndn_ix,
ML_(fndn_ix2filename) (cc->di, caller_fndn_ix));
}
if (attr == DW_AT_call_line && cts.szB > 0) {
@@ -4769,7 +4769,7 @@
/* .. vs how big we have found it to be */
cu_amount_used = cu_offset_now - cc.cu_start_offset;
- if (1) TRACE_D3("offset now %lld, d-i-size %lld\n",
+ if (1) TRACE_D3("offset now %llu, d-i-size %llu\n",
cu_offset_now, section_size);
if (cu_offset_now > section_size)
barf("toplevel DIEs beyond end of CU");
@@ -4962,7 +4962,7 @@
} else {
VG_(printf)(" FrB=none\n");
}
- VG_(printf)(" declared at: %d %s:%d\n",
+ VG_(printf)(" declared at: %u %s:%d\n",
varp->fndn_ix,
ML_(fndn_ix2filename) (di, varp->fndn_ix),
varp->fLine );
Modified: trunk/coregrind/m_debuginfo/readelf.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readelf.c (original)
+++ trunk/coregrind/m_debuginfo/readelf.c Wed Aug 5 23:27:24 2015
@@ -757,7 +757,7 @@
return;
}
- TRACE_SYMTAB("\n--- Reading (ELF, standard) %s (%lld entries) ---\n",
+ TRACE_SYMTAB("\n--- Reading (ELF, standard) %s (%llu entries) ---\n",
tab_name, escn_symtab->szB/sizeof(ElfXX_Sym) );
/* Perhaps should start at i = 1; ELF docs suggest that entry
@@ -887,7 +887,7 @@
return;
}
- TRACE_SYMTAB("\n--- Reading (ELF, ppc64be-linux) %s (%lld entries) ---\n",
+ TRACE_SYMTAB("\n--- Reading (ELF, ppc64be-linux) %s (%llu entries) ---\n",
tab_name, escn_symtab->szB/sizeof(ElfXX_Sym) );
oset = VG_(OSetGen_Create)( offsetof(TempSym,key),
@@ -968,21 +968,21 @@
if (modify_size && di->trace_symtab) {
VG_(printf)(" modify (old sz %4d) "
- " val %#010lx, toc %#010lx, sz %4d %lld\n",
+ " val %#010lx, toc %#010lx, sz %4d %llu\n",
old_size,
prev->key.addr,
prev->tocptr,
- (Int) prev->size,
- (ULong)prev->key.name
+ prev->size,
+ prev->key.name
);
}
if (modify_tocptr && di->trace_symtab) {
VG_(printf)(" modify (upd tocptr) "
- " val %#010lx, toc %#010lx, sz %4d %lld\n",
+ " val %#010lx, toc %#010lx, sz %4d %llu\n",
prev->key.addr,
prev->tocptr,
- (Int) prev->size,
- (ULong)prev->key.name
+ prev->size,
+ prev->key.name
);
}
@@ -1597,20 +1597,20 @@
TRACE_SYMTAB("------ Basic facts about the object ------\n");
TRACE_SYMTAB("object: n_oimage %llu\n",
(ULong)ML_(img_size)(mimg));
- TRACE_SYMTAB("phdr: ioff %llu nent %ld ent_szB %ld\n",
+ TRACE_SYMTAB("phdr: ioff %llu nent %lu ent_szB %lu\n",
phdr_mioff, phdr_mnent, phdr_ment_szB);
- TRACE_SYMTAB("shdr: ioff %llu nent %ld ent_szB %ld\n",
+ TRACE_SYMTAB("shdr: ioff %llu nent %lu ent_szB %lu\n",
shdr_mioff, shdr_mnent, shdr_ment_szB);
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rx)
- TRACE_SYMTAB("rx_map: avma %#lx size %lu foff %lu\n",
+ TRACE_SYMTAB("rx_map: avma %#lx size %lu foff %ld\n",
map->avma, map->size, map->foff);
}
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rw)
- TRACE_SYMTAB("rw_map: avma %#lx size %lu foff %lu\n",
+ TRACE_SYMTAB("rw_map: avma %#lx size %lu foff %ld\n",
map->avma, map->size, map->foff);
}
@@ -1711,7 +1711,7 @@
VG_(addToXA)(svma_ranges, &item);
TRACE_SYMTAB(
"PT_LOAD[%ld]: acquired as rw, bias 0x%lx\n",
- i, item.bias);
+ i, (UWord)item.bias);
loaded = True;
}
if (map->rx
@@ -1721,7 +1721,7 @@
VG_(addToXA)(svma_ranges, &item);
TRACE_SYMTAB(
"PT_LOAD[%ld]: acquired as rx, bias 0x%lx\n",
- i, item.bias);
+ i, (UWord)item.bias);
loaded = True;
}
}
@@ -1811,7 +1811,7 @@
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rx)
- TRACE_SYMTAB("rx: at %#lx are mapped foffsets %ld .. %ld\n",
+ TRACE_SYMTAB("rx: at %#lx are mapped foffsets %ld .. %lu\n",
map->avma, map->foff, map->foff + map->size - 1 );
}
TRACE_SYMTAB("rx: contains these svma regions:\n");
@@ -1819,12 +1819,12 @@
const RangeAndBias* reg = VG_(indexXA)(svma_ranges, i);
if (reg->exec)
TRACE_SYMTAB(" svmas %#lx .. %#lx with bias %#lx\n",
- reg->svma_base, reg->svma_limit - 1, reg->bias );
+ reg->svma_base, reg->svma_limit - 1, (UWord)reg->bias );
}
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rw)
- TRACE_SYMTAB("rw: at %#lx are mapped foffsets %ld .. %ld\n",
+ TRACE_SYMTAB("rw: at %#lx are mapped foffsets %ld .. %lu\n",
map->avma, map->foff, map->foff + map->size - 1 );
}
TRACE_SYMTAB("rw: contains these svma regions:\n");
@@ -1832,7 +1832,7 @@
const RangeAndBias* reg = VG_(indexXA)(svma_ranges, i);
if (!reg->exec)
TRACE_SYMTAB(" svmas %#lx .. %#lx with bias %#lx\n",
- reg->svma_base, reg->svma_limit - 1, reg->bias );
+ reg->svma_base, reg->svma_limit - 1, (UWord)reg->bias );
}
/* TOPLEVEL */
@@ -1867,7 +1867,7 @@
}
}
- TRACE_SYMTAB(" [sec %2ld] %s %s al%2u foff %6ld .. %6ld "
+ TRACE_SYMTAB(" [sec %2ld] %s %s al%2u foff %6ld .. %6lu "
" svma %p name \"%s\"\n",
i, inrx ? "rx" : " ", inrw ? "rw" : " ", alyn,
foff, foff+size-1, (void*)svma, name);
@@ -1924,7 +1924,7 @@
TRACE_SYMTAB("acquiring .text avma = %#lx .. %#lx\n",
di->text_avma,
di->text_avma + di->text_size - 1);
- TRACE_SYMTAB("acquiring .text bias = %#lx\n", di->text_bias);
+ TRACE_SYMTAB("acquiring .text bias = %#lx\n", (UWord)di->text_bias);
} else {
BAD(".text");
}
@@ -1946,7 +1946,7 @@
TRACE_SYMTAB("acquiring .data avma = %#lx .. %#lx\n",
di->data_avma,
di->data_avma + di->data_size - 1);
- TRACE_SYMTAB("acquiring .data bias = %#lx\n", di->data_bias);
+ TRACE_SYMTAB("acquiring .data bias = %#lx\n", (UWord)di->data_bias);
} else {
BAD(".data");
}
@@ -1968,7 +1968,8 @@
TRACE_SYMTAB("acquiring .sdata avma = %#lx .. %#lx\n",
di->sdata_avma,
di->sdata_avma + di->sdata_size - 1);
- TRACE_SYMTAB("acquiring .sdata bias = %#lx\n", di->sdata_bias);
+ TRACE_SYMTAB("acquiring .sdata bias = %#lx\n",
+ (UWord)di->sdata_bias);
} else {
BAD(".sdata");
}
@@ -1991,7 +1992,8 @@
TRACE_SYMTAB("acquiring .rodata avma = %#lx .. %#lx\n",
di->rodata_avma,
di->rodata_avma + di->rodata_size - 1);
- TRACE_SYMTAB("acquiring .rodata bias = %#lx\n", di->rodata_bias);
+ TRACE_SYMTAB("acquiring .rodata bias = %#lx\n",
+ (UWord)di->rodata_bias);
} else {
BAD(".rodata");
}
@@ -2013,7 +2015,8 @@
TRACE_SYMTAB("acquiring .dynbss avma = %#lx .. %#lx\n",
di->bss_avma,
di->bss_avma + di->bss_size - 1);
- TRACE_SYMTAB("acquiring .dynbss bias = %#lx\n", di->bss_bias);
+ TRACE_SYMTAB("acquiring .dynbss bias = %#lx\n",
+ (UWord)di->bss_bias);
}
}
@@ -2028,7 +2031,8 @@
svma, svma + size - 1);
TRACE_SYMTAB("acquiring .bss avma = %#lx .. %#lx\n",
svma + inrw->bias, svma + inrw->bias + size - 1);
- TRACE_SYMTAB("acquiring .bss bias = %#lx\n", di->bss_bias);
+ TRACE_SYMTAB("acquiring .bss bias = %#lx\n",
+ (UWord)di->bss_bias);
} else
if (inrw && !di->bss_present) {
@@ -2045,7 +2049,8 @@
TRACE_SYMTAB("acquiring .bss avma = %#lx .. %#lx\n",
di->bss_avma,
di->bss_avma + di->bss_size - 1);
- TRACE_SYMTAB("acquiring .bss bias = %#lx\n", di->bss_bias);
+ TRACE_SYMTAB("acquiring .bss bias = %#lx\n",
+ (UWord)di->bss_bias);
} else
/* Now one from the wtf?! department ... */
@@ -2098,7 +2103,8 @@
TRACE_SYMTAB("acquiring .sdynbss avma = %#lx .. %#lx\n",
di->sbss_avma,
di->sbss_avma + di->sbss_size - 1);
- TRACE_SYMTAB("acquiring .sdynbss bias = %#lx\n", di->sbss_bias);
+ TRACE_SYMTAB("acquiring .sdynbss bias = %#lx\n",
+ (UWord)di->sbss_bias);
}
}
@@ -2113,7 +2119,7 @@
svma, svma + size - 1);
TRACE_SYMTAB("acquiring .sbss avma = %#lx .. %#lx\n",
svma + inrw->bias, svma + inrw->bias + size - 1);
- TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", di->sbss_bias);
+ TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", (UWord)di->sbss_bias);
} else
if (inrw && !di->sbss_present) {
@@ -2130,7 +2136,7 @@
TRACE_SYMTAB("acquiring .sbss avma = %#lx .. %#lx\n",
di->sbss_avma,
di->sbss_avma + di->sbss_size - 1);
- TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", di->sbss_bias);
+ TRACE_SYMTAB("acquiring .sbss bias = %#lx\n", (UWord)di->sbss_bias);
} else {
BAD(".sbss");
}
@@ -2264,7 +2270,8 @@
TRACE_SYMTAB("acquiring .exidx avma = %#lx .. %#lx\n",
di->exidx_avma,
di->exidx_avma + di->exidx_size - 1);
- TRACE_SYMTAB("acquiring .exidx bias = %#lx\n", di->exidx_bias);
+ TRACE_SYMTAB("acquiring .exidx bias = %#lx\n",
+ (UWord)di->exidx_bias);
} else {
BAD(".ARM.exidx");
}
@@ -2286,7 +2293,8 @@
TRACE_SYMTAB("acquiring .extab avma = %#lx .. %#lx\n",
di->extab_avma,
di->extab_avma + di->extab_size - 1);
- TRACE_SYMTAB("acquiring .extab bias = %#lx\n", di->extab_bias);
+ TRACE_SYMTAB("acquiring .extab bias = %#lx\n",
+ (UWord)di->extab_bias);
} else {
BAD(".ARM.extab");
}
@@ -2299,8 +2307,8 @@
} /* iterate over the section headers */
/* TOPLEVEL */
- if (0) VG_(printf)("YYYY text_: avma %#lx size %ld bias %#lx\n",
- di->text_avma, di->text_size, di->text_bias);
+ if (0) VG_(printf)("YYYY text_: avma %#lx size %lu bias %#lx\n",
+ di->text_avma, di->text_size, (UWord)di->text_bias);
if (VG_(clo_verbosity) > 2 || VG_(clo_trace_redir))
VG_(message)(Vg_DebugMsg, " svma %#010lx, avma %#010lx\n",
@@ -2646,7 +2654,7 @@
di->_sec##_debug_svma, \
di->_sec##_debug_svma + di->_sec##_size - 1); \
TRACE_SYMTAB("acquiring ." #_sec " debug bias = %#lx\n", \
- di->_sec##_debug_bias); \
+ (UWord)di->_sec##_debug_bias); \
} \
} while (0);
@@ -3008,7 +3016,7 @@
}
}
}
- VG_(umsg)("VARINFO: %7lu vars %7ld text_size %s\n",
+ VG_(umsg)("VARINFO: %7lu vars %7lu text_size %s\n",
nVars, di->text_size, di->fsm.filename);
}
/* TOPLEVEL */
Modified: trunk/coregrind/m_debuginfo/readexidx.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readexidx.c (original)
+++ trunk/coregrind/m_debuginfo/readexidx.c Wed Aug 5 23:27:24 2015
@@ -554,7 +554,7 @@
if (0)
VG_(printf)(" edata: cmd %08x data %08x\n",
- (UInt)edata.cmd, (UInt)edata.data);
+ (UInt)edata.cmd, edata.data);
Int ret = TranslateCmd ( state, &edata );
if (ret < 0) return ret;
@@ -673,7 +673,7 @@
default:
break;
}
- VG_(printf)("setCFAfromCFIR: FAIL: how %d off %d\n", (Int)how, (Int)off);
+ VG_(printf)("setCFAfromCFIR: FAIL: how %d off %d\n", how, off);
vg_assert(0);
return False;
}
@@ -970,8 +970,8 @@
// associated with.
Addr avma = (Addr)Prel31ToAddr(&entry_img->addr);
if (di->trace_cfi)
- VG_(printf)("XXX1 entry: entry->addr 0x%lx, avma 0x%lx\n",
- (UWord)entry_img->addr, avma);
+ VG_(printf)("XXX1 entry: entry->addr 0x%x, avma 0x%lx\n",
+ entry_img->addr, avma);
Addr next_avma;
if (entry_img < end_img - 1) {
@@ -1006,8 +1006,8 @@
if (!plausible && avma != text_last_avma + 1) {
HChar buf[100];
VG_(snprintf)(buf, sizeof(buf),
- "Implausible EXIDX last entry size %u"
- "; using 1 instead.", (UInt)(text_last_avma - avma));
+ "Implausible EXIDX last entry size %lu"
+ "; using 1 instead.", text_last_avma - avma);
buf[sizeof(buf)-1] = 0;
complain(buf);
}
Modified: trunk/coregrind/m_debuginfo/readpdb.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readpdb.c (original)
+++ trunk/coregrind/m_debuginfo/readpdb.c Wed Aug 5 23:27:24 2015
@@ -1113,7 +1113,7 @@
static
void pdb_check_root_version_and_timestamp( const HChar* pdbname,
ULong pdbmtime,
- unsigned version,
+ UInt version,
UInt TimeDateStamp )
{
switch ( version ) {
@@ -1126,7 +1126,7 @@
default:
if (VG_(clo_verbosity) > 1)
VG_(umsg)("LOAD_PDB_DEBUGINFO: "
- "Unknown .pdb root block version %d\n", version );
+ "Unknown .pdb root block version %u\n", version );
}
if ( TimeDateStamp != pdbmtime ) {
if (VG_(clo_verbosity) > 1)
@@ -1238,9 +1238,9 @@
default:
if (0) {
- const int *isym = (const int *)sym;
+ const UInt *isym = (const UInt *)sym;
VG_(printf)("unknown id 0x%x len=0x%x at %p\n",
- sym->generic.id, sym->generic.len, sym);
+ (UInt)sym->generic.id, (UInt)sym->generic.len, sym);
VG_(printf)(" %8x %8x %8x %8x\n",
isym[1], isym[2], isym[3], isym[4]);
VG_(printf)(" %8x %8x %8x %8x\n",
@@ -1366,7 +1366,7 @@
vsym.isText = True;
vsym.isIFunc = False;
if (debug)
- VG_(umsg)(" Adding function %s addr=%#lx length=%d\n",
+ VG_(umsg)(" Adding function %s addr=%#lx length=%u\n",
symname, vsym.avmas.main, vsym.size );
ML_(addSym)( di, &vsym );
n_syms_read++;
@@ -1387,7 +1387,7 @@
vsym.isText = True;
vsym.isIFunc = False;
if (debug)
- VG_(umsg)(" Adding function %s addr=%#lx length=%d\n",
+ VG_(umsg)(" Adding function %s addr=%#lx length=%u\n",
symname, vsym.avmas.main, vsym.size );
ML_(addSym)( di, &vsym );
n_syms_read++;
@@ -1756,7 +1756,7 @@
for (i = 0; i < lbh->nlines; i++) {
if (debug)
- VG_(printf)("%s offset=%08x line=%d\n",
+ VG_(printf)("%s offset=%08x line=%u\n",
pfx, lbh->l[i].offset, lbh->l[i].lineno ^ 0x80000000);
}
@@ -1767,7 +1767,7 @@
svma_e = sectp[lbh->seg - 1].VirtualAddress + lbh->start
+ lbh->l[i+1].offset-1;
if (debug)
- VG_(printf)("%s line %d: %08lx to %08lx\n",
+ VG_(printf)("%s line %u: %08lx to %08lx\n",
pfx, lbh->l[i].lineno ^ 0x80000000, svma_s, svma_e);
ML_(addLineInfo)( di,
filedirname_ix,
@@ -1781,7 +1781,7 @@
svma_e = sectp[lbh->seg - 1].VirtualAddress + lbh->start
+ lbh->size - 1;
if (debug)
- VG_(printf)("%s line %d: %08lx to %08lx\n",
+ VG_(printf)("%s line %u: %08lx to %08lx\n",
pfx, lbh->l[ lbh->nlines-1 ].lineno ^ 0x80000000,
svma_s, svma_e);
ML_(addLineInfo)( di,
@@ -2099,7 +2099,7 @@
default:
if (VG_(clo_verbosity) > 1)
VG_(umsg)("LOAD_PDB_DEBUGINFO: "
- "Unknown .pdb type info version %ld\n", types.version );
+ "Unknown .pdb type info version %lu\n", types.version );
}
header_size = 0;
@@ -2113,7 +2113,7 @@
default:
if (VG_(clo_verbosity) > 1)
VG_(umsg)("LOAD_PDB_DEBUGINFO: "
- "Unknown .pdb symbol info version %ld\n",
+ "Unknown .pdb symbol info version %lu\n",
symbols.version );
}
@@ -2384,21 +2384,21 @@
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rx)
VG_(dmsg)("LOAD_PDB_DEBUGINFO: "
- "rx_map: avma %#lx size %7lu foff %llu\n",
- map->avma, map->size, (Off64T)map->foff);
+ "rx_map: avma %#lx size %7lu foff %ld\n",
+ map->avma, map->size, map->foff);
}
for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) {
const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i);
if (map->rw)
VG_(dmsg)("LOAD_PDB_DEBUGINFO: "
- "rw_map: avma %#lx size %7lu foff %llu\n",
- map->avma, map->size, (Off64T)map->foff);
+ "rw_map: avma %#lx size %7lu foff %ld\n",
+ map->avma, map->size, map->foff);
}
VG_(dmsg)("LOAD_PDB_DEBUGINFO: "
" text: avma %#lx svma %#lx size %7lu bias %#lx\n",
di->text_avma, di->text_svma,
- di->text_size, di->text_bias);
+ di->text_size, (UWord)di->text_bias);
}
/*
Modified: trunk/coregrind/m_debuginfo/storage.c
==============================================================================
--- trunk/coregrind/m_debuginfo/storage.c (original)
+++ trunk/coregrind/m_debuginfo/storage.c Wed Aug 5 23:27:24 2015
@@ -98,7 +98,7 @@
vg_assert(sym->pri_name);
if (sec_names)
vg_assert(sec_names);
- VG_(printf)( "%5d: %c%c %#8lx .. %#8lx (%d) %s%s",
+ VG_(printf)( "%5d: %c%c %#8lx .. %#8lx (%u) %s%s",
idx,
sym->isText ? 'T' : '-',
sym->isIFunc ? 'I' : '-',
@@ -143,8 +143,7 @@
} while (0)
if (base != 0 || len != 0)
- VG_(printf)("[%#lx .. %#lx]: ", base,
- base + (UWord)len - 1);
+ VG_(printf)("[%#lx .. %#lx]: ", base, base + len - 1);
else
VG_(printf)("[]: ");
@@ -658,7 +657,7 @@
if (0) VG_(message)
(Vg_DebugMsg,
"addInlInfo: fn %s inlined as addr_lo %#lx,addr_hi %#lx,"
- "caller fndn_ix %d %s:%d\n",
+ "caller fndn_ix %u %s:%d\n",
inlinedfn, addr_lo, addr_hi, fndn_ix,
ML_(fndn_ix2filename) (di, fndn_ix), lineno);
@@ -1004,7 +1003,7 @@
while (True) {
range = VG_(OSetGen_Next)( scope );
if (!range) break;
- VG_(printf)(" %#lx .. %#lx: %lu vars\n", range->aMin, range->aMax,
+ VG_(printf)(" %#lx .. %#lx: %ld vars\n", range->aMin, range->aMax,
range->vars ? VG_(sizeXA)(range->vars) : 0);
}
VG_(printf)("}\n");
@@ -2019,7 +2018,7 @@
/* Ensure relevant postconditions hold. */
for (i = 0; i < ((Word)di->loctab_used)-1; i++) {
if (0)
- VG_(printf)("%lu 0x%p lno:%d sz:%d fndn_ix:%d i+1 0x%p\n",
+ VG_(printf)("%ld 0x%p lno:%d sz:%d fndn_ix:%u i+1 0x%p\n",
i,
(void*)di->loctab[i].addr,
di->loctab[i].lineno,
@@ -2151,9 +2150,9 @@
}
if (di->trace_cfi)
- VG_(printf)("canonicaliseCfiSI: %ld entries, %#lx .. %#lx\n",
+ VG_(printf)("canonicaliseCfiSI: %lu entries, %#lx .. %#lx\n",
di->cfsi_used,
- di->cfsi_minavma, di->cfsi_maxavma);
+ di->cfsi_minavma, di->cfsi_maxavma);
/* Sort the cfsi_rd array by base address. */
VG_(ssort)(di->cfsi_rd, di->cfsi_used, sizeof(*di->cfsi_rd), compare_DiCfSI);
Modified: trunk/coregrind/m_debuginfo/tytypes.c
==============================================================================
--- trunk/coregrind/m_debuginfo/tytypes.c (original)
+++ trunk/coregrind/m_debuginfo/tytypes.c Wed Aug 5 23:27:24 2015
@@ -104,7 +104,7 @@
te->Te.Field.typeR, te->Te.Field.pos.offset,
te->Te.Field.name ? te->Te.Field.name : "");
else
- VG_(printf)("Te_Field(ty=0x%05lx,nLoc=%lu,pos.loc=%p,\"%s\")",
+ VG_(printf)("Te_Field(ty=0x%05lx,nLoc=%ld,pos.loc=%p,\"%s\")",
te->Te.Field.typeR, te->Te.Field.nLoc,
te->Te.Field.pos.loc,
te->Te.Field.name ? te->Te.Field.name : "");
@@ -152,7 +152,7 @@
break;
case Te_TyStOrUn:
if (te->Te.TyStOrUn.complete) {
- VG_(printf)("Te_TyStOrUn(%ld,%c,%p,\"%s\")",
+ VG_(printf)("Te_TyStOrUn(%lu,%c,%p,\"%s\")",
te->Te.TyStOrUn.szB,
te->Te.TyStOrUn.isStruct ? 'S' : 'U',
te->Te.TyStOrUn.fieldRs,
Modified: trunk/coregrind/m_scheduler/scheduler.c
==============================================================================
--- trunk/coregrind/m_scheduler/scheduler.c (original)
+++ trunk/coregrind/m_scheduler/scheduler.c Wed Aug 5 23:27:24 2015
@@ -158,7 +158,7 @@
"scheduler: %'llu/%'llu major/minor sched events.\n",
n_scheduling_events_MAJOR, n_scheduling_events_MINOR);
VG_(message)(Vg_DebugMsg,
- " sanity: %d cheap, %d expensive checks.\n",
+ " sanity: %u cheap, %u expensive checks.\n",
sanity_fast_count, sanity_slow_count );
}
@@ -175,7 +175,7 @@
static
void print_sched_event ( ThreadId tid, const HChar* what )
{
- VG_(message)(Vg_DebugMsg, " SCHED[%d]: %s\n", tid, what );
+ VG_(message)(Vg_DebugMsg, " SCHED[%u]: %s\n", tid, what );
}
/* For showing SB profiles, if the user asks to see them. */
@@ -286,7 +286,7 @@
tst->status = VgTs_Runnable;
if (VG_(running_tid) != VG_INVALID_THREADID)
- VG_(printf)("tid %d found %d running\n", tid, VG_(running_tid));
+ VG_(printf)("tid %u found %u running\n", tid, VG_(running_tid));
vg_assert(VG_(running_tid) == VG_INVALID_THREADID);
VG_(running_tid) = tid;
@@ -401,7 +401,7 @@
if (VG_(threads)[tid].status == VgTs_WaitSys) {
if (VG_(clo_trace_signals)) {
VG_(message)(Vg_DebugMsg,
- "get_thread_out_of_syscall zaps tid %d lwp %d\n",
+ "get_thread_out_of_syscall zaps tid %u lwp %d\n",
tid, VG_(threads)[tid].os_state.lwpid);
}
# if defined(VGO_darwin)
@@ -664,8 +664,8 @@
Addr clstack_end,
SizeT clstack_size )
{
- VG_(debugLog)(1,"sched","sched_init_phase2: tid_main=%d, "
- "cls_end=0x%lx, cls_sz=%ld\n",
+ VG_(debugLog)(1,"sched","sched_init_phase2: tid_main=%u, "
+ "cls_end=0x%lx, cls_sz=%lu\n",
tid_main, clstack_end, clstack_size);
vg_assert(VG_IS_PAGE_ALIGNED(clstack_end+1));
@@ -697,7 +697,7 @@
_qq_tst->sched_jmpbuf_valid = True; \
stmt; \
} else if (VG_(clo_trace_sched)) \
- VG_(printf)("SCHEDSETJMP(line %d) tid %d, jumped=%ld\n", \
+ VG_(printf)("SCHEDSETJMP(line %d) tid %u, jumped=%lu\n", \
__LINE__, tid, jumped); \
vg_assert(_qq_tst->sched_jmpbuf_valid); \
_qq_tst->sched_jmpbuf_valid = False; \
@@ -723,8 +723,8 @@
UInt sz_spill = (UInt) sizeof tst->arch.vex_spill;
if (0)
- VG_(printf)("gst %p %d, sh1 %p %d, "
- "sh2 %p %d, spill %p %d\n",
+ VG_(printf)("gst %p %u, sh1 %p %u, "
+ "sh2 %p %u, spill %p %u\n",
(void*)a_vex, sz_vex,
(void*)a_vexsh1, sz_vexsh1,
(void*)a_vexsh2, sz_vexsh2,
@@ -929,7 +929,7 @@
vki_sigset_t m;
Int i, err = VG_(sigprocmask)(VKI_SIG_SETMASK, NULL, &m);
vg_assert(err == 0);
- VG_(printf)("tid %d: entering code with unblocked signals: ", tid);
+ VG_(printf)("tid %u: entering code with unblocked signals: ", tid);
for (i = 1; i <= _VKI_NSIG; i++)
if (!VG_(sigismember)(&m, i))
VG_(printf)("%d ", i);
@@ -1110,7 +1110,7 @@
if (VG_(clo_sanity_level) >= 3) {
HChar buf[50]; // large enough
- VG_(sprintf)(buf, "(BEFORE SYSCALL, tid %d)", tid);
+ VG_(sprintf)(buf, "(BEFORE SYSCALL, tid %u)", tid);
Bool ok = VG_(am_do_sync_check)(buf, __FILE__, __LINE__);
vg_assert(ok);
}
@@ -1119,13 +1119,13 @@
if (VG_(clo_sanity_level) >= 3) {
HChar buf[50]; // large enough
- VG_(sprintf)(buf, "(AFTER SYSCALL, tid %d)", tid);
+ VG_(sprintf)(buf, "(AFTER SYSCALL, tid %u)", tid);
Bool ok = VG_(am_do_sync_check)(buf, __FILE__, __LINE__);
vg_assert(ok);
}
if (!VG_(is_running_thread)(tid))
- VG_(printf)("tid %d not running; VG_(running_tid)=%d, tid %d status %d\n",
+ VG_(printf)("tid %u not running; VG_(running_tid)=%u, tid %u status %u\n",
tid, VG_(running_tid), tid, tst->status);
vg_assert(VG_(is_running_thread)(tid));
@@ -1329,7 +1329,7 @@
n_scheduling_events_MINOR++;
if (0)
- VG_(message)(Vg_DebugMsg, "thread %d: running for %d bbs\n",
+ VG_(message)(Vg_DebugMsg, "thread %u: running for %d bbs\n",
tid, dispatch_ctr - 1 );
HWord trc[2]; /* "two_words" */
@@ -1670,7 +1670,7 @@
continue;
if (0)
VG_(printf)(
- "VG_(nuke_all_threads_except): nuking tid %d\n", tid);
+ "VG_(nuke_all_threads_except): nuking tid %u\n", tid);
VG_(threads)[tid].exitreason = src;
if (src == VgSrc_FatalSig)
@@ -1813,7 +1813,7 @@
*q = '\0';
VG_(printf_xml)( "<clientmsg>\n" );
- VG_(printf_xml)( " <tid>%d</tid>\n", tid );
+ VG_(printf_xml)( " <tid>%u</tid>\n", tid );
const ThreadState *tst = VG_(get_ThreadState)(tid);
if (tst->thread_name)
VG_(printf_xml)(" <threadname>%s</threadname>\n", tst->thread_name);
@@ -1846,7 +1846,7 @@
UWord req_no = arg[0];
if (0)
- VG_(printf)("req no = 0x%llx, arg = %p\n", (ULong)req_no, arg);
+ VG_(printf)("req no = 0x%lx, arg = %p\n", req_no, arg);
switch (req_no) {
case VG_USERREQ__CLIENT_CALL0: {
@@ -2161,22 +2161,22 @@
if (!VG_(is_running_thread)(tid)) {
VG_(message)(Vg_DebugMsg,
- "Thread %d is supposed to be running, "
- "but doesn't own the_BigLock (owned by %d)\n",
+ "Thread %u is supposed to be running, "
+ "but doesn't own the_BigLock (owned by %u)\n",
tid, VG_(running_tid));
bad = True;
}
if (lwpid != VG_(threads)[tid].os_state.lwpid) {
VG_(message)(Vg_DebugMsg,
- "Thread %d supposed to be in LWP %d, but we're actually %d\n",
+ "Thread %u supposed to be in LWP %d, but we're actually %d\n",
tid, VG_(threads)[tid].os_state.lwpid, VG_(gettid)());
bad = True;
}
if (lwpid != ML_(get_sched_lock_owner)(the_BigLock)) {
VG_(message)(Vg_DebugMsg,
- "Thread (LWPID) %d doesn't own the_BigLock\n",
+ "Thread (LWPID) %u doesn't own the_BigLock\n",
tid);
bad = True;
}
@@ -2234,7 +2234,7 @@
|| (VG_(clo_sanity_level) == 1
&& sanity_fast_count == next_slow_check_at)) {
- if (0) VG_(printf)("SLOW at %d\n", sanity_fast_count-1);
+ if (0) VG_(printf)("SLOW at %u\n", sanity_fast_count-1);
next_slow_check_at = sanity_fast_count - 1 + slow_check_interval;
slow_check_interval++;
@@ -2262,7 +2262,7 @@
= VG_(am_get_VgStack_unused_szB)(stack, limit);
if (remains < limit)
VG_(message)(Vg_DebugMsg,
- "WARNING: Thread %d is within %ld bytes "
+ "WARNING: Thread %u is within %lu bytes "
"of running out of valgrind stack!\n"
"Valgrind stack size can be increased "
"using --valgrind-stacksize=....\n",
Modified: trunk/coregrind/m_scheduler/ticket-lock-linux.c
==============================================================================
--- trunk/coregrind/m_scheduler/ticket-lock-linux.c (original)
+++ trunk/coregrind/m_scheduler/ticket-lock-linux.c Wed Aug 5 23:27:24 2015
@@ -120,7 +120,7 @@
ticket = __sync_fetch_and_add(&p->tail, 1);
futex = &p->futex[ticket & TL_FUTEX_MASK];
if (s_debug)
- VG_(printf)("[%d/%d] acquire: ticket %d\n", VG_(getpid)(),
+ VG_(printf)("[%d/%d] acquire: ticket %u\n", VG_(getpid)(),
VG_(gettid)(), ticket);
for (;;) {
futex_value = *futex;
@@ -128,15 +128,15 @@
if (ticket == p->head)
break;
if (s_debug)
- VG_(printf)("[%d/%d] acquire: ticket %d - waiting until"
- " futex[%ld] != %d\n", VG_(getpid)(),
+ VG_(printf)("[%d/%d] acquire: ticket %u - waiting until"
+ " futex[%ld] != %u\n", VG_(getpid)(),
VG_(gettid)(), ticket, (long)(futex - p->futex),
futex_value);
sres = VG_(do_syscall3)(__NR_futex, (UWord)futex,
VKI_FUTEX_WAIT | VKI_FUTEX_PRIVATE_FLAG,
futex_value);
if (sr_isError(sres) && sr_Err(sres) != VKI_EAGAIN) {
- VG_(printf)("futex_wait() returned error code %ld\n", sr_Err(sres));
+ VG_(printf)("futex_wait() returned error code %lu\n", sr_Err(sres));
vg_assert(False);
}
}
@@ -169,7 +169,7 @@
futex = &p->futex[wakeup_ticket & TL_FUTEX_MASK];
futex_value = __sync_fetch_and_add(futex, 1);
if (s_debug)
- VG_(printf)("[%d/%d] release: waking up ticket %d (futex[%ld] = %d)"
+ VG_(printf)("[%d/%d] release: waking up ticket %u (futex[%ld] = %u)"
"\n", VG_(getpid)(), VG_(gettid)(), wakeup_ticket,
(long)(futex - p->futex), futex_value);
sres = VG_(do_syscall3)(__NR_futex, (UWord)futex,
@@ -178,7 +178,7 @@
vg_assert(!sr_isError(sres));
} else {
if (s_debug)
- VG_(printf)("[%d/%d] release: no thread is waiting for ticket %d\n",
+ VG_(printf)("[%d/%d] release: no thread is waiting for ticket %u\n",
VG_(getpid)(), VG_(gettid)(), wakeup_ticket);
}
}
|
|
From: <sv...@va...> - 2015-08-05 21:16:18
|
Author: florian
Date: Wed Aug 5 22:16:09 2015
New Revision: 15499
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/coregrind/m_addrinfo.c
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_errormgr.c
trunk/coregrind/m_hashtable.c
trunk/coregrind/m_initimg/initimg-linux.c
trunk/coregrind/m_libcassert.c
trunk/coregrind/m_machine.c
trunk/coregrind/m_main.c
trunk/coregrind/m_mallocfree.c
trunk/coregrind/m_sbprofile.c
trunk/coregrind/m_signals.c
trunk/coregrind/m_stacktrace.c
trunk/coregrind/m_translate.c
trunk/coregrind/m_transtab.c
Modified: trunk/coregrind/m_addrinfo.c
==============================================================================
--- trunk/coregrind/m_addrinfo.c (original)
+++ trunk/coregrind/m_addrinfo.c Wed Aug 5 22:16:09 2015
@@ -420,22 +420,21 @@
case Addr_Unknown:
if (maybe_gcc) {
- VG_(emit)( "%sAddress 0x%llx is just below the stack ptr. "
+ VG_(emit)( "%sAddress 0x%lx is just below the stack ptr. "
"To suppress, use: --workaround-gcc296-bugs=yes%s\n",
- xpre, (ULong)a, xpost );
+ xpre, a, xpost );
} else {
- VG_(emit)( "%sAddress 0x%llx "
+ VG_(emit)( "%sAddress 0x%lx "
"is not stack'd, malloc'd or %s%s\n",
- xpre,
- (ULong)a,
+ xpre, a,
mc ? "(recently) free'd" : "on a free list",
xpost );
}
break;
case Addr_Stack:
- VG_(emit)( "%sAddress 0x%llx is on thread %s%d's stack%s\n",
- xpre, (ULong)a,
+ VG_(emit)( "%sAddress 0x%lx is on thread %s%u's stack%s\n",
+ xpre, a,
opt_tnr_prefix (ai->Addr.Stack.tinfo),
tnr_else_tid (ai->Addr.Stack.tinfo),
xpost );
@@ -459,7 +458,7 @@
HChar strlinenum[16] = ""; // large enough
if (hasfile && haslinenum)
- VG_(sprintf)(strlinenum, "%d", linenum);
+ VG_(sprintf)(strlinenum, "%u", linenum);
hasfn = VG_(get_fnname)(ai->Addr.Stack.IP, &fn);
@@ -563,7 +562,7 @@
}
if (ai->Addr.Block.alloc_tinfo.tnr || ai->Addr.Block.alloc_tinfo.tid)
VG_(emit)(
- "%sBlock was alloc'd by thread %s%d%s\n",
+ "%sBlock was alloc'd by thread %s%u%s\n",
xpre,
opt_tnr_prefix (ai->Addr.Block.alloc_tinfo),
tnr_else_tid (ai->Addr.Block.alloc_tinfo),
@@ -573,10 +572,9 @@
}
case Addr_DataSym:
- VG_(emit)( "%sAddress 0x%llx is %llu bytes "
+ VG_(emit)( "%sAddress 0x%lx is %llu bytes "
"inside data symbol \"%pS\"%s\n",
- xpre,
- (ULong)a,
+ xpre, a,
(ULong)ai->Addr.DataSym.offset,
ai->Addr.DataSym.name,
xpost );
@@ -597,9 +595,8 @@
break;
case Addr_SectKind:
- VG_(emit)( "%sAddress 0x%llx is in the %pS segment of %pS%s\n",
- xpre,
- (ULong)a,
+ VG_(emit)( "%sAddress 0x%lx is in the %pS segment of %pS%s\n",
+ xpre, a,
VG_(pp_SectKind)(ai->Addr.SectKind.kind),
ai->Addr.SectKind.objname,
xpost );
@@ -612,29 +609,27 @@
case Addr_BrkSegment:
if (a < ai->Addr.BrkSegment.brk_limit)
- VG_(emit)( "%sAddress 0x%llx is in the brk data segment"
- " 0x%llx-0x%llx%s\n",
- xpre,
- (ULong)a,
- (ULong)VG_(brk_base),
- (ULong)ai->Addr.BrkSegment.brk_limit - 1,
+ VG_(emit)( "%sAddress 0x%lx is in the brk data segment"
+ " 0x%lx-0x%lx%s\n",
+ xpre, a,
+ VG_(brk_base),
+ ai->Addr.BrkSegment.brk_limit - 1,
xpost );
else
- VG_(emit)( "%sAddress 0x%llx is %lu bytes after "
+ VG_(emit)( "%sAddress 0x%lx is %lu bytes after "
"the brk data segment limit"
- " 0x%llx%s\n",
- xpre,
- (ULong)a,
+ " 0x%lx%s\n",
+ xpre, a,
a - ai->Addr.BrkSegment.brk_limit,
- (ULong)ai->Addr.BrkSegment.brk_limit,
+ ai->Addr.BrkSegment.brk_limit,
xpost );
break;
case Addr_SegmentKind:
- VG_(emit)( "%sAddress 0x%llx is in "
+ VG_(emit)( "%sAddress 0x%lx is in "
"a %s%s%s %s%s%pS segment%s\n",
xpre,
- (ULong)a,
+ a,
ai->Addr.SegmentKind.hasR ? "r" : "-",
ai->Addr.SegmentKind.hasW ? "w" : "-",
ai->Addr.SegmentKind.hasX ? "x" : "-",
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Wed Aug 5 22:16:09 2015
@@ -442,10 +442,10 @@
VG_(debugLog)(
logLevel, "aspacem",
- "%3d: %s %010llx-%010llx %s %c%c%c%c%c %s "
- "d=0x%03llx i=%-7lld o=%-7lld (%d,%d) %s\n",
+ "%3d: %s %010lx-%010lx %s %c%c%c%c%c %s "
+ "d=0x%03llx i=%-7llu o=%-7lld (%d,%d) %s\n",
segNo, show_SegKind(seg->kind),
- (ULong)seg->start, (ULong)seg->end, len_buf,
+ seg->start, seg->end, len_buf,
seg->hasR ? 'r' : '-', seg->hasW ? 'w' : '-',
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
seg->isCH ? 'H' : '-',
@@ -469,18 +469,18 @@
case SkFree:
VG_(debugLog)(
logLevel, "aspacem",
- "%3d: %s %010llx-%010llx %s\n",
+ "%3d: %s %010lx-%010lx %s\n",
segNo, show_SegKind(seg->kind),
- (ULong)seg->start, (ULong)seg->end, len_buf
+ seg->start, seg->end, len_buf
);
break;
case SkAnonC: case SkAnonV: case SkShmC:
VG_(debugLog)(
logLevel, "aspacem",
- "%3d: %s %010llx-%010llx %s %c%c%c%c%c\n",
+ "%3d: %s %010lx-%010lx %s %c%c%c%c%c\n",
segNo, show_SegKind(seg->kind),
- (ULong)seg->start, (ULong)seg->end, len_buf,
+ seg->start, seg->end, len_buf,
seg->hasR ? 'r' : '-', seg->hasW ? 'w' : '-',
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
seg->isCH ? 'H' : '-'
@@ -490,10 +490,10 @@
case SkFileC: case SkFileV:
VG_(debugLog)(
logLevel, "aspacem",
- "%3d: %s %010llx-%010llx %s %c%c%c%c%c d=0x%03llx "
- "i=%-7lld o=%-7lld (%d,%d)\n",
+ "%3d: %s %010lx-%010lx %s %c%c%c%c%c d=0x%03llx "
+ "i=%-7llu o=%-7lld (%d,%d)\n",
segNo, show_SegKind(seg->kind),
- (ULong)seg->start, (ULong)seg->end, len_buf,
+ seg->start, seg->end, len_buf,
seg->hasR ? 'r' : '-', seg->hasW ? 'w' : '-',
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
seg->isCH ? 'H' : '-',
@@ -505,9 +505,9 @@
case SkResvn:
VG_(debugLog)(
logLevel, "aspacem",
- "%3d: %s %010llx-%010llx %s %c%c%c%c%c %s\n",
+ "%3d: %s %010lx-%010lx %s %c%c%c%c%c %s\n",
segNo, show_SegKind(seg->kind),
- (ULong)seg->start, (ULong)seg->end, len_buf,
+ seg->start, seg->end, len_buf,
seg->hasR ? 'r' : '-', seg->hasW ? 'w' : '-',
seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-',
seg->isCH ? 'H' : '-',
@@ -915,9 +915,9 @@
"segment mismatch: V's seg 1st, kernel's 2nd:\n");
show_nsegment_full( 0, i, &nsegments[i] );
VG_(debugLog)(0,"aspacem",
- "...: .... %010llx-%010llx %s %c%c%c.. ....... "
- "d=0x%03llx i=%-7lld o=%-7lld (.) m=. %s\n",
- (ULong)start, (ULong)end, len_buf,
+ "...: .... %010lx-%010lx %s %c%c%c.. ....... "
+ "d=0x%03llx i=%-7llu o=%-7lld (.) m=. %s\n",
+ start, end, len_buf,
prot & VKI_PROT_READ ? 'r' : '-',
prot & VKI_PROT_WRITE ? 'w' : '-',
prot & VKI_PROT_EXEC ? 'x' : '-',
@@ -982,8 +982,8 @@
"segment mismatch: V's gap 1st, kernel's 2nd:\n");
show_nsegment_full( 0, i, &nsegments[i] );
VG_(debugLog)(0,"aspacem",
- " : .... %010llx-%010llx %s\n",
- (ULong)start, (ULong)end, len_buf);
+ " : .... %010lx-%010lx %s\n",
+ start, end, len_buf);
return;
}
}
@@ -1712,8 +1712,8 @@
accordingly. */
VG_(debugLog)(2, "aspacem",
- " sp_at_startup = 0x%010llx (supplied)\n",
- (ULong)sp_at_startup );
+ " sp_at_startup = 0x%010lx (supplied)\n",
+ sp_at_startup );
# if VG_WORDSIZE == 8
aspacem_maxAddr = (Addr)0x1000000000ULL - 1; // 64G
@@ -1746,20 +1746,20 @@
aspacem_assert(VG_IS_PAGE_ALIGNED(suggested_clstack_end + 1));
VG_(debugLog)(2, "aspacem",
- " minAddr = 0x%010llx (computed)\n",
- (ULong)aspacem_minAddr);
+ " minAddr = 0x%010lx (computed)\n",
+ aspacem_minAddr);
VG_(debugLog)(2, "aspacem",
- " maxAddr = 0x%010llx (computed)\n",
- (ULong)aspacem_maxAddr);
+ " maxAddr = 0x%010lx (computed)\n",
+ aspacem_maxAddr);
VG_(debugLog)(2, "aspacem",
- " cStart = 0x%010llx (computed)\n",
- (ULong)aspacem_cStart);
+ " cStart = 0x%010lx (computed)\n",
+ aspacem_cStart);
VG_(debugLog)(2, "aspacem",
- " vStart = 0x%010llx (computed)\n",
- (ULong)aspacem_vStart);
+ " vStart = 0x%010lx (computed)\n",
+ aspacem_vStart);
VG_(debugLog)(2, "aspacem",
- "suggested_clstack_end = 0x%010llx (computed)\n",
- (ULong)suggested_clstack_end);
+ "suggested_clstack_end = 0x%010lx (computed)\n",
+ suggested_clstack_end);
if (aspacem_cStart > Addr_MIN) {
init_resvn(&seg, Addr_MIN, aspacem_cStart-1);
@@ -1881,8 +1881,8 @@
if (0) {
VG_(am_show_nsegments)(0,"getAdvisory");
- VG_(debugLog)(0,"aspacem", "getAdvisory 0x%llx %lld\n",
- (ULong)req->start, (ULong)req->len);
+ VG_(debugLog)(0,"aspacem", "getAdvisory 0x%lx %lu\n",
+ req->start, req->len);
}
/* Reject zero-length requests */
Modified: trunk/coregrind/m_errormgr.c
==============================================================================
--- trunk/coregrind/m_errormgr.c (original)
+++ trunk/coregrind/m_errormgr.c Wed Aug 5 22:16:09 2015
@@ -307,7 +307,7 @@
} else {
VG_(printf)("\nUnhandled error type: %u. VG_(needs).tool_errors\n"
"probably needs to be set.\n",
- e1->ekind);
+ (UInt)e1->ekind);
VG_(core_panic)("unhandled error type");
}
}
@@ -591,7 +591,7 @@
/* standard preamble */
VG_(printf_xml)("<error>\n");
VG_(printf_xml)(" <unique>0x%x</unique>\n", err->unique);
- VG_(printf_xml)(" <tid>%d</tid>\n", err->tid);
+ VG_(printf_xml)(" <tid>%u</tid>\n", err->tid);
ThreadState* tst = VG_(get_ThreadState)(err->tid);
if (tst->thread_name) {
VG_(printf_xml)(" <threadname>%s</threadname>\n", tst->thread_name);
@@ -617,9 +617,9 @@
&& err->tid > 0 && err->tid != last_tid_printed) {
ThreadState* tst = VG_(get_ThreadState)(err->tid);
if (tst->thread_name) {
- VG_(umsg)("Thread %d %s:\n", err->tid, tst->thread_name );
+ VG_(umsg)("Thread %u %s:\n", err->tid, tst->thread_name );
} else {
- VG_(umsg)("Thread %d:\n", err->tid );
+ VG_(umsg)("Thread %u:\n", err->tid );
}
last_tid_printed = err->tid;
}
@@ -981,7 +981,7 @@
/* We only get here if not printing XML. */
VG_(umsg)("ERROR SUMMARY: "
- "%d errors from %d contexts (suppressed: %d from %d)\n",
+ "%u errors from %u contexts (suppressed: %u from %u)\n",
n_errs_found, n_err_contexts,
n_errs_suppressed, n_supp_contexts );
@@ -1009,7 +1009,7 @@
if (p_min == NULL) continue; //VG_(core_panic)("show_all_errors()");
VG_(umsg)("\n");
- VG_(umsg)("%d errors in context %d of %d:\n",
+ VG_(umsg)("%d errors in context %d of %u:\n",
p_min->count, i+1, n_err_contexts);
pp_Error( p_min, False/*allow_db_attach*/, False /* xml */ );
@@ -1041,7 +1041,7 @@
// reprint this, so users don't have to scroll way up to find
// the first printing
VG_(umsg)("ERROR SUMMARY: "
- "%d errors from %d contexts (suppressed: %d from %d)\n",
+ "%u errors from %u contexts (suppressed: %u from %u)\n",
n_errs_found, n_err_contexts, n_errs_suppressed,
n_supp_contexts );
}
@@ -1891,7 +1891,7 @@
VG_(printf)(
"\nUnhandled suppression type: %u. VG_(needs).tool_errors\n"
"probably needs to be set.\n",
- err->ekind);
+ (UInt)err->ekind);
VG_(core_panic)("unhandled suppression type");
}
}
Modified: trunk/coregrind/m_hashtable.c
==============================================================================
--- trunk/coregrind/m_hashtable.c (original)
+++ trunk/coregrind/m_hashtable.c Wed Aug 5 22:16:09 2015
@@ -308,7 +308,7 @@
|| key_occurences[i] > 0
|| cno_occurences[i] > 0)
VG_(message)(Vg_DebugMsg,
- "%s=%2d : nr chain %6d, nr keys %6d, nr elts %6d\n",
+ "%s=%2u : nr chain %6u, nr keys %6u, nr elts %6u\n",
i == MAXOCCUR ? ">" : "N", i,
cno_occurences[i], key_occurences[i], elt_occurences[i]);
nkey += key_occurences[i];
@@ -316,7 +316,7 @@
ncno += cno_occurences[i];
}
VG_(message)(Vg_DebugMsg,
- "total nr of unique slots: %6d, keys %6d, elts %6d."
+ "total nr of unique slots: %6u, keys %6u, elts %6u."
" Avg chain len %3.1f\n",
ncno, nkey, nelt,
(Double)nelt/(Double)(ncno == cno_occurences[0] ?
Modified: trunk/coregrind/m_initimg/initimg-linux.c
==============================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c (original)
+++ trunk/coregrind/m_initimg/initimg-linux.c Wed Aug 5 22:16:09 2015
@@ -478,7 +478,7 @@
auxsize + /* auxv */
VG_ROUNDUP(stringsize, sizeof(Word)); /* strings (aligned) */
- if (0) VG_(printf)("stacksize = %d\n", stacksize);
+ if (0) VG_(printf)("stacksize = %u\n", stacksize);
/* client_SP is the client's stack pointer */
client_SP = clstack_end - stacksize;
@@ -494,10 +494,10 @@
clstack_max_size = VG_PGROUNDUP(clstack_max_size);
if (0)
- VG_(printf)("stringsize=%d auxsize=%d stacksize=%d maxsize=0x%x\n"
+ VG_(printf)("stringsize=%u auxsize=%u stacksize=%u maxsize=0x%lx\n"
"clstack_start %p\n"
"clstack_end %p\n",
- stringsize, auxsize, stacksize, (Int)clstack_max_size,
+ stringsize, auxsize, stacksize, clstack_max_size,
(void*)clstack_start, (void*)clstack_end);
/* ==================== allocate space ==================== */
@@ -815,7 +815,7 @@
default:
/* stomp out anything we don't know about */
VG_(debugLog)(2, "initimg",
- "stomping auxv entry %lld\n",
+ "stomping auxv entry %llu\n",
(ULong)auxv->a_type);
auxv->a_type = AT_IGNORE;
break;
@@ -960,7 +960,7 @@
if (szB < m1) szB = m1;
szB = VG_PGROUNDUP(szB);
VG_(debugLog)(1, "initimg",
- "Setup client stack: size will be %ld\n", szB);
+ "Setup client stack: size will be %lu\n", szB);
iifii.clstack_max_size = szB;
@@ -980,9 +980,9 @@
(void*)VG_(brk_base) );
VG_(debugLog)(2, "initimg",
"Client info: "
- "initial_SP=%p max_stack_size=%ld\n",
+ "initial_SP=%p max_stack_size=%lu\n",
(void*)(iifii.initial_client_SP),
- (SizeT)iifii.clstack_max_size );
+ iifii.clstack_max_size );
}
//--------------------------------------------------------------
Modified: trunk/coregrind/m_libcassert.c
==============================================================================
--- trunk/coregrind/m_libcassert.c (original)
+++ trunk/coregrind/m_libcassert.c Wed Aug 5 22:16:09 2015
@@ -362,7 +362,7 @@
}
VG_(printf)("\nsched status:\n");
- VG_(printf)(" running_tid=%d\n", VG_(get_running_tid)());
+ VG_(printf)(" running_tid=%u\n", VG_(get_running_tid)());
for (i = 1; i < VG_N_THREADS; i++) {
VgStack* stack
= (VgStack*)VG_(threads)[i].os_state.valgrind_stack_base;
@@ -389,7 +389,7 @@
VG_(printf)("client stack range: ???????\n");
}
if (stack_usage && stack != 0)
- VG_(printf)("valgrind stack top usage: %ld of %ld\n",
+ VG_(printf)("valgrind stack top usage: %lu of %lu\n",
VG_(clo_valgrind_stacksize)
- VG_(am_get_VgStack_unused_szB)
(stack, VG_(clo_valgrind_stacksize)),
Modified: trunk/coregrind/m_machine.c
==============================================================================
--- trunk/coregrind/m_machine.c (original)
+++ trunk/coregrind/m_machine.c Wed Aug 5 22:16:09 2015
@@ -191,7 +191,7 @@
const HChar*, Addr))
{
VexGuestArchState* vex = &(VG_(get_ThreadState)(tid)->arch.vex);
- VG_(debugLog)(2, "machine", "apply_to_GPs_of_tid %d\n", tid);
+ VG_(debugLog)(2, "machine", "apply_to_GPs_of_tid %u\n", tid);
#if defined(VGA_x86)
(*f)(tid, "EAX", vex->guest_EAX);
(*f)(tid, "ECX", vex->guest_ECX);
Modified: trunk/coregrind/m_main.c
==============================================================================
--- trunk/coregrind/m_main.c (original)
+++ trunk/coregrind/m_main.c Wed Aug 5 22:16:09 2015
@@ -1532,8 +1532,8 @@
# endif
if (show)
- VG_(printf)("fd limits: host, before: cur %lu max %lu\n",
- (UWord)rl.rlim_cur, (UWord)rl.rlim_max);
+ VG_(printf)("fd limits: host, before: cur %llu max %llu\n",
+ (ULong)rl.rlim_cur, (ULong)rl.rlim_max);
/* Work out where to move the soft limit to. */
if (rl.rlim_cur + N_RESERVED_FDS <= rl.rlim_max) {
@@ -1552,7 +1552,7 @@
if (show) {
VG_(printf)("fd limits: host, after: cur %lu max %lu\n",
(UWord)rl.rlim_cur, (UWord)rl.rlim_max);
- VG_(printf)("fd limits: guest : cur %u max %u\n",
+ VG_(printf)("fd limits: guest : cur %d max %d\n",
VG_(fd_soft_limit), VG_(fd_hard_limit));
}
@@ -2698,7 +2698,7 @@
sys_exit, do likewise; if the (last) thread stopped due to a fatal
signal, terminate the entire system with that same fatal signal. */
VG_(debugLog)(1, "core_os",
- "VG_(terminate_NORETURN)(tid=%lld)\n", (ULong)tid);
+ "VG_(terminate_NORETURN)(tid=%u)\n", tid);
switch (tids_schedretcode) {
case VgSrc_ExitThread: /* the normal way out (Linux, Solaris) */
Modified: trunk/coregrind/m_mallocfree.c
==============================================================================
--- trunk/coregrind/m_mallocfree.c (original)
+++ trunk/coregrind/m_mallocfree.c Wed Aug 5 22:16:09 2015
@@ -877,7 +877,7 @@
if (a->stats__bytes_mmaped > a->stats__bytes_mmaped_max)
a->stats__bytes_mmaped_max = a->stats__bytes_mmaped;
VG_(debugLog)(1, "mallocfree",
- "newSuperblock at %p (pszB %7ld) %s owner %s/%s\n",
+ "newSuperblock at %p (pszB %7lu) %s owner %s/%s\n",
sb, sb->n_payload_bytes,
(unsplittable ? "unsplittable" : ""),
a->clientmem ? "CLIENT" : "VALGRIND", a->name );
@@ -895,7 +895,7 @@
UInt i, j;
VG_(debugLog)(1, "mallocfree",
- "reclaimSuperblock at %p (pszB %7ld) %s owner %s/%s\n",
+ "reclaimSuperblock at %p (pszB %7lu) %s owner %s/%s\n",
sb, sb->n_payload_bytes,
(sb->unsplittable ? "unsplittable" : ""),
a->clientmem ? "CLIENT" : "VALGRIND", a->name );
@@ -1220,13 +1220,13 @@
Superblock * sb = a->sblocks[j];
VG_(printf)( "\n" );
- VG_(printf)( "superblock %d at %p %s, sb->n_pl_bs = %lu\n",
+ VG_(printf)( "superblock %u at %p %s, sb->n_pl_bs = %lu\n",
blockno++, sb, (sb->unsplittable ? "unsplittable" : ""),
sb->n_payload_bytes);
for (i = 0; i < sb->n_payload_bytes; i += b_bszB) {
Block* b = (Block*)&sb->payload_bytes[i];
b_bszB = get_bszB(b);
- VG_(printf)( " block at %d, bszB %lu: ", i, b_bszB );
+ VG_(printf)( " block at %u, bszB %lu: ", i, b_bszB );
VG_(printf)( "%s, ", is_inuse_block(b) ? "inuse" : "free");
VG_(printf)( "%s\n", blockSane(a, b) ? "ok" : "BAD" );
}
@@ -1276,13 +1276,13 @@
b = (Block*)&sb->payload_bytes[i];
b_bszB = get_bszB_as_is(b);
if (!blockSane(a, b)) {
- VG_(printf)("sanity_check_malloc_arena: sb %p, block %d "
+ VG_(printf)("sanity_check_malloc_arena: sb %p, block %u "
"(bszB %lu): BAD\n", sb, i, b_bszB );
BOMB;
}
thisFree = !is_inuse_block(b);
if (thisFree && lastWasFree) {
- VG_(printf)("sanity_check_malloc_arena: sb %p, block %d "
+ VG_(printf)("sanity_check_malloc_arena: sb %p, block %u "
"(bszB %lu): UNMERGED FREES\n", sb, i, b_bszB );
BOMB;
}
@@ -1323,7 +1323,7 @@
b_prev = b;
b = get_next_b(b);
if (get_prev_b(b) != b_prev) {
- VG_(printf)( "sanity_check_malloc_arena: list %d at %p: "
+ VG_(printf)( "sanity_check_malloc_arena: list %u at %p: "
"BAD LINKAGE\n",
listno, b );
BOMB;
@@ -1331,7 +1331,7 @@
b_pszB = get_pszB(a, b);
if (b_pszB < list_min_pszB || b_pszB > list_max_pszB) {
VG_(printf)(
- "sanity_check_malloc_arena: list %d at %p: "
+ "sanity_check_malloc_arena: list %u at %p: "
"WRONG CHAIN SIZE %luB (%luB, %luB)\n",
listno, b, b_pszB, list_min_pszB, list_max_pszB );
BOMB;
@@ -1353,8 +1353,8 @@
if (VG_(clo_verbosity) > 2)
VG_(message)(Vg_DebugMsg,
- "%-8s: %2d sbs, %5d bs, %2d/%-2d free bs, "
- "%7ld mmap, %7ld loan\n",
+ "%-8s: %2u sbs, %5u bs, %2u/%-2u free bs, "
+ "%7lu mmap, %7lu loan\n",
a->name,
superblockctr,
blockctr_sb, blockctr_sb_free, blockctr_li,
@@ -1764,7 +1764,7 @@
a->sblocks_size *= 2;
a->sblocks = array;
VG_(debugLog)(1, "mallocfree",
- "sblock array for arena `%s' resized to %ld\n",
+ "sblock array for arena `%s' resized to %lu\n",
a->name, a->sblocks_size);
}
@@ -1892,7 +1892,7 @@
a->clientmem ? "CLIENT" : "VALGRIND", a->name );
} else
VG_(debugLog)(1, "mallocfree",
- "deferred_reclaimSuperblock at %p (pszB %7ld) %s "
+ "deferred_reclaimSuperblock at %p (pszB %7lu) %s "
"(prev %p) owner %s/%s\n",
sb, sb->n_payload_bytes,
(sb->unsplittable ? "unsplittable" : ""),
@@ -2457,8 +2457,8 @@
sb->n_payload_bytes -= frag_bszB;
VG_(debugLog)(1, "mallocfree",
- "shrink superblock %p to (pszB %7ld) "
- "owner %s/%s (munmap-ing %p %7ld)\n",
+ "shrink superblock %p to (pszB %7lu) "
+ "owner %s/%s (munmap-ing %p %7lu)\n",
sb, sb->n_payload_bytes,
a->clientmem ? "CLIENT" : "VALGRIND", a->name,
(void*) frag, frag_bszB);
Modified: trunk/coregrind/m_sbprofile.c
==============================================================================
--- trunk/coregrind/m_sbprofile.c (original)
+++ trunk/coregrind/m_sbprofile.c Wed Aug 5 22:16:09 2015
@@ -72,7 +72,7 @@
VG_(printf)("<<<\n");
VG_(printf)("\n");
- VG_(printf)("Total score = %'lld\n\n", score_total);
+ VG_(printf)("Total score = %'llu\n\n", score_total);
/* Print an initial per-block summary. */
VG_(printf)("rank ---cumulative--- -----self-----\n");
@@ -96,7 +96,7 @@
Double percent_here =
score_total == 0 ? 100.0 : score_here * 100.0 / score_total;
- VG_(printf)("%3d: (%9lld %5.2f%%) %9lld %5.2f%% 0x%lx %s\n",
+ VG_(printf)("%3d: (%9llu %5.2f%%) %9llu %5.2f%% 0x%lx %s\n",
r,
score_cumul, percent_cumul,
score_here, percent_here, tops[r].addr, name);
@@ -138,7 +138,7 @@
VG_(printf)("\n");
VG_(printf)("=-=-=-=-=-=-=-=-=-=-=-=-=-= begin SB rank %d "
"=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n", r);
- VG_(printf)("%3d: (%9lld %5.2f%%) %9lld %5.2f%% 0x%lx %s\n",
+ VG_(printf)("%3d: (%9llu %5.2f%%) %9llu %5.2f%% 0x%lx %s\n",
r,
score_cumul, percent_cumul,
score_here, percent_here, tops[r].addr, name );
@@ -170,7 +170,7 @@
Double percent_here =
score_total == 0 ? 100.0 : score_here * 100.0 / score_total;
- VG_(printf)("%3d: (%9lld %5.2f%%) %9lld %5.2f%% 0x%lx %s\n",
+ VG_(printf)("%3d: (%9llu %5.2f%%) %9llu %5.2f%% 0x%lx %s\n",
r,
score_cumul, percent_cumul,
score_here, percent_here, tops[r].addr, name );
Modified: trunk/coregrind/m_signals.c
==============================================================================
--- trunk/coregrind/m_signals.c (original)
+++ trunk/coregrind/m_signals.c Wed Aug 5 22:16:09 2015
@@ -1145,7 +1145,7 @@
m_SP = VG_(get_SP)(tid);
if (VG_(clo_trace_signals))
- VG_(dmsg)("sys_sigaltstack: tid %d, "
+ VG_(dmsg)("sys_sigaltstack: tid %u, "
"ss %p{%p,sz=%llu,flags=0x%llx}, oss %p (current SP %p)\n",
tid, (void*)ss,
ss ? ss->ss_sp : 0,
@@ -1339,7 +1339,7 @@
vki_sigset_t* oldset )
{
if (VG_(clo_trace_signals))
- VG_(dmsg)("do_setmask: tid = %d how = %d (%s), newset = %p (%s)\n",
+ VG_(dmsg)("do_setmask: tid = %u how = %d (%s), newset = %p (%s)\n",
tid, how,
how==VKI_SIG_BLOCK ? "SIG_BLOCK" : (
how==VKI_SIG_UNBLOCK ? "SIG_UNBLOCK" : (
@@ -1440,7 +1440,7 @@
tst = & VG_(threads)[tid];
if (VG_(clo_trace_signals)) {
- VG_(dmsg)("push_signal_frame (thread %d): signal %d\n", tid, sigNo);
+ VG_(dmsg)("push_signal_frame (thread %u): signal %d\n", tid, sigNo);
VG_(get_and_pp_StackTrace)(tid, 10);
}
@@ -1455,7 +1455,7 @@
esp_top_of_frame
= (Addr)(tst->altstack.ss_sp) + tst->altstack.ss_size;
if (VG_(clo_trace_signals))
- VG_(dmsg)("delivering signal %d (%s) to thread %d: "
+ VG_(dmsg)("delivering signal %d (%s) to thread %u: "
"on ALT STACK (%p-%p; %ld bytes)\n",
sigNo, VG_(signame)(sigNo), tid, tst->altstack.ss_sp,
(UChar *)tst->altstack.ss_sp + tst->altstack.ss_size,
@@ -1935,7 +1935,7 @@
ThreadState *tst = VG_(get_ThreadState)(tid);
if (VG_(clo_trace_signals))
- VG_(dmsg)("delivering signal %d (%s):%d to thread %d\n",
+ VG_(dmsg)("delivering signal %d (%s):%d to thread %u\n",
sigNo, VG_(signame)(sigNo), info->si_code, tid );
if (sigNo == VG_SIGVGKILL) {
@@ -2195,7 +2195,7 @@
sq = tst->sig_queue;
if (VG_(clo_trace_signals))
- VG_(dmsg)("Queueing signal %d (idx %d) to thread %d\n",
+ VG_(dmsg)("Queueing signal %d (idx %d) to thread %u\n",
si->si_signo, sq->next, tid);
/* Add signal to the queue. If the queue gets overrun, then old
@@ -2205,7 +2205,7 @@
least a non-siginfo signal gets deliviered.
*/
if (sq->sigs[sq->next].si_signo != 0)
- VG_(umsg)("Signal %d being dropped from thread %d's queue\n",
+ VG_(umsg)("Signal %d being dropped from thread %u's queue\n",
sq->sigs[sq->next].si_signo, tid);
sq->sigs[sq->next] = *si;
@@ -2243,7 +2243,7 @@
if (sq->sigs[idx].si_signo != 0
&& VG_(sigismember)(set, sq->sigs[idx].si_signo)) {
if (VG_(clo_trace_signals))
- VG_(dmsg)("Returning queued signal %d (idx %d) for thread %d\n",
+ VG_(dmsg)("Returning queued signal %d (idx %d) for thread %u\n",
sq->sigs[idx].si_signo, idx, tid);
ret = &sq->sigs[idx];
goto out;
@@ -2404,7 +2404,7 @@
info->si_code = sanitize_si_code(info->si_code);
if (VG_(clo_trace_signals))
- VG_(dmsg)("async signal handler: signal=%d, tid=%d, si_code=%d\n",
+ VG_(dmsg)("async signal handler: signal=%d, tid=%u, si_code=%d\n",
sigNo, tid, info->si_code);
/* Update thread state properly. The signal can only have been
@@ -2513,17 +2513,17 @@
udelta = VG_PGROUNDUP(seg_next->start - addr);
VG_(debugLog)(1, "signals",
- "extending a stack base 0x%llx down by %lld\n",
- (ULong)seg_next->start, (ULong)udelta);
+ "extending a stack base 0x%lx down by %lu\n",
+ seg_next->start, udelta);
Bool overflow;
if (! VG_(am_extend_into_adjacent_reservation_client)
( seg_next->start, -(SSizeT)udelta, &overflow )) {
Addr new_stack_base = seg_next->start - udelta;
if (overflow)
- VG_(umsg)("Stack overflow in thread #%d: can't grow stack to %#lx\n",
+ VG_(umsg)("Stack overflow in thread #%u: can't grow stack to %#lx\n",
tid, new_stack_base);
else
- VG_(umsg)("Cannot map memory to grow the stack for thread #%d "
+ VG_(umsg)("Cannot map memory to grow the stack for thread #%u "
"to %#lx\n", tid, new_stack_base);
return False;
}
@@ -2664,11 +2664,11 @@
if (VG_(clo_trace_signals)) {
if (seg == NULL)
- VG_(dmsg)("SIGSEGV: si_code=%d faultaddr=%#lx tid=%d ESP=%#lx "
+ VG_(dmsg)("SIGSEGV: si_code=%d faultaddr=%#lx tid=%u ESP=%#lx "
"seg=NULL\n",
info->si_code, fault, tid, esp);
else
- VG_(dmsg)("SIGSEGV: si_code=%d faultaddr=%#lx tid=%d ESP=%#lx "
+ VG_(dmsg)("SIGSEGV: si_code=%d faultaddr=%#lx tid=%u ESP=%#lx "
"seg=%#lx-%#lx\n",
info->si_code, fault, tid, esp, seg->start, seg->end);
}
@@ -2752,7 +2752,7 @@
"a signal %d (%s) - exiting\n",
sigNo, VG_(signame)(sigNo));
- VG_(dmsg)("si_code=%x; Faulting address: %p; sp: %#lx\n",
+ VG_(dmsg)("si_code=%d; Faulting address: %p; sp: %#lx\n",
info->si_code, info->VKI_SIGINFO_si_addr,
VG_UCONTEXT_STACK_PTR(uc));
@@ -2846,7 +2846,7 @@
ThreadStatus at_signal = VG_(threads)[tid].status;
if (VG_(clo_trace_signals))
- VG_(dmsg)("sigvgkill for lwp %d tid %d\n", VG_(gettid)(), tid);
+ VG_(dmsg)("sigvgkill for lwp %d tid %u\n", VG_(gettid)(), tid);
VG_(acquire_BigLock)(tid, "sigvgkill_handler");
@@ -2936,7 +2936,7 @@
/* If there was nothing queued, ask the kernel for a pending signal */
if (sip == NULL && VG_(sigtimedwait_zero)(&pollset, &si) > 0) {
if (VG_(clo_trace_signals))
- VG_(dmsg)("poll_signals: got signal %d for thread %d\n",
+ VG_(dmsg)("poll_signals: got signal %d for thread %u\n",
si.si_signo, tid);
sip = &si;
}
@@ -2944,7 +2944,7 @@
if (sip != NULL) {
/* OK, something to do; deliver it */
if (VG_(clo_trace_signals))
- VG_(dmsg)("Polling found signal %d for tid %d\n", sip->si_signo, tid);
+ VG_(dmsg)("Polling found signal %d for tid %u\n", sip->si_signo, tid);
if (!is_sig_ign(sip, tid))
deliver_signal(tid, sip, NULL);
else if (VG_(clo_trace_signals))
Modified: trunk/coregrind/m_stacktrace.c
==============================================================================
--- trunk/coregrind/m_stacktrace.c (original)
+++ trunk/coregrind/m_stacktrace.c Wed Aug 5 22:16:09 2015
@@ -225,7 +225,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%08lx fp_max_orig=0x08%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%08lx fp_max_orig=0x08%lx, "
"fp_max=0x%08lx ip=0x%08lx fp=0x%08lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.xip, uregs.xbp);
@@ -518,7 +518,7 @@
fp_max -= sizeof(Addr);
if (debug)
- VG_(printf)("max_n_ips=%d fp_min=0x%lx fp_max_orig=0x%lx, "
+ VG_(printf)("max_n_ips=%u fp_min=0x%lx fp_max_orig=0x%lx, "
"fp_max=0x%lx ip=0x%lx fp=0x%lx\n",
max_n_ips, fp_min, fp_max_orig, fp_max,
uregs.xip, uregs.xbp);
@@ -1705,9 +1705,9 @@
startRegs.r_pc += (Long)(Word)first_ip_delta;
if (0)
- VG_(printf)("tid %d: stack_highest=0x%08lx ip=0x%010llx "
+ VG_(printf)("tid %u: stack_highest=0x%08lx ip=0x%010llx "
"sp=0x%010llx\n",
- tid, stack_highest_byte,
+ tid, stack_highest_byte,
startRegs.r_pc, startRegs.r_sp);
return VG_(get_StackTrace_wrk)(tid, ips, max_n_ips,
Modified: trunk/coregrind/m_translate.c
==============================================================================
--- trunk/coregrind/m_translate.c (original)
+++ trunk/coregrind/m_translate.c Wed Aug 5 22:16:09 2015
@@ -1572,9 +1572,10 @@
Bool ok = VG_(get_fnname_w_offset)(addr, &fnname);
if (!ok) fnname = "UNKNOWN_FUNCTION";
VG_(printf)(
- "==== SB %d (evchecks %lld) [tid %d] 0x%lx %s %s+0x%llx\n",
- VG_(get_bbs_translated)(), bbs_done, (Int)tid, addr,
- fnname, objname, (ULong)objoff
+ "==== SB %u (evchecks %llu) [tid %u] 0x%lx %s %s%c0x%lx\n",
+ VG_(get_bbs_translated)(), bbs_done, tid, addr,
+ fnname, objname, objoff >= 0 ? '+' : '-',
+ (UWord)(objoff >= 0 ? objoff : -objoff)
);
}
Modified: trunk/coregrind/m_transtab.c
==============================================================================
--- trunk/coregrind/m_transtab.c (original)
+++ trunk/coregrind/m_transtab.c Wed Aug 5 22:16:09 2015
@@ -2373,8 +2373,8 @@
if (VG_(clo_verbosity) > 2 || VG_(clo_stats)
|| VG_(debugLog_getLevel) () >= 2) {
VG_(message)(Vg_DebugMsg,
- "TT/TC: cache: %s--avg-transtab-entry-size=%d, "
- "%stool provided default %d\n",
+ "TT/TC: cache: %s--avg-transtab-entry-size=%u, "
+ "%stool provided default %u\n",
VG_(clo_avg_transtab_entry_size) == 0 ? "ignoring " : "using ",
VG_(clo_avg_transtab_entry_size),
VG_(clo_avg_transtab_entry_size) == 0 ? "using " : "ignoring ",
@@ -2426,13 +2426,13 @@
n_fast_updates, n_fast_flushes );
VG_(message)(Vg_DebugMsg,
- " transtab: new %'lld "
+ " transtab: new %'llu "
"(%'llu -> %'llu; ratio %3.1f) [%'llu scs] "
- "avg tce size %d\n",
+ "avg tce size %llu\n",
n_in_count, n_in_osize, n_in_tsize,
safe_idiv(n_in_tsize, n_in_osize),
n_in_sc_count,
- (int) (n_in_tsize / (n_in_count ? n_in_count : 1)));
+ n_in_tsize / (n_in_count ? n_in_count : 1));
VG_(message)(Vg_DebugMsg,
" transtab: dumped %'llu (%'llu -> ?" "?) "
"(sectors recycled %'llu)\n",
|
|
From: <sv...@va...> - 2015-08-05 19:05:00
|
Author: florian
Date: Wed Aug 5 20:04:51 2015
New Revision: 15498
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/callgrind/bb.c
trunk/callgrind/bbcc.c
trunk/callgrind/callstack.c
trunk/callgrind/context.c
trunk/callgrind/debug.c
trunk/callgrind/dump.c
trunk/callgrind/fn.c
trunk/callgrind/jumps.c
trunk/callgrind/main.c
trunk/callgrind/sim.c
trunk/callgrind/threads.c
Modified: trunk/callgrind/bb.c
==============================================================================
--- trunk/callgrind/bb.c (original)
+++ trunk/callgrind/bb.c Wed Aug 5 20:04:51 2015
@@ -101,7 +101,7 @@
VG_(free)(bbs.table);
- CLG_DEBUG(0, "Resize BB Hash: %d => %d (entries %d, conflicts %d/%d)\n",
+ CLG_DEBUG(0, "Resize BB Hash: %u => %d (entries %u, conflicts %d/%d)\n",
bbs.size, new_size,
bbs.entries, conflicts1, conflicts2);
@@ -157,7 +157,7 @@
#if CLG_ENABLE_DEBUG
CLG_DEBUGIF(3) {
- VG_(printf)(" new_bb (instr %d, jmps %d, inv %s) [now %d]: ",
+ VG_(printf)(" new_bb (instr %u, jmps %u, inv %s) [now %d]: ",
instr_count, cjmp_count,
cjmp_inverted ? "yes":"no",
CLG_(stat).distinct_bbs);
@@ -188,7 +188,7 @@
}
CLG_DEBUG(5, " lookup_bb (Obj %s, off %#lx): %p\n",
- obj->name, offset, bb);
+ obj->name, (UWord)offset, bb);
return bb;
}
@@ -260,12 +260,12 @@
"ERROR: BB Retranslation Mismatch at BB %#lx\n", addr);
VG_(message)(Vg_DebugMsg,
" new: Obj %s, Off %#lx, BBOff %#lx, Instrs %u\n",
- obj->name, obj->offset,
+ obj->name, (UWord)obj->offset,
addr - obj->offset, n_instrs);
VG_(message)(Vg_DebugMsg,
" old: Obj %s, Off %#lx, BBOff %#lx, Instrs %u\n",
- bb->obj->name, bb->obj->offset,
- bb->offset, bb->instr_count);
+ bb->obj->name, (UWord)bb->obj->offset,
+ (UWord)bb->offset, bb->instr_count);
CLG_ASSERT(bb->instr_count == n_instrs );
}
CLG_ASSERT(bb->cjmp_count == n_jmps );
@@ -306,7 +306,7 @@
if (bb == NULL) {
CLG_DEBUG(3, " delete_bb (Obj %s, off %#lx): NOT FOUND\n",
- obj->name, offset);
+ obj->name, (UWord)offset);
/* we didn't find it.
* this happens when callgrinds instrumentation mode
@@ -327,7 +327,7 @@
}
CLG_DEBUG(3, " delete_bb (Obj %s, off %#lx): %p, BBCC head: %p\n",
- obj->name, offset, bb, bb->bbcc_list);
+ obj->name, (UWord)offset, bb, bb->bbcc_list);
if (bb->bbcc_list == 0) {
/* can be safely deleted */
Modified: trunk/callgrind/bbcc.c
==============================================================================
--- trunk/callgrind/bbcc.c (original)
+++ trunk/callgrind/bbcc.c Wed Aug 5 20:04:51 2015
@@ -86,8 +86,8 @@
jCC* jcc;
CLG_ASSERT(bbcc->cxt != 0);
- CLG_DEBUG(1, " zero_bbcc: BB %#lx, Cxt %d "
- "(fn '%s', rec %d)\n",
+ CLG_DEBUG(1, " zero_bbcc: BB %#lx, Cxt %u "
+ "(fn '%s', rec %u)\n",
bb_addr(bbcc->bb),
bbcc->cxt->base_number + bbcc->rec_index,
bbcc->cxt->fn[0]->name,
@@ -178,7 +178,7 @@
bbcc = bbcc->next;
}
- CLG_DEBUG(2," lookup_bbcc(BB %#lx, Cxt %d, fn '%s'): %p (tid %d)\n",
+ CLG_DEBUG(2," lookup_bbcc(BB %#lx, Cxt %u, fn '%s'): %p (tid %u)\n",
bb_addr(bb), cxt->base_number, cxt->fn[0]->name,
bbcc, bbcc ? bbcc->tid : 0);
@@ -230,7 +230,7 @@
VG_(free)(current_bbccs.table);
- CLG_DEBUG(0,"Resize BBCC Hash: %d => %d (entries %d, conflicts %d/%d)\n",
+ CLG_DEBUG(0,"Resize BBCC Hash: %u => %d (entries %u, conflicts %d/%d)\n",
current_bbccs.size, new_size,
current_bbccs.entries, conflicts1, conflicts2);
@@ -332,7 +332,7 @@
bbcc->next = current_bbccs.table[idx];
current_bbccs.table[idx] = bbcc;
- CLG_DEBUG(3,"- insert_bbcc_into_hash: %d entries\n",
+ CLG_DEBUG(3,"- insert_bbcc_into_hash: %u entries\n",
current_bbccs.entries);
}
@@ -906,7 +906,7 @@
VG_(printf)("\n");
}
- CLG_DEBUG(3,"- setup_bbcc (BB %#lx): Cost %p (Len %d), Instrs %d (Len %d)\n",
+ CLG_DEBUG(3,"- setup_bbcc (BB %#lx): Cost %p (Len %u), Instrs %u (Len %u)\n",
bb_addr(bb), bbcc->cost, bb->cost_count,
bb->instr_count, bb->instr_len);
CLG_DEBUGIF(3)
Modified: trunk/callgrind/callstack.c
==============================================================================
--- trunk/callgrind/callstack.c (original)
+++ trunk/callgrind/callstack.c Wed Aug 5 20:04:51 2015
@@ -107,7 +107,7 @@
CLG_(stat).call_stack_resizes++;
CLG_DEBUGIF(2)
- VG_(printf)(" call stack enlarged to %d entries\n",
+ VG_(printf)(" call stack enlarged to %u entries\n",
CLG_(current_call_stack).size);
}
@@ -280,7 +280,7 @@
". . . . . . . . . . " };
int s = CLG_(current_call_stack).sp;
- Int* pars = (Int*) sp;
+ UInt* pars = (UInt*) sp;
BB* bb = jcc->to->bb;
if (s>40) s=40;
@@ -288,7 +288,7 @@
pars ? pars[1]:0,
pars ? pars[2]:0,
bb->obj->name + bb->obj->last_slash_pos,
- bb->offset);
+ (UWord)bb->offset);
}
}
else if (CLG_(clo).verbose<4) {
Modified: trunk/callgrind/context.c
==============================================================================
--- trunk/callgrind/context.c (original)
+++ trunk/callgrind/context.c Wed Aug 5 20:04:51 2015
@@ -120,7 +120,7 @@
VG_(free)(cxts.table);
- CLG_DEBUG(0, "Resize Context Hash: %d => %d (entries %d, conflicts %d/%d)\n",
+ CLG_DEBUG(0, "Resize Context Hash: %u => %u (entries %u, conflicts %u/%u)\n",
cxts.size, new_size,
cxts.entries, conflicts1, conflicts2);
@@ -236,7 +236,7 @@
size = (*fn)->separate_callers+1;
if (size<=0) { size = -size+1; }
- CLG_DEBUG(5, "+ get_cxt(fn '%s'): size %d\n",
+ CLG_DEBUG(5, "+ get_cxt(fn '%s'): size %u\n",
(*fn)->name, size);
hash = cxt_hash_val(fn, size);
@@ -279,7 +279,7 @@
CLG_DEBUG(5, "+ push_cxt(fn '%s'): old ctx %d\n",
fn ? fn->name : "0x0",
CLG_(current_state).cxt ?
- CLG_(current_state).cxt->base_number : -1);
+ (Int)CLG_(current_state).cxt->base_number : -1);
/* save old context on stack (even if not changed at all!) */
CLG_ASSERT(cs->sp < cs->size);
@@ -294,7 +294,7 @@
/* resizing needed ? */
fn_entries = CLG_(current_fn_stack).top - CLG_(current_fn_stack).bottom;
if (fn_entries == CLG_(current_fn_stack).size-1) {
- int new_size = CLG_(current_fn_stack).size *2;
+ UInt new_size = CLG_(current_fn_stack).size *2;
fn_node** new_array = (fn_node**) CLG_MALLOC("cl.context.pc.1",
new_size * sizeof(fn_node*));
int i;
@@ -304,7 +304,7 @@
CLG_(current_fn_stack).top = new_array + fn_entries;
CLG_(current_fn_stack).bottom = new_array;
- CLG_DEBUG(0, "Resize Context Stack: %d => %d (pushing '%s')\n",
+ CLG_DEBUG(0, "Resize Context Stack: %u => %u (pushing '%s')\n",
CLG_(current_fn_stack).size, new_size,
fn ? fn->name : "0x0");
@@ -326,7 +326,7 @@
CLG_DEBUG(5, "- push_cxt(fn '%s'): new cxt %d, fn_sp %ld\n",
fn ? fn->name : "0x0",
CLG_(current_state).cxt ?
- CLG_(current_state).cxt->base_number : -1,
+ (Int)CLG_(current_state).cxt->base_number : -1,
CLG_(current_fn_stack).top - CLG_(current_fn_stack).bottom + 0L);
}
Modified: trunk/callgrind/debug.c
==============================================================================
--- trunk/callgrind/debug.c (original)
+++ trunk/callgrind/debug.c Wed Aug 5 20:04:51 2015
@@ -83,9 +83,9 @@
UInt *pactive = CLG_(get_fn_entry)(cxt->fn[0]->number);
CLG_ASSERT(rec_index < cxt->fn[0]->separate_recursions);
- VG_(printf)("Cxt %d" ,cxt->base_number + rec_index);
+ VG_(printf)("Cxt %u" ,cxt->base_number + rec_index);
if (*pactive>0)
- VG_(printf)(" [active=%d]", *pactive);
+ VG_(printf)(" [active=%u]", *pactive);
VG_(printf)(": ");
print_mangled_cxt(cxt, rec_index);
VG_(printf)("\n");
@@ -131,7 +131,7 @@
VG_(printf)("%s +%#lx=%#lx, ",
bb->obj->name + bb->obj->last_slash_pos,
- bb->offset, bb_addr(bb));
+ (UWord)bb->offset, bb_addr(bb));
CLG_(print_cxt)(s+8, bbcc->cxt, bbcc->rec_index);
}
@@ -151,7 +151,7 @@
return;
}
- VG_(printf)("EventSet %d (%d groups, size %d):",
+ VG_(printf)("EventSet %u (%d groups, size %d):",
es->mask, es->count, es->size);
if (es->count == 0) {
@@ -188,7 +188,7 @@
return;
}
if (!c) {
- VG_(printf)("Cost (Null, EventSet %d)\n", es->mask);
+ VG_(printf)("Cost (Null, EventSet %u)\n", es->mask);
return;
}
@@ -297,11 +297,11 @@
obj_node* obj;
if (!bbcc) {
- VG_(printf)("%08x", 0);
+ VG_(printf)("%08x", 0u);
return;
}
- VG_(printf)("%08lx/%c %d:", bb_addr(bbcc->bb),
+ VG_(printf)("%08lx/%c %u:", bb_addr(bbcc->bb),
(bbcc->bb->sect_kind == Vg_SectText) ? 'T' :
(bbcc->bb->sect_kind == Vg_SectData) ? 'D' :
(bbcc->bb->sect_kind == Vg_SectBSS) ? 'B' :
@@ -317,7 +317,7 @@
if (VG_(strcmp)(bbcc->cxt->fn[0]->file->name, "???") !=0) {
VG_(printf)(" %s", bbcc->cxt->fn[0]->file->name);
if ((bbcc->cxt->fn[0] == bbcc->bb->fn) && (bbcc->bb->line>0))
- VG_(printf)(":%d", bbcc->bb->line);
+ VG_(printf)(":%u", bbcc->bb->line);
}
}
@@ -347,7 +347,7 @@
print_indent(s+2);
VG_(printf)("ECounter: sum %llu ", ecounter);
for(i=0; i<bb->cjmp_count; i++) {
- VG_(printf)("[%d]=%llu ",
+ VG_(printf)("[%u]=%llu ",
bb->jmp[i].instr, bbcc->jmp[i].ecounter);
}
VG_(printf)("\n");
@@ -356,7 +356,7 @@
for(i=0; i<bb->instr_count; i++) {
InstrInfo* ii = &(bb->instr[i]);
print_indent(s+2);
- VG_(printf)("[%2d] IOff %2d ecnt %3llu ",
+ VG_(printf)("[%2d] IOff %2u ecnt %3llu ",
i, ii->instr_offset, ecounter);
CLG_(print_cost)(s+5, ii->eventset, bbcc->cost + ii->cost_offset);
@@ -430,7 +430,7 @@
{
BBCC* bbcc;
- CLG_DEBUG(0,"In tid %d [%d] ",
+ CLG_DEBUG(0,"In tid %u [%d] ",
CLG_(current_tid), CLG_(current_call_stack).sp);
bbcc = CLG_(current_state).bbcc;
print_mangled_cxt(CLG_(current_state).cxt,
Modified: trunk/callgrind/dump.c
==============================================================================
--- trunk/callgrind/dump.c (original)
+++ trunk/callgrind/dump.c Wed Aug 5 20:04:51 2015
@@ -129,9 +129,9 @@
if (CLG_(clo).compress_strings) {
CLG_ASSERT(obj_dumped != 0);
if (obj_dumped[obj->number])
- VG_(fprintf)(fp, "%s(%d)\n", prefix, obj->number);
+ VG_(fprintf)(fp, "%s(%u)\n", prefix, obj->number);
else {
- VG_(fprintf)(fp, "%s(%d) %s\n", prefix, obj->number, obj->name);
+ VG_(fprintf)(fp, "%s(%u) %s\n", prefix, obj->number, obj->name);
}
}
else
@@ -155,9 +155,9 @@
if (CLG_(clo).compress_strings) {
CLG_ASSERT(file_dumped != 0);
if (file_dumped[file->number])
- VG_(fprintf)(fp, "%s(%d)\n", prefix, file->number);
+ VG_(fprintf)(fp, "%s(%u)\n", prefix, file->number);
else {
- VG_(fprintf)(fp, "%s(%d) %s\n", prefix, file->number, file->name);
+ VG_(fprintf)(fp, "%s(%u) %s\n", prefix, file->number, file->name);
file_dumped[file->number] = True;
}
}
@@ -174,9 +174,9 @@
if (CLG_(clo).compress_strings) {
CLG_ASSERT(fn_dumped != 0);
if (fn_dumped[fn->number])
- VG_(fprintf)(fp, "(%d)\n", fn->number);
+ VG_(fprintf)(fp, "(%u)\n", fn->number);
else {
- VG_(fprintf)(fp, "(%d) %s\n", fn->number, fn->name);
+ VG_(fprintf)(fp, "(%u) %s\n", fn->number, fn->name);
fn_dumped[fn->number] = True;
}
}
@@ -196,7 +196,7 @@
CLG_ASSERT(cxt_dumped != 0);
if (cxt_dumped[cxt->base_number+rec_index]) {
- VG_(fprintf)(fp, "%s=(%d)\n",
+ VG_(fprintf)(fp, "%s=(%u)\n",
tag, cxt->base_number + rec_index);
return;
}
@@ -216,13 +216,13 @@
/* If the last context was the context to print, we are finished */
if ((last == cxt) && (rec_index == 0)) return;
- VG_(fprintf)(fp, "%s=(%d) (%d)", tag,
+ VG_(fprintf)(fp, "%s=(%u) (%u)", tag,
cxt->base_number + rec_index,
cxt->fn[0]->pure_cxt->base_number);
if (rec_index >0)
VG_(fprintf)(fp, "'%d", rec_index +1);
for(i=1;i<cxt->size;i++)
- VG_(fprintf)(fp, "'(%d)",
+ VG_(fprintf)(fp, "'(%u)",
cxt->fn[i]->pure_cxt->base_number);
VG_(fprintf)(fp, "\n");
@@ -235,11 +235,11 @@
if (CLG_(clo).compress_strings) {
CLG_ASSERT(cxt_dumped != 0);
if (cxt_dumped[cxt->base_number+rec_index]) {
- VG_(fprintf)(fp, "(%d)\n", cxt->base_number + rec_index);
+ VG_(fprintf)(fp, "(%u)\n", cxt->base_number + rec_index);
return;
}
else {
- VG_(fprintf)(fp, "(%d) ", cxt->base_number + rec_index);
+ VG_(fprintf)(fp, "(%u) ", cxt->base_number + rec_index);
cxt_dumped[cxt->base_number+rec_index] = True;
}
}
@@ -273,7 +273,7 @@
if (!CLG_(clo).mangle_names) {
if (last->rec_index != bbcc->rec_index) {
- VG_(fprintf)(fp, "rec=%d\n\n", bbcc->rec_index);
+ VG_(fprintf)(fp, "rec=%u\n\n", bbcc->rec_index);
last->rec_index = bbcc->rec_index;
last->cxt = 0; /* reprint context */
res = True;
@@ -436,7 +436,7 @@
file_node* func_file)
{
CLG_ASSERT(curr->file != 0);
- CLG_DEBUG(2, " print_apos(file '%s', line %d, bb %#lx, addr %#lx) fnFile '%s'\n",
+ CLG_DEBUG(2, " print_apos(file '%s', line %u, bb %#lx, addr %#lx) fnFile '%s'\n",
curr->file->name, curr->line, curr->bb_addr, curr->addr,
func_file->name);
@@ -451,7 +451,7 @@
if (CLG_(clo).dump_bbs) {
if (curr->line != last->line) {
- VG_(fprintf)(fp, "ln=%d\n", curr->line);
+ VG_(fprintf)(fp, "ln=%u\n", curr->line);
}
}
}
@@ -541,7 +541,7 @@
static void fprint_fcost(VgFile *fp, AddrCost* c, AddrPos* last)
{
CLG_DEBUGIF(3) {
- CLG_DEBUG(2, " print_fcost(file '%s', line %d, bb %#lx, addr %#lx):\n",
+ CLG_DEBUG(2, " print_fcost(file '%s', line %u, bb %#lx, addr %#lx):\n",
c->p.file->name, c->p.line, c->p.bb_addr, c->p.addr);
CLG_(print_cost)(-5, CLG_(sets).full, c->cost);
}
@@ -566,7 +566,7 @@
obj_node* obj;
CLG_DEBUGIF(2) {
- CLG_DEBUG(2, " fprint_jcc (jkind %d)\n", jcc->jmpkind);
+ CLG_DEBUG(2, " fprint_jcc (jkind %d)\n", (Int)jcc->jmpkind);
CLG_(print_jcc)(-10, jcc);
}
@@ -689,7 +689,7 @@
CLG_ASSERT(bbcc->cxt != 0);
CLG_DEBUGIF(1) {
- VG_(printf)("+ fprint_bbcc (Instr %d): ", bb->instr_count);
+ VG_(printf)("+ fprint_bbcc (Instr %u): ", bb->instr_count);
CLG_(print_bbcc)(15, bbcc);
}
@@ -1049,7 +1049,7 @@
e->enter_cost, CLG_(current_state).cost);
bbcc = e->jcc->from;
- CLG_DEBUG(1, " [%2d] (tid %d), added active: %s\n",
+ CLG_DEBUG(1, " [%2d] (tid %u), added active: %s\n",
i,CLG_(current_tid),bbcc->cxt->fn[0]->name);
if (bbcc->ecounter_sum>0 || bbcc->ret_counter>0) {
@@ -1372,11 +1372,11 @@
FnPos lastFnPos;
AddrPos lastAPos;
- CLG_DEBUG(1, "+ print_bbccs(tid %d)\n", CLG_(current_tid));
+ CLG_DEBUG(1, "+ print_bbccs(tid %u)\n", CLG_(current_tid));
VgFile *print_fp = new_dumpfile(CLG_(current_tid), print_trigger);
if (print_fp == NULL) {
- CLG_DEBUG(1, "- print_bbccs(tid %d): No output...\n", CLG_(current_tid));
+ CLG_DEBUG(1, "- print_bbccs(tid %u): No output...\n", CLG_(current_tid));
return;
}
@@ -1419,14 +1419,14 @@
/* FIXME: Specify Object of BB if different to object of fn */
int i;
ULong ecounter = (*p)->ecounter_sum;
- VG_(fprintf)(print_fp, "bb=%#lx ", (*p)->bb->offset);
+ VG_(fprintf)(print_fp, "bb=%#lx ", (UWord)(*p)->bb->offset);
for(i = 0; i<(*p)->bb->cjmp_count;i++) {
- VG_(fprintf)(print_fp, "%d %llu ",
+ VG_(fprintf)(print_fp, "%u %llu ",
(*p)->bb->jmp[i].instr,
ecounter);
ecounter -= (*p)->jmp[i].ecounter;
}
- VG_(fprintf)(print_fp, "%d %llu\n",
+ VG_(fprintf)(print_fp, "%u %llu\n",
(*p)->bb->instr_count,
ecounter);
}
@@ -1443,7 +1443,7 @@
CLG_(copy_cost)( CLG_(sets).full, ti->lastdump_cost,
CLG_(current_state).cost );
- CLG_DEBUG(1, "- print_bbccs(tid %d)\n", CLG_(current_tid));
+ CLG_DEBUG(1, "- print_bbccs(tid %u)\n", CLG_(current_tid));
}
Modified: trunk/callgrind/fn.c
==============================================================================
--- trunk/callgrind/fn.c (original)
+++ trunk/callgrind/fn.c Wed Aug 5 20:04:51 2015
@@ -508,10 +508,10 @@
static HChar buf[32]; // for sure large enough
/* Use address as found in library */
if (sizeof(Addr) == 4)
- p = VG_(sprintf)(buf, "%#08lx", bb->offset);
+ p = VG_(sprintf)(buf, "%#08lx", (UWord)bb->offset);
else
// 64bit address
- p = VG_(sprintf)(buf, "%#016lx", bb->offset);
+ p = VG_(sprintf)(buf, "%#016lx", (UWord)bb->offset);
VG_(sprintf)(buf + p, "%s",
(bb->sect_kind == Vg_SectData) ? " [Data]" :
@@ -572,7 +572,7 @@
VG_(message)(Vg_DebugMsg, "Symbol match: found runtime_resolve:"
" %s +%#lx=%#lx\n",
bb->obj->name + bb->obj->last_slash_pos,
- bb->offset, bb_addr(bb));
+ (UWord)bb->offset, bb_addr(bb));
}
fn->is_malloc = (VG_(strcmp)(fn->name, "malloc")==0);
@@ -663,12 +663,12 @@
static void resize_fn_array(void)
{
UInt* new_array;
- Int i, newsize;
+ Int i;
- newsize = current_fn_active.size;
+ UInt newsize = current_fn_active.size;
while (newsize <= CLG_(stat).distinct_fns) newsize *=2;
- CLG_DEBUG(0, "Resize fn_active_array: %d => %d\n",
+ CLG_DEBUG(0, "Resize fn_active_array: %u => %u\n",
current_fn_active.size, newsize);
new_array = (UInt*) CLG_MALLOC("cl.fn.rfa.1", newsize * sizeof(UInt));
Modified: trunk/callgrind/jumps.c
==============================================================================
--- trunk/callgrind/jumps.c (original)
+++ trunk/callgrind/jumps.c Wed Aug 5 20:04:51 2015
@@ -119,7 +119,7 @@
VG_(free)(current_jccs.table);
- CLG_DEBUG(0, "Resize JCC Hash: %d => %d (entries %d, conflicts %d/%d)\n",
+ CLG_DEBUG(0, "Resize JCC Hash: %u => %d (entries %u, conflicts %d/%d)\n",
current_jccs.size, new_size,
current_jccs.entries, conflicts1, conflicts2);
@@ -188,7 +188,7 @@
jCC* jcc;
UInt idx;
- CLG_DEBUG(5, "+ get_jcc(bbcc %p/%d => bbcc %p)\n",
+ CLG_DEBUG(5, "+ get_jcc(bbcc %p/%u => bbcc %p)\n",
from, jmp, to);
/* first check last recently used JCC */
Modified: trunk/callgrind/main.c
==============================================================================
--- trunk/callgrind/main.c (original)
+++ trunk/callgrind/main.c Wed Aug 5 20:04:51 2015
@@ -140,7 +140,7 @@
Int fullOffset_Bc;
ULong* cost_Bc;
- CLG_DEBUG(6, "log_cond_branch: Ir %#lx, taken %lu\n",
+ CLG_DEBUG(6, "log_cond_branch: Ir %#lx, taken %ld\n",
CLG_(bb_base) + ii->instr_offset, taken);
miss = 1 & do_cond_branch_predict(CLG_(bb_base) + ii->instr_offset, taken);
@@ -331,23 +331,23 @@
{
switch (ev->tag) {
case Ev_Ir:
- VG_(printf)("Ir (InstrInfo %p) at +%d\n",
+ VG_(printf)("Ir (InstrInfo %p) at +%u\n",
ev->inode, ev->inode->instr_offset);
break;
case Ev_Dr:
- VG_(printf)("Dr (InstrInfo %p) at +%d %d EA=",
+ VG_(printf)("Dr (InstrInfo %p) at +%u %d EA=",
ev->inode, ev->inode->instr_offset, ev->Ev.Dr.szB);
ppIRExpr(ev->Ev.Dr.ea);
VG_(printf)("\n");
break;
case Ev_Dw:
- VG_(printf)("Dw (InstrInfo %p) at +%d %d EA=",
+ VG_(printf)("Dw (InstrInfo %p) at +%u %d EA=",
ev->inode, ev->inode->instr_offset, ev->Ev.Dw.szB);
ppIRExpr(ev->Ev.Dw.ea);
VG_(printf)("\n");
break;
case Ev_Dm:
- VG_(printf)("Dm (InstrInfo %p) at +%d %d EA=",
+ VG_(printf)("Dm (InstrInfo %p) at +%u %d EA=",
ev->inode, ev->inode->instr_offset, ev->Ev.Dm.szB);
ppIRExpr(ev->Ev.Dm.ea);
VG_(printf)("\n");
@@ -1353,7 +1353,7 @@
if (cJumps>0) {
CLG_DEBUG(3, " [ ");
for (i=0;i<cJumps;i++)
- CLG_DEBUG(3, "%d ", clgs.bb->jmp[i].instr);
+ CLG_DEBUG(3, "%u ", clgs.bb->jmp[i].instr);
CLG_DEBUG(3, "], last inverted: %s \n",
clgs.bb->cjmp_inverted ? "yes":"no");
}
@@ -1823,7 +1823,7 @@
CLG_(stat).distinct_contexts);
VG_(message)(Vg_DebugMsg, "Distinct BBs: %d\n",
CLG_(stat).distinct_bbs);
- VG_(message)(Vg_DebugMsg, "Cost entries: %d (Chunks %d)\n",
+ VG_(message)(Vg_DebugMsg, "Cost entries: %u (Chunks %u)\n",
CLG_(costarray_entries), CLG_(costarray_chunks));
VG_(message)(Vg_DebugMsg, "Distinct BBCCs: %d\n",
CLG_(stat).distinct_bbccs);
Modified: trunk/callgrind/sim.c
==============================================================================
--- trunk/callgrind/sim.c (original)
+++ trunk/callgrind/sim.c Wed Aug 5 20:04:51 2015
@@ -305,7 +305,7 @@
return ((res1 == Miss) || (res2 == Miss)) ? Miss : Hit;
} else {
- VG_(printf)("addr: %lx size: %u blocks: %ld %ld",
+ VG_(printf)("addr: %lx size: %u blocks: %lu %lu",
a, size, block1, block2);
VG_(tool_panic)("item straddles more than two cache sets");
}
@@ -413,7 +413,7 @@
return ((res1 == Miss) || (res2 == Miss)) ? Miss : Hit;
} else {
- VG_(printf)("addr: %lx size: %u sets: %d %d", a, size, set1, set2);
+ VG_(printf)("addr: %lx size: %u sets: %u %u", a, size, set1, set2);
VG_(tool_panic)("item straddles more than two cache sets");
}
return Hit;
@@ -666,7 +666,7 @@
CLG_DEBUG(6, "Config %s:\n", c->desc_line);
for(i=0;i<c->line_size;i++) {
CLG_DEBUG(6, " [%2d]: start mask %8x, end mask %8x\n",
- i, c->line_start_mask[i], c->line_end_mask[i]);
+ i, (UInt)c->line_start_mask[i], (UInt)c->line_end_mask[i]);
}
/* We use lower tag bits as offset pointers to cache use info.
@@ -694,7 +694,7 @@
UWord *set, tmp_tag; \
UInt use_mask; \
\
- CLG_DEBUG(6,"%s.Acc(Addr %#lx, size %d): Sets [%d/%d]\n", \
+ CLG_DEBUG(6,"%s.Acc(Addr %#lx, size %d): Sets [%u/%u]\n", \
L.name, a, size, set1, set2); \
\
/* First case: word entirely within line. */ \
@@ -711,7 +711,7 @@
idx = (set1 * L.assoc) + (set[0] & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %u\n",\
idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
return L1_Hit; \
@@ -728,7 +728,7 @@
idx = (set1 * L.assoc) + (tmp_tag & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): %x => %08x, count %u\n",\
i, idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
return L1_Hit; \
@@ -755,7 +755,7 @@
idx = (set1 * L.assoc) + (set[0] & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %u\n",\
idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
goto block2; \
@@ -770,7 +770,7 @@
idx = (set1 * L.assoc) + (tmp_tag & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): %x => %08x, count %u\n",\
i, idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
goto block2; \
@@ -792,7 +792,7 @@
idx = (set2 * L.assoc) + (set[0] & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %u\n",\
idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
return miss1; \
@@ -807,7 +807,7 @@
idx = (set2 * L.assoc) + (tmp_tag & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): %x => %08x, count %u\n",\
i, idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
return miss1; \
@@ -824,7 +824,7 @@
return (miss1==MemAccess || miss2==MemAccess) ? MemAccess:LL_Hit; \
\
} else { \
- VG_(printf)("addr: %#lx size: %u sets: %d %d", a, size, set1, set2); \
+ VG_(printf)("addr: %#lx size: %u sets: %u %u", a, size, set1, set2); \
VG_(tool_panic)("item straddles more than two cache sets"); \
} \
return 0; \
@@ -858,7 +858,7 @@
CLG_DEBUG(2, " LL.miss [%d]: at %#lx accessing memline %#lx\n",
idx, CLG_(bb_base) + current_ii->instr_offset, memline);
if (use->count>0) {
- CLG_DEBUG(2, " old: used %d, loss bits %d (%08x) [line %#lx from %#lx]\n",
+ CLG_DEBUG(2, " old: used %u, loss bits %d (%08x) [line %#lx from %#lx]\n",
use->count, i, use->mask, loaded->memline, loaded->iaddr);
CLG_DEBUG(2, " collect: %d, use_base %p\n",
CLG_(current_state).collect, loaded->use_base);
@@ -889,13 +889,13 @@
int i, j, idx;
UWord tmp_tag;
- CLG_DEBUG(6,"LL.Acc(Memline %#lx): Set %d\n", memline, setNo);
+ CLG_DEBUG(6,"LL.Acc(Memline %#lx): Set %u\n", memline, setNo);
if (tag == (set[0] & LL.tag_mask)) {
idx = (setNo * LL.assoc) + (set[0] & ~LL.tag_mask);
l1_loaded->dep_use = &(LL.use[idx]);
- CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): => %08x, count %d\n",
+ CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): => %08x, count %u\n",
idx, LL.loaded[idx].memline, LL.loaded[idx].iaddr,
LL.use[idx].mask, LL.use[idx].count);
return LL_Hit;
@@ -910,7 +910,7 @@
idx = (setNo * LL.assoc) + (tmp_tag & ~LL.tag_mask);
l1_loaded->dep_use = &(LL.use[idx]);
- CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): => %08x, count %d\n",
+ CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): => %08x, count %u\n",
i, idx, LL.loaded[idx].memline, LL.loaded[idx].iaddr,
LL.use[idx].mask, LL.use[idx].count);
return LL_Hit;
@@ -946,7 +946,7 @@
CLG_DEBUG(2, " %s.miss [%d]: at %#lx accessing memline %#lx (mask %08x)\n", \
cache->name, idx, CLG_(bb_base) + current_ii->instr_offset, memline, mask); \
if (use->count>0) { \
- CLG_DEBUG(2, " old: used %d, loss bits %d (%08x) [line %#lx from %#lx]\n",\
+ CLG_DEBUG(2, " old: used %u, loss bits %d (%08x) [line %#lx from %#lx]\n",\
use->count, c, use->mask, loaded->memline, loaded->iaddr); \
CLG_DEBUG(2, " collect: %d, use_base %p\n", \
CLG_(current_state).collect, loaded->use_base); \
@@ -1165,7 +1165,7 @@
IrRes = (*simulator.I1_Read)(CLG_(bb_base) + ii->instr_offset, ii->instr_size);
DrRes = (*simulator.D1_Read)(data_addr, data_size);
- CLG_DEBUG(6, "log_1I1Dr: Ir %#lx/%u => %s, Dr %#lx/%lu => %s\n",
+ CLG_DEBUG(6, "log_1I1Dr: Ir %#lx/%u => %s, Dr %#lx/%ld => %s\n",
CLG_(bb_base) + ii->instr_offset, ii->instr_size, cacheRes(IrRes),
data_addr, data_size, cacheRes(DrRes));
@@ -1200,7 +1200,7 @@
current_ii = ii;
DrRes = (*simulator.D1_Read)(data_addr, data_size);
- CLG_DEBUG(6, "log_0I1Dr: Dr %#lx/%lu => %s\n",
+ CLG_DEBUG(6, "log_0I1Dr: Dr %#lx/%ld => %s\n",
data_addr, data_size, cacheRes(DrRes));
if (CLG_(current_state).collect) {
@@ -1228,7 +1228,7 @@
IrRes = (*simulator.I1_Read)(CLG_(bb_base) + ii->instr_offset, ii->instr_size);
DwRes = (*simulator.D1_Write)(data_addr, data_size);
- CLG_DEBUG(6, "log_1I1Dw: Ir %#lx/%u => %s, Dw %#lx/%lu => %s\n",
+ CLG_DEBUG(6, "log_1I1Dw: Ir %#lx/%u => %s, Dw %#lx/%ld => %s\n",
CLG_(bb_base) + ii->instr_offset, ii->instr_size, cacheRes(IrRes),
data_addr, data_size, cacheRes(DwRes));
@@ -1260,7 +1260,7 @@
current_ii = ii;
DwRes = (*simulator.D1_Write)(data_addr, data_size);
- CLG_DEBUG(6, "log_0I1Dw: Dw %#lx/%lu => %s\n",
+ CLG_DEBUG(6, "log_0I1Dw: Dw %#lx/%ld => %s\n",
data_addr, data_size, cacheRes(DwRes));
if (CLG_(current_state).collect) {
Modified: trunk/callgrind/threads.c
==============================================================================
--- trunk/callgrind/threads.c (original)
+++ trunk/callgrind/threads.c Wed Aug 5 20:04:51 2015
@@ -131,7 +131,7 @@
{
if (tid == CLG_(current_tid)) return;
- CLG_DEBUG(0, ">> thread %d (was %d)\n", tid, CLG_(current_tid));
+ CLG_DEBUG(0, ">> thread %u (was %u)\n", tid, CLG_(current_tid));
if (CLG_(current_tid) != VG_INVALID_THREADID) {
/* save thread state */
@@ -200,7 +200,7 @@
{
exec_state *es;
- CLG_DEBUG(0, ">> pre_signal(TID %d, sig %d, alt_st %s)\n",
+ CLG_DEBUG(0, ">> pre_signal(TID %u, sig %d, alt_st %s)\n",
tid, sigNum, alt_stack ? "yes":"no");
/* switch to the thread the handler runs in */
@@ -241,7 +241,7 @@
exec_state* es;
UInt fn_number, *pactive;
- CLG_DEBUG(0, ">> post_signal(TID %d, sig %d)\n",
+ CLG_DEBUG(0, ">> post_signal(TID %u, sig %d)\n",
tid, sigNum);
/* thread switching potentially needed, eg. with instrumentation off */
@@ -261,7 +261,7 @@
fn_number = CLG_(current_state).cxt->fn[0]->number;
pactive = CLG_(get_fn_entry)(fn_number);
(*pactive)--;
- CLG_DEBUG(0, " set active count of %s back to %d\n",
+ CLG_DEBUG(0, " set active count of %s back to %u\n",
CLG_(current_state).cxt->fn[0]->name, *pactive);
}
|
|
From: <sv...@va...> - 2015-08-05 17:43:19
|
Author: philippe
Date: Wed Aug 5 18:43:11 2015
New Revision: 15497
Log:
(try to) avoid tc09_bad_unlock random failure
tc09_bad_unlock fails randomly for the following reason:
Thread 1 is creating a lock in a stack variable and locks it.
It then clones a Thread 2 that will unlock this lock.
The test fails if the Thread 2 unlocks the lock while the
main thread is still just after the clone syscall:
There is no unwind info in this area, and so doing a stacktrace
implies a nasty hack (see hg_main.c evh__pre_thread_ll_create).
There is no such hack when describing the address of the lock
(as there is no logic in the 'normal' stack trace to detect we are
in the clone syscall code).
In such a case, the unwind fail, and the lock address description
lacks the frame nr derived from the captured stack trace.
Adding --fair-sched=yes seems to make a more reproducible test.
Note that the proper solution to all these 'racy helgrind regtests'
would be to add some synchronisations operations between threads
that helgrind does not observe (e.g. using a technique similar to
the pipe big lock) and have correct (but invisible to helgrind) synchronisation
between the threads actions needed for a reproducible regtest.
Not very cheap to develop, --fair-sched=try is cheap and easy
so use that till someone courageous implements non visible synchronisation
Modified:
trunk/helgrind/tests/tc09_bad_unlock.vgtest
Modified: trunk/helgrind/tests/tc09_bad_unlock.vgtest
==============================================================================
--- trunk/helgrind/tests/tc09_bad_unlock.vgtest (original)
+++ trunk/helgrind/tests/tc09_bad_unlock.vgtest Wed Aug 5 18:43:11 2015
@@ -1 +1,2 @@
prog: tc09_bad_unlock
+vgopts: --fair-sched=try
|
|
From: Philippe W. <phi...@sk...> - 2015-08-05 16:49:38
|
On Mon, 2015-08-03 at 11:33 +0200, Florian Krohm wrote: > You ought to run "make regtest" when making changes that have the > potential to break stuff. > There are zillions of messages like this one: > > none/tests/tilegx/Makefile.am:1: error: > insn_test_ldnt4u_add_X1.stderr.exp is in EXTRA_DIST but doesn't exist > none/tests/tilegx/Makefile.am:1: error: insn_test_ldnt4u_add_X1.vgtest > is in EXTRA_DIST but doesn't exist > none/tests/tilegx/Makefile.am:1: error: insn_test_ldnt_add_X1.stdout.exp > is in EXTRA_DIST but doesn't exist Hello Zhigang, While we are speaking about missing files ... The tilegx xml files are referenced in coregrind/m_gdbserver/valgrind-low-tilegx.c but are not present in coregrind/m_gdbserver directory and are not mentionned in coregrind/Makefile.am So, could you also add the missing tilegx gdbserver xml files and add them to the Makefile.am 'GDBSERVER_XML_FILES =' ? Thanks Philippe |
|
From: <sv...@va...> - 2015-08-05 16:34:48
|
Author: philippe
Date: Wed Aug 5 17:34:41 2015
New Revision: 15496
Log:
Fix typo: add missing space between $(AM_CFLAGS) and @FLAG_FSANITIZE@
(spotted by Bart and Florian).
Modified:
trunk/none/tests/Makefile.am
Modified: trunk/none/tests/Makefile.am
==============================================================================
--- trunk/none/tests/Makefile.am (original)
+++ trunk/none/tests/Makefile.am Wed Aug 5 17:34:41 2015
@@ -276,7 +276,7 @@
nestedfns_CFLAGS = $(AM_CFLAGS)
mq_LDADD = -lrt
endif
-libvex_test_CFLAGS = $(AM_CFLAGS)@FLAG_FSANITIZE@
+libvex_test_CFLAGS = $(AM_CFLAGS) @FLAG_FSANITIZE@
libvex_test_LDADD = ../../VEX/libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a \
@LIB_UBSAN@
libvexmultiarch_test_CFLAGS= $(AM_CFLAGS) @FLAG_FSANITIZE@
|
Author: florian
Date: Wed Aug 5 15:38:57 2015
New Revision: 15495
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/drd/drd_barrier.c
trunk/drd/drd_clientobj.c
trunk/drd/drd_cond.c
trunk/drd/drd_error.c
trunk/drd/drd_hb.c
trunk/drd/drd_load_store.c
trunk/drd/drd_main.c
trunk/drd/drd_mutex.c
trunk/drd/drd_rwlock.c
trunk/drd/drd_segment.c
trunk/drd/drd_semaphore.c
trunk/drd/drd_suppression.c
trunk/drd/drd_thread.c
trunk/drd/drd_vc.c
Modified: trunk/drd/drd_barrier.c
==============================================================================
--- trunk/drd/drd_barrier.c (original)
+++ trunk/drd/drd_barrier.c Wed Aug 5 15:38:57 2015
@@ -259,11 +259,11 @@
if (s_trace_barrier) {
if (reinitialization)
- DRD_(trace_msg)("[%d] barrier_reinit %s 0x%lx count %ld -> %ld",
+ DRD_(trace_msg)("[%u] barrier_reinit %s 0x%lx count %ld -> %ld",
DRD_(thread_get_running_tid)(),
barrier_get_typename(p), barrier, p->count, count);
else
- DRD_(trace_msg)("[%d] barrier_init %s 0x%lx",
+ DRD_(trace_msg)("[%u] barrier_init %s 0x%lx",
DRD_(thread_get_running_tid)(),
barrier_get_typename(p),
barrier);
@@ -293,7 +293,7 @@
p = DRD_(barrier_get)(barrier);
if (s_trace_barrier)
- DRD_(trace_msg)("[%d] barrier_destroy %s 0x%lx",
+ DRD_(trace_msg)("[%u] barrier_destroy %s 0x%lx",
DRD_(thread_get_running_tid)(),
barrier_get_typename(p), barrier);
@@ -352,7 +352,7 @@
tl_assert(p);
if (s_trace_barrier)
- DRD_(trace_msg)("[%d] barrier_pre_wait %s 0x%lx iteration %ld",
+ DRD_(trace_msg)("[%u] barrier_pre_wait %s 0x%lx iteration %ld",
DRD_(thread_get_running_tid)(),
barrier_get_typename(p), barrier, p->pre_iteration);
@@ -413,7 +413,7 @@
p = DRD_(barrier_get)(barrier);
if (s_trace_barrier)
- DRD_(trace_msg)("[%d] barrier_post_wait %s 0x%lx iteration %ld%s",
+ DRD_(trace_msg)("[%u] barrier_post_wait %s 0x%lx iteration %ld%s",
tid, p ? barrier_get_typename(p) : "(?)",
barrier, p ? p->post_iteration : -1,
serializing ? " (serializing)" : "");
Modified: trunk/drd/drd_clientobj.c
==============================================================================
--- trunk/drd/drd_clientobj.c (original)
+++ trunk/drd/drd_clientobj.c Wed Aug 5 15:38:57 2015
@@ -132,7 +132,7 @@
tl_assert(VG_(OSetGen_Lookup)(s_clientobj_set, &a1) == 0);
if (s_trace_clientobj)
- DRD_(trace_msg)("Adding client object 0x%lx of type %d", a1, t);
+ DRD_(trace_msg)("Adding client object 0x%lx of type %d", a1, (Int)t);
p = VG_(OSetGen_AllocNode)(s_clientobj_set, sizeof(*p));
VG_(memset)(p, 0, sizeof(*p));
@@ -179,7 +179,7 @@
if (s_trace_clientobj) {
DRD_(trace_msg)("Removing client object 0x%lx of type %d", p->any.a1,
- p->any.type);
+ (Int)p->any.type);
#if 0
VG_(get_and_pp_StackTrace)(VG_(get_running_tid)(),
VG_(clo_backtrace_size));
Modified: trunk/drd/drd_cond.c
==============================================================================
--- trunk/drd/drd_cond.c (original)
+++ trunk/drd/drd_cond.c Wed Aug 5 15:38:57 2015
@@ -147,7 +147,7 @@
struct cond_info* p;
if (DRD_(s_trace_cond))
- DRD_(trace_msg)("[%d] cond_init cond 0x%lx",
+ DRD_(trace_msg)("[%u] cond_init cond 0x%lx",
DRD_(thread_get_running_tid)(), cond);
p = DRD_(cond_get)(cond);
@@ -170,7 +170,7 @@
struct cond_info* p;
if (DRD_(s_trace_cond))
- DRD_(trace_msg)("[%d] cond_destroy cond 0x%lx",
+ DRD_(trace_msg)("[%u] cond_destroy cond 0x%lx",
DRD_(thread_get_running_tid)(), cond);
p = DRD_(cond_get)(cond);
@@ -210,7 +210,7 @@
struct mutex_info* q;
if (DRD_(s_trace_cond))
- DRD_(trace_msg)("[%d] cond_pre_wait cond 0x%lx",
+ DRD_(trace_msg)("[%u] cond_pre_wait cond 0x%lx",
DRD_(thread_get_running_tid)(), cond);
p = cond_get_or_allocate(cond);
@@ -271,7 +271,7 @@
struct cond_info* p;
if (DRD_(s_trace_cond))
- DRD_(trace_msg)("[%d] cond_post_wait cond 0x%lx",
+ DRD_(trace_msg)("[%u] cond_post_wait cond 0x%lx",
DRD_(thread_get_running_tid)(), cond);
p = DRD_(cond_get)(cond);
@@ -352,7 +352,7 @@
p = DRD_(cond_get)(cond);
if (DRD_(s_trace_cond))
- DRD_(trace_msg)("[%d] cond_signal cond 0x%lx",
+ DRD_(trace_msg)("[%u] cond_signal cond 0x%lx",
DRD_(thread_get_running_tid)(), cond);
tl_assert(DRD_(pthread_cond_initializer));
@@ -375,7 +375,7 @@
struct cond_info* p;
if (DRD_(s_trace_cond))
- DRD_(trace_msg)("[%d] cond_broadcast cond 0x%lx",
+ DRD_(trace_msg)("[%u] cond_broadcast cond 0x%lx",
DRD_(thread_get_running_tid)(), cond);
p = DRD_(cond_get)(cond);
Modified: trunk/drd/drd_error.c
==============================================================================
--- trunk/drd/drd_error.c (original)
+++ trunk/drd/drd_error.c Wed Aug 5 15:38:57 2015
@@ -199,7 +199,7 @@
describe_malloced_addr(dri->addr, &ai);
}
- print_err_detail("%sConflicting %s by thread %d at 0x%08lx size %ld%s\n",
+ print_err_detail("%sConflicting %s by thread %u at 0x%08lx size %lu%s\n",
what_prefix, dri->access_type == eStore ? "store" : "load",
dri->tid, dri->addr, dri->size, what_suffix);
@@ -316,7 +316,7 @@
MutexErrInfo* p = (MutexErrInfo*)(VG_(get_error_extra)(e));
tl_assert(p);
if (p->recursion_count >= 0) {
- print_err_detail("%s%s: mutex 0x%lx, recursion count %d, owner %d."
+ print_err_detail("%s%s: mutex 0x%lx, recursion count %d, owner %u."
"%s\n", what_prefix, VG_(get_error_string)(e),
p->mutex, p->recursion_count, p->owner, what_suffix);
} else {
@@ -337,7 +337,7 @@
}
case CondDestrErr: {
CondDestrErrInfo* cdi = (CondDestrErrInfo*)(VG_(get_error_extra)(e));
- print_err_detail("%s%s: cond 0x%lx, mutex 0x%lx locked by thread %d%s\n",
+ print_err_detail("%s%s: cond 0x%lx, mutex 0x%lx locked by thread %u%s\n",
what_prefix, VG_(get_error_string)(e), cdi->cond,
cdi->mutex, cdi->owner, what_suffix);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
@@ -384,7 +384,7 @@
if (bei->other_context) {
if (xml)
print_err_detail(" <confl_wait_call>\n");
- print_err_detail("%sConflicting wait call by thread %d:%s\n",
+ print_err_detail("%sConflicting wait call by thread %u:%s\n",
what_prefix, bei->other_tid, what_suffix);
VG_(pp_ExeContext)(bei->other_context);
if (xml)
@@ -413,8 +413,8 @@
VG_(pp_ExeContext)(p->acquired_at);
if (xml)
print_err_detail(" </acquired_at>\n");
- print_err_detail("%sLock on %s 0x%lx was held during %d ms"
- " (threshold: %d ms).%s\n", what_prefix,
+ print_err_detail("%sLock on %s 0x%lx was held during %u ms"
+ " (threshold: %u ms).%s\n", what_prefix,
VG_(get_error_string)(e), p->synchronization_object,
p->hold_time_ms, p->threshold_ms, what_suffix);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
Modified: trunk/drd/drd_hb.c
==============================================================================
--- trunk/drd/drd_hb.c (original)
+++ trunk/drd/drd_hb.c Wed Aug 5 15:38:57 2015
@@ -164,7 +164,7 @@
p = DRD_(hb_get_or_allocate)(hb);
if (DRD_(s_trace_hb))
- DRD_(trace_msg)("[%d] happens_before 0x%lx",
+ DRD_(trace_msg)("[%u] happens_before 0x%lx",
DRD_(thread_get_running_tid)(), hb);
if (!p)
@@ -198,7 +198,7 @@
p = DRD_(hb_get_or_allocate)(hb);
if (DRD_(s_trace_hb))
- DRD_(trace_msg)("[%d] happens_after 0x%lx",
+ DRD_(trace_msg)("[%u] happens_after 0x%lx",
DRD_(thread_get_running_tid)(), hb);
if (!p)
@@ -230,7 +230,7 @@
struct hb_info* p;
if (DRD_(s_trace_hb))
- DRD_(trace_msg)("[%d] happens_done 0x%lx",
+ DRD_(trace_msg)("[%u] happens_done 0x%lx",
DRD_(thread_get_running_tid)(), hb);
p = DRD_(hb_get)(hb);
Modified: trunk/drd/drd_load_store.c
==============================================================================
--- trunk/drd/drd_load_store.c (original)
+++ trunk/drd/drd_load_store.c Wed Aug 5 15:38:57 2015
@@ -103,7 +103,7 @@
vc = DRD_(vc_aprint)(DRD_(thread_get_vc)(DRD_(thread_get_running_tid)()));
if (access_type == eStore && size <= sizeof(HWord)) {
- DRD_(trace_msg_w_bt)("store 0x%lx size %ld val %ld/0x%lx (thread %d /"
+ DRD_(trace_msg_w_bt)("store 0x%lx size %lu val %lu/0x%lx (thread %u /"
" vc %s)", addr, size, stored_value_lo,
stored_value_lo, DRD_(thread_get_running_tid)(),
vc);
@@ -112,11 +112,11 @@
tl_assert(sizeof(HWord) == 4);
sv = ((ULong)stored_value_hi << 32) | stored_value_lo;
- DRD_(trace_msg_w_bt)("store 0x%lx size %ld val %lld/0x%llx (thread %d"
+ DRD_(trace_msg_w_bt)("store 0x%lx size %lu val %llu/0x%llx (thread %u"
" / vc %s)", addr, size, sv, sv,
DRD_(thread_get_running_tid)(), vc);
} else {
- DRD_(trace_msg_w_bt)("%s 0x%lx size %ld (thread %d / vc %s)",
+ DRD_(trace_msg_w_bt)("%s 0x%lx size %lu (thread %u / vc %s)",
access_type == eLoad ? "load "
: access_type == eStore ? "store"
: access_type == eStart ? "start"
Modified: trunk/drd/drd_main.c
==============================================================================
--- trunk/drd/drd_main.c (original)
+++ trunk/drd/drd_main.c Wed Aug 5 15:38:57 2015
@@ -163,7 +163,7 @@
DRD_(start_tracing_address_range)(addr, addr + 1, False);
}
if (ptrace_address) {
- char *plus = VG_(strchr)(ptrace_address, '+');
+ HChar *plus = VG_(strchr)(ptrace_address, '+');
Addr addr, length;
if (plus)
*plus = '\0';
@@ -339,7 +339,7 @@
tl_assert(a1 <= a2);
if (!is_stack_mem && s_trace_alloc)
- DRD_(trace_msg)("Started using memory range 0x%lx + %ld%s",
+ DRD_(trace_msg)("Started using memory range 0x%lx + %lu%s",
a1, len, DRD_(running_thread_inside_pthread_create)()
? " (inside pthread_create())" : "");
@@ -383,7 +383,7 @@
DRD_(trace_mem_access)(a1, len, eEnd, 0, 0);
if (!is_stack_mem && s_trace_alloc)
- DRD_(trace_msg)("Stopped using memory range 0x%lx + %ld",
+ DRD_(trace_msg)("Stopped using memory range 0x%lx + %lu",
a1, len);
if (!is_stack_mem || DRD_(get_check_stack_accesses)())
@@ -430,7 +430,7 @@
const DebugInfo* di;
if (trace_sectsuppr)
- VG_(dmsg)("Evaluating range @ 0x%lx size %ld\n", a, len);
+ VG_(dmsg)("Evaluating range @ 0x%lx size %lu\n", a, len);
for (di = VG_(next_DebugInfo)(0); di; di = VG_(next_DebugInfo)(di)) {
Addr avma;
@@ -451,7 +451,7 @@
if (size > 0 &&
VG_(strcmp)(VG_(DebugInfo_get_soname)(di), "libpthread.so.0") == 0) {
if (trace_sectsuppr)
- VG_(dmsg)("Suppressing .bss @ 0x%lx size %ld\n", avma, size);
+ VG_(dmsg)("Suppressing .bss @ 0x%lx size %lu\n", avma, size);
tl_assert(VG_(DebugInfo_sect_kind)(NULL, avma) == Vg_SectBSS);
DRD_(start_suppression)(avma, avma + size, ".bss");
}
@@ -461,7 +461,7 @@
tl_assert((avma && size) || (avma == 0 && size == 0));
if (size > 0) {
if (trace_sectsuppr)
- VG_(dmsg)("Suppressing .plt @ 0x%lx size %ld\n", avma, size);
+ VG_(dmsg)("Suppressing .plt @ 0x%lx size %lu\n", avma, size);
tl_assert(VG_(DebugInfo_sect_kind)(NULL, avma) == Vg_SectPLT);
DRD_(start_suppression)(avma, avma + size, ".plt");
}
@@ -471,7 +471,7 @@
tl_assert((avma && size) || (avma == 0 && size == 0));
if (size > 0) {
if (trace_sectsuppr)
- VG_(dmsg)("Suppressing .got.plt @ 0x%lx size %ld\n", avma, size);
+ VG_(dmsg)("Suppressing .got.plt @ 0x%lx size %lu\n", avma, size);
tl_assert(VG_(DebugInfo_sect_kind)(NULL, avma) == Vg_SectGOTPLT);
DRD_(start_suppression)(avma, avma + size, ".gotplt");
}
@@ -481,7 +481,7 @@
tl_assert((avma && size) || (avma == 0 && size == 0));
if (size > 0) {
if (trace_sectsuppr)
- VG_(dmsg)("Suppressing .got @ 0x%lx size %ld\n", avma, size);
+ VG_(dmsg)("Suppressing .got @ 0x%lx size %lu\n", avma, size);
tl_assert(VG_(DebugInfo_sect_kind)(NULL, avma) == Vg_SectGOT);
DRD_(start_suppression)(avma, avma + size, ".got");
}
@@ -643,7 +643,7 @@
}
if (DRD_(thread_get_trace_fork_join)())
{
- DRD_(trace_msg)("drd_pre_thread_create creator = %d, created = %d",
+ DRD_(trace_msg)("drd_pre_thread_create creator = %u, created = %u",
drd_creator, created);
}
}
@@ -668,7 +668,7 @@
if (DRD_(thread_get_trace_fork_join)())
{
- DRD_(trace_msg)("drd_post_thread_create created = %d", drd_created);
+ DRD_(trace_msg)("drd_post_thread_create created = %u", drd_created);
}
if (! DRD_(get_check_stack_accesses)())
{
@@ -695,7 +695,7 @@
tl_assert(drd_tid != DRD_INVALID_THREADID);
if (DRD_(thread_get_trace_fork_join)())
{
- DRD_(trace_msg)("drd_thread_finished tid = %d%s", drd_tid,
+ DRD_(trace_msg)("drd_thread_finished tid = %u%s", drd_tid,
DRD_(thread_get_joinable)(drd_tid)
? "" : " (which is a detached thread)");
}
@@ -705,8 +705,8 @@
= (DRD_(thread_get_stack_max)(drd_tid)
- DRD_(thread_get_stack_min_min)(drd_tid));
VG_(message)(Vg_UserMsg,
- "thread %d%s finished and used %ld bytes out of %ld"
- " on its stack. Margin: %ld bytes.\n",
+ "thread %u%s finished and used %lu bytes out of %lu"
+ " on its stack. Margin: %lu bytes.\n",
drd_tid,
DRD_(thread_get_joinable)(drd_tid)
? "" : " (which is a detached thread)",
@@ -774,47 +774,47 @@
ULong pu_join = DRD_(thread_get_update_conflict_set_join_count)();
VG_(message)(Vg_UserMsg,
- " thread: %lld context switches.\n",
+ " thread: %llu context switches.\n",
DRD_(thread_get_context_switch_count)());
VG_(message)(Vg_UserMsg,
- "confl set: %lld full updates and %lld partial updates;\n",
+ "confl set: %llu full updates and %llu partial updates;\n",
DRD_(thread_get_compute_conflict_set_count)(),
pu);
VG_(message)(Vg_UserMsg,
- " %lld partial updates during segment creation,\n",
+ " %llu partial updates during segment creation,\n",
pu_seg_cr);
VG_(message)(Vg_UserMsg,
- " %lld because of mutex/sema/cond.var. operations,\n",
+ " %llu because of mutex/sema/cond.var. operations,\n",
pu_mtx_cv);
VG_(message)(Vg_UserMsg,
- " %lld because of barrier/rwlock operations and\n",
+ " %llu because of barrier/rwlock operations and\n",
pu - pu_seg_cr - pu_mtx_cv - pu_join);
VG_(message)(Vg_UserMsg,
- " %lld partial updates because of thread join"
+ " %llu partial updates because of thread join"
" operations.\n",
pu_join);
VG_(message)(Vg_UserMsg,
- " segments: created %lld segments, max %lld alive,\n",
+ " segments: created %llu segments, max %llu alive,\n",
DRD_(sg_get_segments_created_count)(),
DRD_(sg_get_max_segments_alive_count)());
VG_(message)(Vg_UserMsg,
- " %lld discard points and %lld merges.\n",
+ " %llu discard points and %llu merges.\n",
DRD_(thread_get_discard_ordered_segments_count)(),
DRD_(sg_get_segment_merge_count)());
VG_(message)(Vg_UserMsg,
- "segmnt cr: %lld mutex, %lld rwlock, %lld semaphore and"
- " %lld barrier.\n",
+ "segmnt cr: %llu mutex, %llu rwlock, %llu semaphore and"
+ " %llu barrier.\n",
DRD_(get_mutex_segment_creation_count)(),
DRD_(get_rwlock_segment_creation_count)(),
DRD_(get_semaphore_segment_creation_count)(),
DRD_(get_barrier_segment_creation_count)());
VG_(message)(Vg_UserMsg,
- " bitmaps: %lld level one"
- " and %lld level two bitmaps were allocated.\n",
+ " bitmaps: %llu level one"
+ " and %llu level two bitmaps were allocated.\n",
DRD_(bm_get_bitmap_creation_count)(),
DRD_(bm_get_bitmap2_creation_count)());
VG_(message)(Vg_UserMsg,
- " mutex: %lld non-recursive lock/unlock events.\n",
+ " mutex: %llu non-recursive lock/unlock events.\n",
DRD_(get_mutex_lock_count)());
DRD_(print_malloc_stats)();
}
Modified: trunk/drd/drd_mutex.c
==============================================================================
--- trunk/drd/drd_mutex.c (original)
+++ trunk/drd/drd_mutex.c Wed Aug 5 15:38:57 2015
@@ -88,7 +88,7 @@
struct mutex_info* p = DRD_(mutex_get)(mutex);
if (s_trace_mutex)
- DRD_(trace_msg)("[%d] mutex_ignore_ordering %s 0x%lx",
+ DRD_(trace_msg)("[%u] mutex_ignore_ordering %s 0x%lx",
DRD_(thread_get_running_tid)(),
p ? DRD_(mutex_type_name)(p->mutex_type) : "(?)",
mutex);
@@ -106,7 +106,7 @@
tl_assert(p);
if (s_trace_mutex)
- DRD_(trace_msg)("[%d] mutex_destroy %s 0x%lx rc %d owner %d",
+ DRD_(trace_msg)("[%u] mutex_destroy %s 0x%lx rc %d owner %u",
DRD_(thread_get_running_tid)(),
DRD_(mutex_get_typename)(p), p->a1,
p ? p->recursion_count : -1,
@@ -197,7 +197,7 @@
struct mutex_info* p;
if (s_trace_mutex)
- DRD_(trace_msg)("[%d] mutex_init %s 0x%lx",
+ DRD_(trace_msg)("[%u] mutex_init %s 0x%lx",
DRD_(thread_get_running_tid)(),
DRD_(mutex_type_name)(mutex_type),
mutex);
@@ -258,7 +258,7 @@
mutex_type = p->mutex_type;
if (s_trace_mutex)
- DRD_(trace_msg)("[%d] %s %s 0x%lx rc %d owner %d",
+ DRD_(trace_msg)("[%u] %s %s 0x%lx rc %d owner %u",
DRD_(thread_get_running_tid)(),
trylock ? "pre_mutex_lock " : "mutex_trylock ",
p ? DRD_(mutex_get_typename)(p) : "(?)",
@@ -308,7 +308,7 @@
p = DRD_(mutex_get)(mutex);
if (s_trace_mutex)
- DRD_(trace_msg)("[%d] %s %s 0x%lx rc %d owner %d%s",
+ DRD_(trace_msg)("[%u] %s %s 0x%lx rc %d owner %u%s",
drd_tid,
post_cond_wait ? "cond_post_wait " : "post_mutex_lock",
p ? DRD_(mutex_get_typename)(p) : "(?)",
@@ -374,7 +374,7 @@
mutex_type = p->mutex_type;
if (s_trace_mutex) {
- DRD_(trace_msg)("[%d] mutex_unlock %s 0x%lx rc %d",
+ DRD_(trace_msg)("[%u] mutex_unlock %s 0x%lx rc %d",
drd_tid, p ? DRD_(mutex_get_typename)(p) : "(?)",
mutex, p ? p->recursion_count : 0);
}
Modified: trunk/drd/drd_rwlock.c
==============================================================================
--- trunk/drd/drd_rwlock.c (original)
+++ trunk/drd/drd_rwlock.c Wed Aug 5 15:38:57 2015
@@ -244,7 +244,7 @@
tl_assert(p);
if (DRD_(s_trace_rwlock))
- DRD_(trace_msg)("[%d] rwlock_destroy 0x%lx",
+ DRD_(trace_msg)("[%u] rwlock_destroy 0x%lx",
DRD_(thread_get_running_tid)(), p->a1);
if (DRD_(rwlock_is_locked)(p))
@@ -313,7 +313,7 @@
struct rwlock_info* p;
if (DRD_(s_trace_rwlock))
- DRD_(trace_msg)("[%d] rwlock_init 0x%lx",
+ DRD_(trace_msg)("[%u] rwlock_init 0x%lx",
DRD_(thread_get_running_tid)(), rwlock);
p = DRD_(rwlock_get)(rwlock);
@@ -374,7 +374,7 @@
struct rwlock_info* p;
if (DRD_(s_trace_rwlock))
- DRD_(trace_msg)("[%d] pre_rwlock_rdlock 0x%lx",
+ DRD_(trace_msg)("[%u] pre_rwlock_rdlock 0x%lx",
DRD_(thread_get_running_tid)(), rwlock);
p = DRD_(rwlock_get_or_allocate)(rwlock, rwlock_type);
@@ -403,7 +403,7 @@
struct rwlock_thread_info* q;
if (DRD_(s_trace_rwlock))
- DRD_(trace_msg)("[%d] post_rwlock_rdlock 0x%lx", drd_tid, rwlock);
+ DRD_(trace_msg)("[%u] post_rwlock_rdlock 0x%lx", drd_tid, rwlock);
p = DRD_(rwlock_get)(rwlock);
@@ -437,7 +437,7 @@
p = DRD_(rwlock_get)(rwlock);
if (DRD_(s_trace_rwlock))
- DRD_(trace_msg)("[%d] pre_rwlock_wrlock 0x%lx",
+ DRD_(trace_msg)("[%u] pre_rwlock_wrlock 0x%lx",
DRD_(thread_get_running_tid)(), rwlock);
if (p == 0)
@@ -471,7 +471,7 @@
p = DRD_(rwlock_get)(rwlock);
if (DRD_(s_trace_rwlock))
- DRD_(trace_msg)("[%d] post_rwlock_wrlock 0x%lx", drd_tid, rwlock);
+ DRD_(trace_msg)("[%u] post_rwlock_wrlock 0x%lx", drd_tid, rwlock);
if (! p || ! took_lock)
return;
@@ -506,7 +506,7 @@
struct rwlock_thread_info* q;
if (DRD_(s_trace_rwlock))
- DRD_(trace_msg)("[%d] rwlock_unlock 0x%lx", drd_tid, rwlock);
+ DRD_(trace_msg)("[%u] rwlock_unlock 0x%lx", drd_tid, rwlock);
p = DRD_(rwlock_get)(rwlock);
if (p == 0)
Modified: trunk/drd/drd_segment.c
==============================================================================
--- trunk/drd/drd_segment.c (original)
+++ trunk/drd/drd_segment.c Wed Aug 5 15:38:57 2015
@@ -97,7 +97,7 @@
HChar* vc;
vc = DRD_(vc_aprint)(&sg->vc);
- VG_(message)(Vg_DebugMsg, "New segment for thread %d with vc %s\n",
+ VG_(message)(Vg_DebugMsg, "New segment for thread %u with vc %s\n",
created, vc);
VG_(free)(vc);
}
Modified: trunk/drd/drd_semaphore.c
==============================================================================
--- trunk/drd/drd_semaphore.c (original)
+++ trunk/drd/drd_semaphore.c Wed Aug 5 15:38:57 2015
@@ -174,7 +174,7 @@
Segment* sg;
if (s_trace_semaphore)
- DRD_(trace_msg)("[%d] sem_init 0x%lx value %u",
+ DRD_(trace_msg)("[%u] sem_init 0x%lx value %u",
DRD_(thread_get_running_tid)(), semaphore, value);
p = semaphore_get(semaphore);
@@ -222,7 +222,7 @@
p = semaphore_get(semaphore);
if (s_trace_semaphore)
- DRD_(trace_msg)("[%d] sem_destroy 0x%lx value %u",
+ DRD_(trace_msg)("[%u] sem_destroy 0x%lx value %u",
DRD_(thread_get_running_tid)(), semaphore,
p ? p->value : 0);
@@ -252,10 +252,10 @@
Segment* sg;
if (s_trace_semaphore)
- DRD_(trace_msg)("[%d] sem_open 0x%lx name %s"
+ DRD_(trace_msg)("[%u] sem_open 0x%lx name %s"
" oflag %#lx mode %#lo value %u",
DRD_(thread_get_running_tid)(),
- semaphore, name, oflag, mode, value);
+ semaphore, name, (UWord)oflag, (UWord)mode, value);
/* Return if the sem_open() call failed. */
if (! semaphore)
@@ -295,7 +295,7 @@
p = semaphore_get(semaphore);
if (s_trace_semaphore)
- DRD_(trace_msg)("[%d] sem_close 0x%lx value %u",
+ DRD_(trace_msg)("[%u] sem_close 0x%lx value %u",
DRD_(thread_get_running_tid)(), semaphore,
p ? p->value : 0);
@@ -350,7 +350,7 @@
tl_assert(waited == 0 || waited == 1);
p = semaphore_get(semaphore);
if (s_trace_semaphore)
- DRD_(trace_msg)("[%d] sem_wait 0x%lx value %u -> %u%s",
+ DRD_(trace_msg)("[%u] sem_wait 0x%lx value %u -> %u%s",
DRD_(thread_get_running_tid)(), semaphore,
p ? p->value : 0, p ? p->value - waited : 0,
waited ? "" : " (did not wait)");
@@ -409,7 +409,7 @@
p->value++;
if (s_trace_semaphore)
- DRD_(trace_msg)("[%d] sem_post 0x%lx value %u -> %u",
+ DRD_(trace_msg)("[%u] sem_post 0x%lx value %u -> %u",
DRD_(thread_get_running_tid)(),
semaphore, p->value - 1, p->value);
Modified: trunk/drd/drd_suppression.c
==============================================================================
--- trunk/drd/drd_suppression.c (original)
+++ trunk/drd/drd_suppression.c Wed Aug 5 15:38:57 2015
@@ -63,7 +63,7 @@
const HChar* const reason)
{
if (s_trace_suppression)
- VG_(message)(Vg_DebugMsg, "start suppression of 0x%lx sz %ld (%s)\n",
+ VG_(message)(Vg_DebugMsg, "start suppression of 0x%lx sz %lu (%s)\n",
a1, a2 - a1, reason);
tl_assert(a1 <= a2);
@@ -73,7 +73,7 @@
void DRD_(finish_suppression)(const Addr a1, const Addr a2)
{
if (s_trace_suppression) {
- VG_(message)(Vg_DebugMsg, "finish suppression of 0x%lx sz %ld\n",
+ VG_(message)(Vg_DebugMsg, "finish suppression of 0x%lx sz %lu\n",
a1, a2 - a1);
VG_(get_and_pp_StackTrace)(VG_(get_running_tid)(), 12);
}
@@ -122,7 +122,7 @@
tl_assert(a1 <= a2);
if (s_trace_suppression)
- VG_(message)(Vg_DebugMsg, "start_tracing(0x%lx, %ld) %s\n",
+ VG_(message)(Vg_DebugMsg, "start_tracing(0x%lx, %lu) %s\n",
a1, a2 - a1, persistent ? "persistent" : "non-persistent");
DRD_(bm_access_range_load)(s_traced, a1, a2);
@@ -140,7 +140,7 @@
tl_assert(a1 <= a2);
if (s_trace_suppression)
- VG_(message)(Vg_DebugMsg, "stop_tracing(0x%lx, %ld)\n",
+ VG_(message)(Vg_DebugMsg, "stop_tracing(0x%lx, %lu)\n",
a1, a2 - a1);
if (DRD_(g_any_address_traced)) {
@@ -165,7 +165,7 @@
for (b = a1; b < a2; b++) {
if (DRD_(bm_has_1)(s_suppressed, b, eStore)) {
VG_(message)(Vg_DebugMsg,
- "stop_using_mem(0x%lx, %ld) finish suppression of"
+ "stop_using_mem(0x%lx, %lu) finish suppression of"
" 0x%lx\n", a1, a2 - a1, b);
}
}
Modified: trunk/drd/drd_thread.c
==============================================================================
--- trunk/drd/drd_thread.c (original)
+++ trunk/drd/drd_thread.c Wed Aug 5 15:38:57 2015
@@ -408,7 +408,7 @@
msg = VG_(malloc)("drd.main.dptj.1", msg_size);
VG_(snprintf)(msg, msg_size,
- "drd_post_thread_join joiner = %d, joinee = %d",
+ "drd_post_thread_join joiner = %u, joinee = %u",
drd_joiner, drd_joinee);
if (joiner)
{
@@ -595,7 +595,7 @@
tl_assert(DRD_(g_threadinfo)[tid].pt_threadid != INVALID_POSIX_THREADID);
if (DRD_(thread_get_trace_fork_join)())
- DRD_(trace_msg)("[%d] drd_thread_pre_cancel %d",
+ DRD_(trace_msg)("[%u] drd_thread_pre_cancel %u",
DRD_(g_drd_running_tid), tid);
}
@@ -730,12 +730,12 @@
if (name == NULL || name[0] == 0)
VG_(snprintf)(DRD_(g_threadinfo)[tid].name,
sizeof(DRD_(g_threadinfo)[tid].name),
- "Thread %d",
+ "Thread %u",
tid);
else
VG_(snprintf)(DRD_(g_threadinfo)[tid].name,
sizeof(DRD_(g_threadinfo)[tid].name),
- "Thread %d (%s)",
+ "Thread %u (%s)",
tid, name);
DRD_(g_threadinfo)[tid].name[sizeof(DRD_(g_threadinfo)[tid].name) - 1] = 0;
}
@@ -774,7 +774,7 @@
&& DRD_(g_drd_running_tid) != DRD_INVALID_THREADID)
{
VG_(message)(Vg_DebugMsg,
- "Context switch from thread %d to thread %d;"
+ "Context switch from thread %u to thread %u;"
" segments: %llu\n",
DRD_(g_drd_running_tid), drd_tid,
DRD_(sg_get_segments_alive_count)());
@@ -1221,7 +1221,7 @@
HChar *str1, *str2;
str1 = DRD_(vc_aprint)(&old_vc);
str2 = DRD_(vc_aprint)(DRD_(thread_get_vc)(tid));
- VG_(message)(Vg_DebugMsg, "thread %d: vc %s -> %s\n", tid, str1, str2);
+ VG_(message)(Vg_DebugMsg, "thread %u: vc %s -> %s\n", tid, str1, str2);
VG_(free)(str1);
VG_(free)(str2);
}
@@ -1304,7 +1304,7 @@
*/
void DRD_(thread_print_all)(void)
{
- unsigned i;
+ UInt i;
Segment* p;
for (i = 0; i < DRD_N_THREADS; i++)
@@ -1312,7 +1312,7 @@
p = DRD_(g_threadinfo)[i].sg_first;
if (p) {
VG_(printf)("**************\n"
- "* thread %3d (%d/%d/%d/%d/0x%lx/%d) *\n"
+ "* thread %3u (%d/%u/%u/%u/0x%lx/%d) *\n"
"**************\n",
i,
DRD_(g_threadinfo)[i].valid,
@@ -1381,14 +1381,14 @@
VG_(printf_xml)(" <other_segment_start>\n");
else
VG_(message)(Vg_UserMsg,
- "Other segment start (thread %d)\n", i);
+ "Other segment start (thread %u)\n", i);
show_call_stack(i, q->stacktrace);
if (VG_(clo_xml))
VG_(printf_xml)(" </other_segment_start>\n"
" <other_segment_end>\n");
else
VG_(message)(Vg_UserMsg,
- "Other segment end (thread %d)\n", i);
+ "Other segment end (thread %u)\n", i);
q_next = q->thr_next;
show_call_stack(i, q_next ? q_next->stacktrace : 0);
if (VG_(clo_xml))
@@ -1477,7 +1477,7 @@
str = DRD_(vc_aprint)(DRD_(thread_get_vc)(tid));
VG_(message)(Vg_DebugMsg,
- "computing conflict set for thread %d with vc %s\n",
+ "computing conflict set for thread %u with vc %s\n",
tid, str);
VG_(free)(str);
}
@@ -1490,7 +1490,7 @@
HChar* vc;
vc = DRD_(vc_aprint)(&p->vc);
- VG_(message)(Vg_DebugMsg, "conflict set: thread [%d] at vc %s\n",
+ VG_(message)(Vg_DebugMsg, "conflict set: thread [%u] at vc %s\n",
tid, vc);
VG_(free)(vc);
}
@@ -1507,7 +1507,7 @@
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
- "conflict set: [%d] merging segment %s\n",
+ "conflict set: [%u] merging segment %s\n",
j, str);
VG_(free)(str);
}
@@ -1518,7 +1518,7 @@
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
- "conflict set: [%d] ignoring segment %s\n",
+ "conflict set: [%u] ignoring segment %s\n",
j, str);
VG_(free)(str);
}
@@ -1534,9 +1534,9 @@
+= DRD_(bm_get_bitmap2_creation_count)();
if (s_trace_conflict_set_bm) {
- VG_(message)(Vg_DebugMsg, "[%d] new conflict set:\n", tid);
+ VG_(message)(Vg_DebugMsg, "[%u] new conflict set:\n", tid);
DRD_(bm_print)(*conflict_set);
- VG_(message)(Vg_DebugMsg, "[%d] end of new conflict set.\n", tid);
+ VG_(message)(Vg_DebugMsg, "[%u] end of new conflict set.\n", tid);
}
}
@@ -1563,7 +1563,7 @@
str = DRD_(vc_aprint)(DRD_(thread_get_vc)(tid));
VG_(message)(Vg_DebugMsg,
- "updating conflict set for thread %d with vc %s\n",
+ "updating conflict set for thread %u with vc %s\n",
tid, str);
VG_(free)(str);
}
@@ -1593,7 +1593,7 @@
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
- "conflict set: [%d] %s segment %s\n", j,
+ "conflict set: [%u] %s segment %s\n", j,
included_in_old_conflict_set
!= included_in_new_conflict_set
? "merging" : "ignoring", str);
@@ -1615,7 +1615,7 @@
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
- "conflict set: [%d] %s segment %s\n", j,
+ "conflict set: [%u] %s segment %s\n", j,
included_in_old_conflict_set
!= included_in_new_conflict_set
? "merging" : "ignoring", str);
@@ -1647,9 +1647,9 @@
if (s_trace_conflict_set_bm)
{
- VG_(message)(Vg_DebugMsg, "[%d] updated conflict set:\n", tid);
+ VG_(message)(Vg_DebugMsg, "[%u] updated conflict set:\n", tid);
DRD_(bm_print)(DRD_(g_conflict_set));
- VG_(message)(Vg_DebugMsg, "[%d] end of updated conflict set.\n", tid);
+ VG_(message)(Vg_DebugMsg, "[%u] end of updated conflict set.\n", tid);
}
tl_assert(thread_conflict_set_up_to_date(DRD_(g_drd_running_tid)));
Modified: trunk/drd/drd_vc.c
==============================================================================
--- trunk/drd/drd_vc.c (original)
+++ trunk/drd/drd_vc.c Wed Aug 5 15:38:57 2015
@@ -277,7 +277,7 @@
return str;
}
size += VG_(snprintf)(str + size, reserved - size,
- "%s %d: %d", i > 0 ? "," : "",
+ "%s %u: %u", i > 0 ? "," : "",
vc->vc[i].threadid, vc->vc[i].count);
}
size += VG_(snprintf)(str + size, reserved - size, " ]");
|
|
From: <sv...@va...> - 2015-08-05 13:47:05
|
Author: florian
Date: Wed Aug 5 14:46:58 2015
New Revision: 15494
Log:
Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
Modified:
trunk/cachegrind/cg_arch.c
trunk/cachegrind/cg_main.c
trunk/cachegrind/cg_sim.c
Modified: trunk/cachegrind/cg_arch.c
==============================================================================
--- trunk/cachegrind/cg_arch.c (original)
+++ trunk/cachegrind/cg_arch.c Wed Aug 5 14:46:58 2015
@@ -382,7 +382,7 @@
}
VG_(dmsg)("warning: Pentium 4 with %u KB micro-op instruction trace cache\n",
i1->sizeB / 1024);
- VG_(dmsg)(" Simulating a %d KB I-cache with %d B lines\n",
+ VG_(dmsg)(" Simulating a %u KB I-cache with %u B lines\n",
adjusted_size / 1024, guessed_line_size);
*I1c = (cache_t) { adjusted_size, i1->assoc, guessed_line_size };
Modified: trunk/cachegrind/cg_main.c
==============================================================================
--- trunk/cachegrind/cg_main.c (original)
+++ trunk/cachegrind/cg_main.c Wed Aug 5 14:46:58 2015
@@ -1456,7 +1456,7 @@
// Print the LineCC
if (clo_cache_sim && clo_branch_sim) {
- VG_(fprintf)(fp, "%u %llu %llu %llu"
+ VG_(fprintf)(fp, "%d %llu %llu %llu"
" %llu %llu %llu"
" %llu %llu %llu"
" %llu %llu %llu %llu\n",
@@ -1468,7 +1468,7 @@
lineCC->Bi.b, lineCC->Bi.mp);
}
else if (clo_cache_sim && !clo_branch_sim) {
- VG_(fprintf)(fp, "%u %llu %llu %llu"
+ VG_(fprintf)(fp, "%d %llu %llu %llu"
" %llu %llu %llu"
" %llu %llu %llu\n",
lineCC->loc.line,
@@ -1477,7 +1477,7 @@
lineCC->Dw.a, lineCC->Dw.m1, lineCC->Dw.mL);
}
else if (!clo_cache_sim && clo_branch_sim) {
- VG_(fprintf)(fp, "%u %llu"
+ VG_(fprintf)(fp, "%d %llu"
" %llu %llu %llu %llu\n",
lineCC->loc.line,
lineCC->Ir.a,
@@ -1485,7 +1485,7 @@
lineCC->Bi.b, lineCC->Bi.mp);
}
else {
- VG_(fprintf)(fp, "%u %llu\n",
+ VG_(fprintf)(fp, "%d %llu\n",
lineCC->loc.line,
lineCC->Ir.a);
}
Modified: trunk/cachegrind/cg_sim.c
==============================================================================
--- trunk/cachegrind/cg_sim.c (original)
+++ trunk/cachegrind/cg_sim.c Wed Aug 5 14:46:58 2015
@@ -155,7 +155,7 @@
}
return cachesim_setref_is_miss(c, set2, tag2);
}
- VG_(printf)("addr: %lx size: %u blocks: %ld %ld",
+ VG_(printf)("addr: %lx size: %u blocks: %lu %lu",
a, size, block1, block2);
VG_(tool_panic)("item straddles more than two cache sets");
/* not reached */
|
|
From: <sv...@va...> - 2015-08-05 13:26:05
|
Author: florian
Date: Wed Aug 5 14:25:58 2015
New Revision: 15493
Log:
Add a comment.
Modified:
trunk/coregrind/m_xarray.c
Modified: trunk/coregrind/m_xarray.c
==============================================================================
--- trunk/coregrind/m_xarray.c (original)
+++ trunk/coregrind/m_xarray.c Wed Aug 5 14:25:58 2015
@@ -278,6 +278,9 @@
return VG_(lookupXA_UNSAFE)(xa, key, first, last, xa->cmpFn);
}
+/* FIXME: This function should return an unsigned value because the number
+ of elements cannot be negative. Unfortunately, making the change causes
+ a lot of ripple. */
Word VG_(sizeXA) ( const XArray* xa )
{
vg_assert(xa);
|
|
From: <sv...@va...> - 2015-08-05 13:23:20
|
Author: florian
Date: Wed Aug 5 14:23:11 2015
New Revision: 15492
Log:
The number of elements in a RangeMap cannot be negative.
Let the return type of VG_(sizeRangeMap) reflect that.
Modified:
trunk/coregrind/m_rangemap.c
trunk/include/pub_tool_rangemap.h
trunk/memcheck/mc_main.c
Modified: trunk/coregrind/m_rangemap.c
==============================================================================
--- trunk/coregrind/m_rangemap.c (original)
+++ trunk/coregrind/m_rangemap.c Wed Aug 5 14:23:11 2015
@@ -123,10 +123,12 @@
*val = rng->val;
}
-Word VG_(sizeRangeMap) ( const RangeMap* rm )
+UInt VG_(sizeRangeMap) ( const RangeMap* rm )
{
vg_assert(rm && rm->ranges);
- return VG_(sizeXA)(rm->ranges);
+ Word size = VG_(sizeXA)(rm->ranges);
+ vg_assert(size >= 0);
+ return size;
}
void VG_(indexRangeMap) ( /*OUT*/UWord* key_min, /*OUT*/UWord* key_max,
Modified: trunk/include/pub_tool_rangemap.h
==============================================================================
--- trunk/include/pub_tool_rangemap.h (original)
+++ trunk/include/pub_tool_rangemap.h Wed Aug 5 14:23:11 2015
@@ -71,7 +71,7 @@
/*OUT*/UWord* val, const RangeMap* rm, UWord key );
/* How many elements are there in the map? */
-Word VG_(sizeRangeMap) ( const RangeMap* rm );
+UInt VG_(sizeRangeMap) ( const RangeMap* rm );
/* Get the i'th component */
void VG_(indexRangeMap) ( /*OUT*/UWord* key_min, /*OUT*/UWord* key_max,
Modified: trunk/memcheck/mc_main.c
==============================================================================
--- trunk/memcheck/mc_main.c (original)
+++ trunk/memcheck/mc_main.c Wed Aug 5 14:23:11 2015
@@ -1177,17 +1177,17 @@
(void*)start, (void*)(start+len-1));
}
if (verbose) {
- VG_(dmsg)("memcheck: now have %ld ranges:\n",
+ VG_(dmsg)("memcheck: now have %u ranges:\n",
VG_(sizeRangeMap)(gIgnoredAddressRanges));
- Word i;
+ UInt i;
for (i = 0; i < VG_(sizeRangeMap)(gIgnoredAddressRanges); i++) {
UWord val = IAR_INVALID;
UWord key_min = ~(UWord)0;
UWord key_max = (UWord)0;
VG_(indexRangeMap)( &key_min, &key_max, &val,
gIgnoredAddressRanges, i );
- VG_(dmsg)("memcheck: [%ld] %016llx-%016llx %s\n",
- i, (ULong)key_min, (ULong)key_max, showIARKind(val));
+ VG_(dmsg)("memcheck: [%u] %016lx-%016lx %s\n",
+ i, key_min, key_max, showIARKind(val));
}
}
return True;
@@ -5820,7 +5820,7 @@
return False;
}
if (gIgnoredAddressRanges) {
- Word i;
+ UInt i;
for (i = 0; i < VG_(sizeRangeMap)(gIgnoredAddressRanges); i++) {
UWord val = IAR_INVALID;
UWord key_min = ~(UWord)0;
@@ -7536,7 +7536,7 @@
pertain to hardware mapped into the address space, and so we
can't expect the client to have got rid of them. */
if (gIgnoredAddressRanges) {
- Word i, nBad = 0;
+ UInt i, nBad = 0;
for (i = 0; i < VG_(sizeRangeMap)(gIgnoredAddressRanges); i++) {
UWord val = IAR_INVALID;
UWord key_min = ~(UWord)0;
@@ -7558,8 +7558,8 @@
"VALGRIND_{DISABLE,ENABLE}_ERROR_REPORTING_IN_RANGE macros.\n"
);
}
- VG_(umsg)(" [%ld] 0x%016llx-0x%016llx %s\n",
- i, (ULong)key_min, (ULong)key_max, showIARKind(val));
+ VG_(umsg)(" [%u] 0x%016lx-0x%016lx %s\n",
+ i, key_min, key_max, showIARKind(val));
}
}
|