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
(19) |
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-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));
}
}
|
|
From: <sv...@va...> - 2015-08-05 12:10:02
|
Author: florian
Date: Wed Aug 5 13:09:55 2015
New Revision: 15491
Log:
The number of elements in an OSet cannot be negative.
Let the return type of VG_(OSetGen_Size) reflect that.
Also fix a few casts.
Modified:
trunk/cachegrind/cg_main.c
trunk/coregrind/m_oset.c
trunk/include/pub_tool_oset.h
trunk/memcheck/mc_leakcheck.c
Modified: trunk/cachegrind/cg_main.c
==============================================================================
--- trunk/cachegrind/cg_main.c (original)
+++ trunk/cachegrind/cg_main.c Wed Aug 5 13:09:55 2015
@@ -1698,11 +1698,11 @@
VG_(dmsg)("cachegrind: with zero info:%6.1f%% (%d)\n",
no_debugs * 100.0 / debug_lookups, no_debugs);
- VG_(dmsg)("cachegrind: string table size: %lu\n",
+ VG_(dmsg)("cachegrind: string table size: %u\n",
VG_(OSetGen_Size)(stringTable));
- VG_(dmsg)("cachegrind: CC table size: %lu\n",
+ VG_(dmsg)("cachegrind: CC table size: %u\n",
VG_(OSetGen_Size)(CC_table));
- VG_(dmsg)("cachegrind: InstrInfo table size: %lu\n",
+ VG_(dmsg)("cachegrind: InstrInfo table size: %u\n",
VG_(OSetGen_Size)(instrInfoTable));
}
}
Modified: trunk/coregrind/m_oset.c
==============================================================================
--- trunk/coregrind/m_oset.c (original)
+++ trunk/coregrind/m_oset.c Wed Aug 5 13:09:55 2015
@@ -117,7 +117,7 @@
OSetFree_t free_fn; // deallocator
PoolAlloc* node_pa; // (optional) pool allocator for nodes.
SizeT maxEltSize; // for node_pa, must be > 0. Otherwise unused.
- Word nElems; // number of elements in the tree
+ UInt nElems; // number of elements in the tree
AvlNode* root; // root node
AvlNode* nodeStack[STACK_MAX]; // Iterator node stack
@@ -912,7 +912,7 @@
/*--- Miscellaneous operations ---*/
/*--------------------------------------------------------------------*/
-Word VG_(OSetGen_Size)(const AvlTree* t)
+UInt VG_(OSetGen_Size)(const AvlTree* t)
{
vg_assert(t);
return t->nElems;
Modified: trunk/include/pub_tool_oset.h
==============================================================================
--- trunk/include/pub_tool_oset.h (original)
+++ trunk/include/pub_tool_oset.h Wed Aug 5 13:09:55 2015
@@ -298,7 +298,7 @@
// they will return NULL if VG_(OSetGen_Next)() is called without an
// intervening call to VG_(OSetGen_ResetIter)().
-extern Word VG_(OSetGen_Size) ( const OSet* os );
+extern UInt VG_(OSetGen_Size) ( const OSet* os );
extern void VG_(OSetGen_Insert) ( OSet* os, void* elem );
extern Bool VG_(OSetGen_Contains) ( const OSet* os, const void* key );
extern void* VG_(OSetGen_Lookup) ( const OSet* os, const void* key );
Modified: trunk/memcheck/mc_leakcheck.c
==============================================================================
--- trunk/memcheck/mc_leakcheck.c (original)
+++ trunk/memcheck/mc_leakcheck.c Wed Aug 5 13:09:55 2015
@@ -899,11 +899,10 @@
if (VG_DEBUG_CLIQUE) {
if (ex->IorC.indirect_szB > 0)
VG_(printf)(" clique %d joining clique %d adding %lu+%lu\n",
- ch_no, clique, (unsigned long)ch->szB,
- (unsigned long)ex->IorC.indirect_szB);
+ ch_no, clique, (SizeT)ch->szB, ex->IorC.indirect_szB);
else
VG_(printf)(" block %d joining clique %d adding %lu\n",
- ch_no, clique, (unsigned long)ch->szB);
+ ch_no, clique, (SizeT)ch->szB);
}
lc_extras[clique].IorC.indirect_szB += ch->szB;
@@ -1178,8 +1177,8 @@
// allocates or reallocates lr_array, and set its elements to the loss records
// contains in lr_table.
-static Int get_lr_array_from_lr_table(void) {
- Int i, n_lossrecords;
+static UInt get_lr_array_from_lr_table(void) {
+ UInt i, n_lossrecords;
LossRecord* lr;
n_lossrecords = VG_(OSetGen_Size)(lr_table);
@@ -1321,7 +1320,7 @@
if (VG_DEBUG_LEAKCHECK)
VG_(printf)("heuristic %s %#lx len %lu\n",
pp_heuristic(ex->heuristic),
- ch->data, (unsigned long)ch->szB);
+ ch->data, (SizeT)ch->szB);
}
old_lr = VG_(OSetGen_Lookup)(lr_table, &lrkey);
@@ -1511,7 +1510,7 @@
static void print_clique (Int clique, UInt level)
{
Int ind;
- Int i, n_lossrecords;;
+ UInt i, n_lossrecords;
n_lossrecords = VG_(OSetGen_Size)(lr_table);
@@ -1522,7 +1521,7 @@
MC_Chunk* ind_ch = lc_chunks[ind];
LossRecord* ind_lr;
LossRecordKey ind_lrkey;
- Int lr_i;
+ UInt lr_i;
ind_lrkey.state = ind_ex->state;
ind_lrkey.allocated_at = MC_(allocated_at)(ind_ch);
ind_lr = VG_(OSetGen_Lookup)(lr_table, &ind_lrkey);
@@ -1531,13 +1530,13 @@
break;
for (i = 0; i < level; i++)
VG_(umsg)(" ");
- VG_(umsg)("%p[%lu] indirect loss record %d\n",
- (void *)ind_ch->data, (unsigned long)ind_ch->szB,
+ VG_(umsg)("%p[%lu] indirect loss record %u\n",
+ (void *)ind_ch->data, (SizeT)ind_ch->szB,
lr_i+1); // lr_i+1 for user numbering.
if (lr_i >= n_lossrecords)
VG_(umsg)
("error: no indirect loss record found for %p[%lu]?????\n",
- (void *)ind_ch->data, (unsigned long)ind_ch->szB);
+ (void *)ind_ch->data, (SizeT)ind_ch->szB);
print_clique(ind, level+1);
}
}
@@ -1545,7 +1544,7 @@
Bool MC_(print_block_list) ( UInt loss_record_nr)
{
- Int i, n_lossrecords;
+ UInt i, n_lossrecords;
LossRecord* lr;
if (lr_table == NULL || lc_chunks == NULL || lc_extras == NULL) {
@@ -1584,7 +1583,7 @@
// If this is the loss record we are looking for, output the pointer.
if (old_lr == lr_array[loss_record_nr]) {
VG_(umsg)("%p[%lu]\n",
- (void *)ch->data, (unsigned long) ch->szB);
+ (void *)ch->data, (SizeT)ch->szB);
if (ex->state != Reachable) {
// We can print the clique in all states, except Reachable.
// In Unreached state, lc_chunk[i] is the clique leader.
@@ -1598,7 +1597,7 @@
} else {
// No existing loss record matches this chunk ???
VG_(umsg)("error: no loss record found for %p[%lu]?????\n",
- (void *)ch->data, (unsigned long) ch->szB);
+ (void *)ch->data, (SizeT)ch->szB);
}
}
return True;
|
Author: florian
Date: Wed Aug 5 12:26:10 2015
New Revision: 15490
Log:
The number of elements in a hash table cannot be negative.
Let the return type of VG_(HT_count_nodes) reflect that.
Modified:
trunk/coregrind/m_deduppoolalloc.c
trunk/coregrind/m_gdbserver/m_gdbserver.c
trunk/coregrind/m_hashtable.c
trunk/helgrind/hg_main.c
trunk/include/pub_tool_hashtable.h
Modified: trunk/coregrind/m_deduppoolalloc.c
==============================================================================
--- trunk/coregrind/m_deduppoolalloc.c (original)
+++ trunk/coregrind/m_deduppoolalloc.c Wed Aug 5 12:26:10 2015
@@ -201,7 +201,7 @@
static void print_stats (DedupPoolAlloc *ddpa)
{
VG_(message)(Vg_DebugMsg,
- "dedupPA:%s %ld allocs (%d uniq)"
+ "dedupPA:%s %ld allocs (%u uniq)"
" %ld pools (%ld bytes free in last pool)\n",
ddpa->cc,
(long int) ddpa->nr_alloc_calls,
Modified: trunk/coregrind/m_gdbserver/m_gdbserver.c
==============================================================================
--- trunk/coregrind/m_gdbserver/m_gdbserver.c (original)
+++ trunk/coregrind/m_gdbserver/m_gdbserver.c Wed Aug 5 12:26:10 2015
@@ -542,7 +542,7 @@
int i;
dlog(1,
- "clear_gdbserved_addresses: scanning hash table nodes %d\n",
+ "clear_gdbserved_addresses: scanning hash table nodes %u\n",
VG_(HT_count_nodes) (gs_addresses));
ag = (GS_Address**) VG_(HT_to_array) (gs_addresses, &n_elems);
for (i = 0; i < n_elems; i++)
Modified: trunk/coregrind/m_hashtable.c
==============================================================================
--- trunk/coregrind/m_hashtable.c (original)
+++ trunk/coregrind/m_hashtable.c Wed Aug 5 12:26:10 2015
@@ -82,7 +82,7 @@
return table;
}
-Int VG_(HT_count_nodes) ( const VgHashTable *table )
+UInt VG_(HT_count_nodes) ( const VgHashTable *table )
{
return table->n_elements;
}
Modified: trunk/helgrind/hg_main.c
==============================================================================
--- trunk/helgrind/hg_main.c (original)
+++ trunk/helgrind/hg_main.c Wed Aug 5 12:26:10 2015
@@ -5653,7 +5653,7 @@
HG_(stats__LockN_to_P_queries),
HG_(stats__LockN_to_P_get_map_size)() );
- VG_(printf)("client malloc-ed blocks: %'8d\n",
+ VG_(printf)("client malloc-ed blocks: %'8u\n",
VG_(HT_count_nodes)(hg_mallocmeta_table));
VG_(printf)("string table map: %'8llu queries (%llu map size)\n",
Modified: trunk/include/pub_tool_hashtable.h
==============================================================================
--- trunk/include/pub_tool_hashtable.h (original)
+++ trunk/include/pub_tool_hashtable.h Wed Aug 5 12:26:10 2015
@@ -58,7 +58,7 @@
extern VgHashTable *VG_(HT_construct) ( const HChar* name );
/* Count the number of nodes in a table. */
-extern Int VG_(HT_count_nodes) ( const VgHashTable *table );
+extern UInt VG_(HT_count_nodes) ( const VgHashTable *table );
/* Add a node to the table. Duplicate keys are permitted. */
extern void VG_(HT_add_node) ( VgHashTable *t, void* node );
|
|
From: <sv...@va...> - 2015-08-05 07:48:40
|
Author: florian
Date: Wed Aug 5 08:48:32 2015
New Revision: 15489
Log:
Add missing header files.
Modified:
trunk/include/Makefile.am
Modified: trunk/include/Makefile.am
==============================================================================
--- trunk/include/Makefile.am (original)
+++ trunk/include/Makefile.am Wed Aug 5 08:48:32 2015
@@ -84,8 +84,11 @@
vki/vki-xen-hvm.h \
vki/vki-xen-memory.h \
vki/vki-xen-mmuext.h \
+ vki/vki-xen-physdev.h \
+ vki/vki-xen-schedop.h \
vki/vki-xen-sysctl.h \
vki/vki-xen-tmem.h \
vki/vki-xen-version.h \
+ vki/vki-xen-xsm.h \
vki/vki-xen-x86.h \
vki/vki-linux-drm.h
|
|
From: Bart V. A. <bva...@ac...> - 2015-08-05 02:40:46
|
On 08/04/15 12:25, sv...@va... wrote: > Modified: trunk/none/tests/Makefile.am > ============================================================================== > --- trunk/none/tests/Makefile.am (original) > +++ trunk/none/tests/Makefile.am Tue Aug 4 20:25:53 2015 > -libvex_test_CFLAGS = @FLAG_FSANITIZE@ > +libvex_test_CFLAGS = $(AM_CFLAGS)@FLAG_FSANITIZE@ Hi Philippe, It looks like a space is missing between $(AM_CFLAGS) and @FLAG_FSANITIZE@ ? Bart. |
|
From: <sv...@va...> - 2015-08-05 02:38:17
|
Author: zliu
Date: Wed Aug 5 03:38:10 2015
New Revision: 15488
Log:
Let "make distclean" remove generated tilegx instruction test files
Modified:
trunk/none/tests/tilegx/Makefile.am
trunk/none/tests/tilegx/gen_test.sh
Modified: trunk/none/tests/tilegx/Makefile.am
==============================================================================
--- trunk/none/tests/tilegx/Makefile.am (original)
+++ trunk/none/tests/tilegx/Makefile.am Wed Aug 5 03:38:10 2015
@@ -1597,19 +1597,15 @@
gen_insn_test_LDADD = ../../../VEX/priv/tilegx_disasm.o
$(addsuffix .c, $(insn_tests)) : gen_insn_test
- @echo $@
- ./gen_test.sh $@
+ @./gen_test.sh $@
$(addsuffix .stdout.exp, $(insn_tests)) : $(insn_tests)
- @echo "Generate $@"
./$(basename $(basename $@)) > $@
$(addsuffix .stderr.exp, $(insn_tests)) :
- @echo "Generate $@"
touch $@
$(addsuffix .vgtest, $(insn_tests)) :
- @echo "Generate $@"
echo -e "prog: $(basename $@)\nvgopts: -q" > $@
check-am : $(addsuffix .stdout.exp, $(insn_tests)) $(addsuffix .stderr.exp, $(insn_tests)) $(addsuffix .vgtest, $(insn_tests))
@@ -1618,3 +1614,4 @@
@rm -f *.stderr.exp *.stdout.exp *.vgtest $(addsuffix .c, $(insn_tests)) $(addsuffix .o, $(insn_tests)) $(insn_tests)
@rm -f *.o $(bin_PROGRAMS)
+distclean-am : clean-am
Modified: trunk/none/tests/tilegx/gen_test.sh
==============================================================================
--- trunk/none/tests/tilegx/gen_test.sh (original)
+++ trunk/none/tests/tilegx/gen_test.sh Wed Aug 5 03:38:10 2015
@@ -573,13 +573,12 @@
if [ $# -gt 0 ]; then
#fname = "$1"
-echo "generate $1"
+
for f in "${FILES[@]}"
do
array=(${f// / })
if [ ${array[2]} = $1 ]; then
./gen_insn_test ${array[0]} ${array[1]} > ${array[2]}
-# cat hello.c > ${array[2]}
exit 0
fi
done
|
|
From: <sv...@va...> - 2015-08-05 01:51:08
|
Author: zliu
Date: Wed Aug 5 02:50:59 2015
New Revision: 15487
Log:
Fix issue of "make dist BUILD_ALL_DOCS=no"
Modified:
trunk/none/tests/tilegx/Makefile.am
trunk/none/tests/tilegx/gen_test.sh (props changed)
Modified: trunk/none/tests/tilegx/Makefile.am
==============================================================================
--- trunk/none/tests/tilegx/Makefile.am (original)
+++ trunk/none/tests/tilegx/Makefile.am Wed Aug 5 02:50:59 2015
@@ -1067,7 +1067,6 @@
insn_tests =
-if VGCONF_ARCHS_INCLUDE_TILEGX
insn_tests += \
insn_test_move_X0 \
insn_test_move_X1 \
@@ -1584,7 +1583,6 @@
insn_test_xor_Y1 \
insn_test_xori_X0 \
insn_test_xori_X1
-endif
check_PROGRAMS = \
allexec \
|