|
From: <sv...@va...> - 2007-10-04 23:12:12
|
Author: dirk
Date: 2007-10-05 00:12:12 +0100 (Fri, 05 Oct 2007)
New Revision: 6951
Log:
fix format strings for the tools (except for helgrind)
Modified:
branches/FORMATCHECK/callgrind/bb.c
branches/FORMATCHECK/callgrind/bbcc.c
branches/FORMATCHECK/callgrind/callstack.c
branches/FORMATCHECK/callgrind/debug.c
branches/FORMATCHECK/callgrind/dump.c
branches/FORMATCHECK/callgrind/fn.c
branches/FORMATCHECK/callgrind/main.c
branches/FORMATCHECK/callgrind/sim.c
branches/FORMATCHECK/memcheck/mc_leakcheck.c
branches/FORMATCHECK/memcheck/mc_main.c
Modified: branches/FORMATCHECK/callgrind/bb.c
===================================================================
--- branches/FORMATCHECK/callgrind/bb.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/callgrind/bb.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -187,7 +187,7 @@
bb = bb->next;
}
- CLG_DEBUG(5, " lookup_bb (Obj %s, off %p): %p\n",
+ CLG_DEBUG(5, " lookup_bb (Obj %s, off %#lx): %p\n",
obj->name, offset, bb);
return bb;
}
@@ -207,7 +207,7 @@
if (obj->offset != offset) {
Addr start = si ? VG_(seginfo_start)(si) : 0;
- CLG_DEBUG(0, "Mapping changed for '%s': %p -> %p\n",
+ CLG_DEBUG(0, "Mapping changed for '%s': %#lx -> %#lx\n",
obj->name, obj->start, start);
/* Size should be the same, and offset diff == start diff */
@@ -242,7 +242,7 @@
UInt n_instrs, n_jmps;
Bool cjmp_inverted = False;
- CLG_DEBUG(5, "+ get_bb(BB %p)\n", addr);
+ CLG_DEBUG(5, "+ get_bb(BB %#lx)\n", addr);
obj = obj_of_address(addr);
bb = lookup_bb(obj, addr - obj->offset);
@@ -269,13 +269,13 @@
CLG_ASSERT(bb->cjmp_count == n_jmps );
CLG_(stat).bb_retranslations++;
- CLG_DEBUG(5, "- get_bb(BB %p): seen before.\n", addr);
+ CLG_DEBUG(5, "- get_bb(BB %#lx): seen before.\n", addr);
return bb;
}
bb = new_bb(obj, addr - obj->offset, n_instrs, n_jmps, cjmp_inverted);
- CLG_DEBUG(5, "- get_bb(BB %p)\n", addr);
+ CLG_DEBUG(5, "- get_bb(BB %#lx)\n", addr);
return bb;
}
@@ -303,7 +303,7 @@
}
if (bb == NULL) {
- CLG_DEBUG(3, " delete_bb (Obj %s, off %p): NOT FOUND\n",
+ CLG_DEBUG(3, " delete_bb (Obj %s, off %lx): NOT FOUND\n",
obj->name, offset);
/* we didn't find it.
@@ -324,7 +324,7 @@
bp->next = bb->next;
}
- CLG_DEBUG(3, " delete_bb (Obj %s, off %p): %p, BBCC head: %p\n",
+ CLG_DEBUG(3, " delete_bb (Obj %s, off %#lx): %p, BBCC head: %p\n",
obj->name, offset, bb, bb->bbcc_list);
if (bb->bbcc_list == 0) {
Modified: branches/FORMATCHECK/callgrind/bbcc.c
===================================================================
--- branches/FORMATCHECK/callgrind/bbcc.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/callgrind/bbcc.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -85,7 +85,7 @@
jCC* jcc;
CLG_ASSERT(bbcc->cxt != 0);
- CLG_DEBUG(1, " zero_bbcc: BB %p, Cxt %d "
+ CLG_DEBUG(1, " zero_bbcc: BB %lx, Cxt %d "
"(fn '%s', rec %d)\n",
bb_addr(bbcc->bb),
bbcc->cxt->base_number + bbcc->rec_index,
@@ -177,7 +177,7 @@
bbcc = bbcc->next;
}
- CLG_DEBUG(2," lookup_bbcc(BB %p, Cxt %d, fn '%s'): %p (tid %d)\n",
+ CLG_DEBUG(2," lookup_bbcc(BB %lx, Cxt %d, fn '%s'): %p (tid %d)\n",
bb_addr(bb), cxt->base_number, cxt->fn[0]->name,
bbcc, bbcc ? bbcc->tid : 0);
@@ -294,7 +294,7 @@
CLG_(stat).distinct_bbccs++;
- CLG_DEBUG(3, " new_bbcc(BB %p): %p (now %d)\n",
+ CLG_DEBUG(3, " new_bbcc(BB %lx): %p (now %d)\n",
bb_addr(bb), new, CLG_(stat).distinct_bbccs);
return new;
@@ -319,7 +319,7 @@
CLG_ASSERT(bbcc->cxt != 0);
- CLG_DEBUG(3,"+ insert_bbcc_into_hash(BB %p, fn '%s')\n",
+ CLG_DEBUG(3,"+ insert_bbcc_into_hash(BB %lx, fn '%s')\n",
bb_addr(bbcc->bb), bbcc->cxt->fn[0]->name);
/* check fill degree of hash and resize if needed (>90%) */
@@ -368,7 +368,7 @@
{
BBCC* new;
- CLG_DEBUG(3,"+ clone_bbcc(BB %p, rec %d, fn %s)\n",
+ CLG_DEBUG(3,"+ clone_bbcc(BB %lx, rec %d, fn %s)\n",
bb_addr(orig->bb), rec_index, cxt->fn[0]->name);
new = new_bbcc(orig->bb);
@@ -410,7 +410,7 @@
CLG_DEBUGIF(3)
CLG_(print_bbcc)(-2, new, False);
- CLG_DEBUG(2,"- clone_BBCC(%p, %d) for BB %p\n"
+ CLG_DEBUG(2,"- clone_BBCC(%p, %d) for BB %#lx\n"
" orig %s\n"
" new %s\n",
orig, rec_index, bb_addr(orig->bb),
@@ -433,7 +433,7 @@
{
BBCC* bbcc;
- CLG_DEBUG(3, "+ get_bbcc(BB %p)\n", bb_addr(bb));
+ CLG_DEBUG(3, "+ get_bbcc(BB %#lx)\n", bb_addr(bb));
bbcc = bb->bbcc_list;
@@ -453,7 +453,7 @@
CLG_(print_bbcc)(-2, bbcc, False);
}
- CLG_DEBUG(3, "- get_bbcc(BB %p): BBCC %p\n",
+ CLG_DEBUG(3, "- get_bbcc(BB %#lx): BBCC %p\n",
bb_addr(bb), bbcc);
return bbcc;
@@ -558,7 +558,7 @@
Bool ret_without_call = False;
Int popcount_on_return = 1;
- CLG_DEBUG(3,"+ setup_bbcc(BB %p)\n", bb_addr(bb));
+ CLG_DEBUG(3,"+ setup_bbcc(BB %#lx)\n", bb_addr(bb));
/* This is needed because thread switches can not reliable be tracked
* with callback CLG_(run_thread) only: we have otherwise no way to get
@@ -714,7 +714,7 @@
else
ppIRJumpKind( jmpkind );
- VG_(printf)(" %08lx -> %08x, SP %08x\n",
+ VG_(printf)(" %08lx -> %08lx, SP %08lx\n",
last_bb ? bb_jmpaddr(last_bb) : 0,
bb_addr(bb), sp);
}
@@ -870,7 +870,7 @@
VG_(printf)("\n");
}
- CLG_DEBUG(3,"- setup_bbcc (BB %p): Cost %p (Len %d), Instrs %d (Len %d)\n",
+ CLG_DEBUG(3,"- setup_bbcc (BB %#lx): Cost %p (Len %d), Instrs %d (Len %d)\n",
bb_addr(bb), bbcc->cost, bb->cost_count,
bb->instr_count, bb->instr_len);
CLG_DEBUGIF(3)
Modified: branches/FORMATCHECK/callgrind/callstack.c
===================================================================
--- branches/FORMATCHECK/callgrind/callstack.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/callgrind/callstack.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -275,7 +275,7 @@
BB* bb = jcc->to->bb;
if (s>40) s=40;
- VG_(printf)("%s> %s(0x%x, 0x%x, ...) [%s / %p]\n", spaces[s%4]+40-s, bb->fn->name,
+ VG_(printf)("%s> %s(0x%x, 0x%x, ...) [%s / %#lx]\n", spaces[s%4]+40-s, bb->fn->name,
pars ? pars[1]:0,
pars ? pars[2]:0,
bb->obj->name + bb->obj->last_slash_pos,
@@ -285,7 +285,7 @@
else if (CLG_(clo).verbose<4) {
VG_(printf)("+ %2d ", CLG_(current_call_stack).sp);
CLG_(print_short_jcc)(jcc);
- VG_(printf)(", SP %p, RA %p\n", sp, ret_addr);
+ VG_(printf)(", SP %#lx, RA %#lx\n", sp, ret_addr);
}
else {
VG_(printf)(" Pushed ");
@@ -365,16 +365,16 @@
if (CLG_(clo).verbose<4) {
if (jcc) {
/* popped JCC target first */
- VG_(printf)("- %2d %p => ",
+ VG_(printf)("- %2d %#lx => ",
CLG_(current_call_stack).sp,
bb_addr(jcc->to->bb));
CLG_(print_addr)(bb_jmpaddr(jcc->from->bb));
- VG_(printf)(", SP %p\n",
+ VG_(printf)(", SP %#lx\n",
CLG_(current_call_stack).entry[CLG_(current_call_stack).sp].sp);
CLG_(print_cost)(10, CLG_(sets).full, jcc->cost);
}
else
- VG_(printf)("- %2d [Skipped JCC], SP %p\n",
+ VG_(printf)("- %2d [Skipped JCC], SP %#lx\n",
CLG_(current_call_stack).sp,
CLG_(current_call_stack).entry[CLG_(current_call_stack).sp].sp);
}
@@ -397,7 +397,7 @@
void CLG_(unwind_call_stack)(Addr sp, Int minpops)
{
Int csp;
- CLG_DEBUG(4,"+ unwind_call_stack(sp %p, minpops %d): frame %d\n",
+ CLG_DEBUG(4,"+ unwind_call_stack(sp %#lx, minpops %d): frame %d\n",
sp, minpops, CLG_(current_call_stack).sp);
/* We pop old stack frames.
Modified: branches/FORMATCHECK/callgrind/debug.c
===================================================================
--- branches/FORMATCHECK/callgrind/debug.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/callgrind/debug.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -51,7 +51,7 @@
print_indent(s);
}
- VG_(printf)("BB %p (Obj '%s')", bb_addr(bb), bb->obj->name);
+ VG_(printf)("BB %#lx (Obj '%s')", bb_addr(bb), bb->obj->name);
}
static
@@ -136,7 +136,7 @@
bb->jmp_offset, bb_jmpaddr(bb));
else
#endif
- VG_(printf)("%s +%p=%p, ",
+ VG_(printf)("%s +%#lx=%#lx, ",
bb->obj->name + bb->obj->last_slash_pos,
bb->offset, bb_addr(bb));
CLG_(print_cxt)(s+8, bbcc->cxt, bbcc->rec_index);
@@ -220,7 +220,7 @@
void CLG_(print_short_jcc)(jCC* jcc)
{
if (jcc)
- VG_(printf)("%p => %p [%llu/%llu,%llu,%llu]",
+ VG_(printf)("%#lx => %#lx [%llu/%llu,%llu,%llu]",
bb_jmpaddr(jcc->from->bb),
bb_addr(jcc->to->bb),
jcc->call_counter,
@@ -264,9 +264,9 @@
}
ce = CLG_(get_call_entry)(sp);
- VG_(printf)("[%-2d] SP %p, RA %p", sp, ce->sp, ce->ret_addr);
+ VG_(printf)("[%-2d] SP %#lx, RA %#lx", sp, ce->sp, ce->ret_addr);
if (ce->nonskipped)
- VG_(printf)(" NonSkipped BB %p / %s",
+ VG_(printf)(" NonSkipped BB %#lx / %s",
bb_addr(ce->nonskipped->bb),
ce->nonskipped->cxt->fn[0]->name);
VG_(printf)("\n");
@@ -381,9 +381,9 @@
CLG_(get_debug_info)(addr, fl_buf, fn_buf, &ln, &si);
if (VG_(strcmp)(fn_buf,"???")==0)
- VG_(printf)("%p", addr);
+ VG_(printf)("%#lx", addr);
else
- VG_(printf)("%p %s", addr, fn_buf);
+ VG_(printf)("%#lx %s", addr, fn_buf);
if (si) {
obj_name = VG_(seginfo_filename)(si);
Modified: branches/FORMATCHECK/callgrind/dump.c
===================================================================
--- branches/FORMATCHECK/callgrind/dump.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/callgrind/dump.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -477,7 +477,7 @@
p->addr = addr - bbcc->bb->obj->offset;
p->bb_addr = bbcc->bb->offset;
- CLG_DEBUG(3, " get_debug_pos(%p): BB %p, fn '%s', file '%s', line %u\n",
+ CLG_DEBUG(3, " get_debug_pos(%#lx): BB %#lx, fn '%s', file '%s', line %u\n",
addr, bb_addr(bbcc->bb), bbcc->cxt->fn[0]->name,
p->file->name, p->line);
@@ -519,7 +519,7 @@
static void fprint_apos(Int fd, AddrPos* curr, AddrPos* last, file_node* func_file)
{
CLG_ASSERT(curr->file != 0);
- CLG_DEBUG(2, " print_apos(file '%s', line %d, bb %p, addr %p) fnFile '%s'\n",
+ CLG_DEBUG(2, " print_apos(file '%s', line %d, bb %#lx, addr %#lx) fnFile '%s'\n",
curr->file->name, curr->line, curr->bb_addr, curr->addr,
func_file->name);
@@ -569,7 +569,7 @@
p = VG_(sprintf)(outbuf, "%d ", diff);
}
else
- p = VG_(sprintf)(outbuf, "%p ", curr->addr);
+ p = VG_(sprintf)(outbuf, "%#lx ", curr->addr);
}
if (CLG_(clo).dump_bb) {
@@ -584,7 +584,7 @@
p += VG_(sprintf)(outbuf+p, "%d ", diff);
}
else
- p += VG_(sprintf)(outbuf+p, "%p ", curr->bb_addr);
+ p += VG_(sprintf)(outbuf+p, "%#lx ", curr->bb_addr);
}
if (CLG_(clo).dump_line) {
@@ -630,7 +630,7 @@
static void fprint_fcost(Int fd, AddrCost* c, AddrPos* last)
{
CLG_DEBUGIF(3) {
- CLG_DEBUG(2, " print_fcost(file '%s', line %d, bb %p, addr %p):\n",
+ CLG_DEBUG(2, " print_fcost(file '%s', line %d, 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);
}
@@ -1027,7 +1027,7 @@
CLG_DEBUGIF(8) {
for (pm = a; pm < a+n; pm++) {
- VG_(printf)(" %3d BB %p, ", pm - qsort_start,
+ VG_(printf)(" %3d BB %#lx, ", pm - qsort_start,
bb_addr((*pm)->bb));
CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index);
}
@@ -1081,14 +1081,14 @@
if ((s = a+n-1-pd)>0) { for(r=0;r<s;r++) swap(pc+r, a+n-s+r); }
CLG_DEBUGIF(8) {
- VG_(printf)(" PV BB %p, ", bb_addr((*pv)->bb));
+ VG_(printf)(" PV BB %#lx, ", bb_addr((*pv)->bb));
CLG_(print_cxt)(9, (*pv)->cxt, (*pv)->rec_index);
s = pb-pa+1;
VG_(printf)(" Lower %d - %d:\n", a-qsort_start, a+s-1-qsort_start);
for (r=0;r<s;r++) {
pm = a+r;
- VG_(printf)(" %3d BB %p, ",
+ VG_(printf)(" %3d BB %#lx, ",
pm-qsort_start,bb_addr((*pm)->bb));
CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index);
}
@@ -1098,7 +1098,7 @@
a+n-s-qsort_start, a+n-1-qsort_start);
for (r=0;r<s;r++) {
pm = a+n-s+r;
- VG_(printf)(" %3d BB %p, ",
+ VG_(printf)(" %3d BB %#lx, ",
pm-qsort_start,bb_addr((*pm)->bb));
CLG_(print_cxt)(9, (*pm)->cxt, (*pm)->rec_index);
}
@@ -1549,7 +1549,7 @@
/* FIXME: Specify Object of BB if different to object of fn */
int i, pos = 0;
ULong ecounter = (*p)->ecounter_sum;
- pos = VG_(sprintf)(print_buf, "bb=%p ", (*p)->bb->offset);
+ pos = VG_(sprintf)(print_buf, "bb=%#lx ", (*p)->bb->offset);
for(i = 0; i<(*p)->bb->cjmp_count;i++) {
pos += VG_(sprintf)(print_buf+pos, "%d %llu ",
(*p)->bb->jmp[i].instr,
Modified: branches/FORMATCHECK/callgrind/fn.c
===================================================================
--- branches/FORMATCHECK/callgrind/fn.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/callgrind/fn.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -128,7 +128,7 @@
r = range + 2;
found = True;
while(r[1]) {
- CLG_DEBUG(1, " [%p] Found! Checking %d bytes of [%x %x %x...]\n",
+ CLG_DEBUG(1, " [%#lx] Found! Checking %d bytes of [%x %x %x...]\n",
addr, r[1], code[r[0]], code[r[0]+1], code[r[0]+2]);
if (VG_(memcmp)( (void*)(addr+r[0]), code+r[0], r[1]) != 0) {
@@ -372,7 +372,7 @@
Char dir[FILENAME_LEN];
UInt line;
- CLG_DEBUG(6, " + get_debug_info(%p)\n", instr_addr);
+ CLG_DEBUG(6, " + get_debug_info(%#lx)\n", instr_addr);
if (pSegInfo) {
*pSegInfo = VG_(find_seginfo)(instr_addr);
@@ -418,7 +418,7 @@
if (line_num) *line_num=0;
}
- CLG_DEBUG(6, " - get_debug_info(%p): seg '%s', fn %s\n",
+ CLG_DEBUG(6, " - get_debug_info(%#lx): seg '%s', fn %s\n",
instr_addr,
!pSegInfo ? (const UChar*)"-" :
(*pSegInfo) ? VG_(seginfo_filename)(*pSegInfo) :
@@ -445,7 +445,7 @@
/* fn from debug info is idempotent for a BB */
if (bb->fn) return bb->fn;
- CLG_DEBUG(3,"+ get_fn_node(BB %p)\n", bb_addr(bb));
+ CLG_DEBUG(3,"+ get_fn_node(BB %#lx)\n", bb_addr(bb));
/* get function/file name, line number and object of
* the BB according to debug information
@@ -458,10 +458,10 @@
/* Use address as found in library */
if (sizeof(Addr) == 4)
- p = VG_(sprintf)(fnname, "%08p", bb->offset);
+ p = VG_(sprintf)(fnname, "%#08lx", bb->offset);
else
// 64bit address
- p = VG_(sprintf)(fnname, "%016p", bb->offset);
+ p = VG_(sprintf)(fnname, "%#016lx", bb->offset);
VG_(sprintf)(fnname+p, "%s",
(bb->sect_kind == Vg_SectData) ? " [Data]" :
@@ -536,7 +536,7 @@
bb->fn = fn;
bb->line = line_num;
- CLG_DEBUG(3,"- get_fn_node(BB %p): %s (in %s:%u)\n",
+ CLG_DEBUG(3,"- get_fn_node(BB %#lx): %s (in %s:%u)\n",
bb_addr(bb), fnname, filename, line_num);
return fn;
Modified: branches/FORMATCHECK/callgrind/main.c
===================================================================
--- branches/FORMATCHECK/callgrind/main.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/callgrind/main.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -522,12 +522,12 @@
// No instrumentation if it is switched off
if (! CLG_(instrument_state)) {
- CLG_DEBUG(5, "instrument(BB %p) [Instrumentation OFF]\n",
+ CLG_DEBUG(5, "instrument(BB %#lx) [Instrumentation OFF]\n",
(Addr)closure->readdr);
return bbIn;
}
- CLG_DEBUG(3, "+ instrument(BB %p)\n", (Addr)closure->readdr);
+ CLG_DEBUG(3, "+ instrument(BB %#lx)\n", (Addr)closure->readdr);
/* Set up SB for instrumented IR */
bbOut = deepCopyIRSBExceptStmts(bbIn);
@@ -681,7 +681,7 @@
bb->jmpkind = bbIn->jumpkind;
}
- CLG_DEBUG(3, "- instrument(BB %p): byteLen %u, CJumps %u, CostLen %u\n",
+ CLG_DEBUG(3, "- instrument(BB %#lx): byteLen %u, CJumps %u, CostLen %u\n",
origAddr, bb->instr_len, bb->cjmp_count, bb->cost_count);
if (cJumps>0) {
CLG_DEBUG(3, " [ ");
Modified: branches/FORMATCHECK/callgrind/sim.c
===================================================================
--- branches/FORMATCHECK/callgrind/sim.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/callgrind/sim.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -790,7 +790,7 @@
UWord *set, tmp_tag; \
UInt use_mask; \
\
- CLG_DEBUG(6,"%s.Acc(Addr %p, size %d): Sets [%d/%d]\n", \
+ CLG_DEBUG(6,"%s.Acc(Addr %#lx, size %d): Sets [%d/%d]\n", \
L.name, a, size, set1, set2); \
\
/* First case: word entirely within line. */ \
@@ -808,7 +808,7 @@
idx = (set1 << L.assoc_bits) | (set[0] & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit0 [idx %d] (line %p from %p): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
return L1_Hit; \
@@ -825,7 +825,7 @@
idx = (set1 << L.assoc_bits) | (tmp_tag & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit%d [idx %d] (line %p from %p): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
i, idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
return L1_Hit; \
@@ -852,7 +852,7 @@
idx = (set1 << L.assoc_bits) | (set[0] & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit0 [idx %d] (line %p from %p): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
goto block2; \
@@ -867,7 +867,7 @@
idx = (set1 << L.assoc_bits) | (tmp_tag & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit%d [idx %d] (line %p from %p): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
i, idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
goto block2; \
@@ -889,7 +889,7 @@
idx = (set2 << L.assoc_bits) | (set[0] & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit0 [idx %d] (line %p from %p): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): %x => %08x, count %d\n",\
idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
return miss1; \
@@ -904,7 +904,7 @@
idx = (set2 << L.assoc_bits) | (tmp_tag & ~L.tag_mask); \
L.use[idx].count ++; \
L.use[idx].mask |= use_mask; \
- CLG_DEBUG(6," Hit%d [idx %d] (line %p from %p): %x => %08x, count %d\n",\
+ CLG_DEBUG(6," Hit%d [idx %d] (line %lx from %#lx): %x => %08x, count %d\n",\
i, idx, L.loaded[idx].memline, L.loaded[idx].iaddr, \
use_mask, L.use[idx].mask, L.use[idx].count); \
return miss1; \
@@ -921,7 +921,7 @@
return (miss1==MemAccess || miss2==MemAccess) ? MemAccess:L2_Hit; \
\
} else { \
- VG_(printf)("addr: %p size: %u sets: %d %d", a, size, set1, set2); \
+ VG_(printf)("addr: %#lx size: %u sets: %d %d", a, size, set1, set2); \
VG_(tool_panic)("item straddles more than two cache sets"); \
} \
return 0; \
@@ -952,10 +952,10 @@
line_use* use = &(L2.use[idx]);
int i = ((32 - countBits(use->mask)) * L2.line_size)>>5;
- CLG_DEBUG(2, " L2.miss [%d]: at %p accessing memline %p\n",
+ CLG_DEBUG(2, " L2.miss [%d]: at %#lx accessing memline %#lx\n",
idx, bb_base + current_ii->instr_offset, memline);
if (use->count>0) {
- CLG_DEBUG(2, " old: used %d, loss bits %d (%08x) [line %p from %p]\n",
+ CLG_DEBUG(2, " old: used %d, 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);
@@ -986,13 +986,13 @@
int i, j, idx;
UWord tmp_tag;
- CLG_DEBUG(6,"L2.Acc(Memline %p): Set %d\n", memline, setNo);
+ CLG_DEBUG(6,"L2.Acc(Memline %#lx): Set %d\n", memline, setNo);
if (tag == (set[0] & L2.tag_mask)) {
idx = (setNo << L2.assoc_bits) | (set[0] & ~L2.tag_mask);
l1_loaded->dep_use = &(L2.use[idx]);
- CLG_DEBUG(6," Hit0 [idx %d] (line %p from %p): => %08x, count %d\n",
+ CLG_DEBUG(6," Hit0 [idx %d] (line %#lx from %#lx): => %08x, count %d\n",
idx, L2.loaded[idx].memline, L2.loaded[idx].iaddr,
L2.use[idx].mask, L2.use[idx].count);
return L2_Hit;
@@ -1007,7 +1007,7 @@
idx = (setNo << L2.assoc_bits) | (tmp_tag & ~L2.tag_mask);
l1_loaded->dep_use = &(L2.use[idx]);
- CLG_DEBUG(6," Hit%d [idx %d] (line %p from %p): => %08x, count %d\n",
+ CLG_DEBUG(6," Hit%d [idx %d] (line %#lx from %#lx): => %08x, count %d\n",
i, idx, L2.loaded[idx].memline, L2.loaded[idx].iaddr,
L2.use[idx].mask, L2.use[idx].count);
return L2_Hit;
@@ -1040,10 +1040,10 @@
line_use* use = &(cache->use[idx]); \
int c = ((32 - countBits(use->mask)) * cache->line_size)>>5; \
\
- CLG_DEBUG(2, " %s.miss [%d]: at %p accessing memline %p (mask %08x)\n", \
+ CLG_DEBUG(2, " %s.miss [%d]: at %#lx accessing memline %#lx (mask %08x)\n", \
cache->name, idx, bb_base + current_ii->instr_offset, memline, mask); \
if (use->count>0) { \
- CLG_DEBUG(2, " old: used %d, loss bits %d (%08x) [line %p from %p]\n",\
+ CLG_DEBUG(2, " old: used %d, 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); \
@@ -1149,7 +1149,7 @@
current_ii = ii;
IrRes = (*simulator.I1_Read)(bb_base + ii->instr_offset, ii->instr_size);
- CLG_DEBUG(6, "log_1I0D: Ir=%p/%u => Ir %d\n",
+ CLG_DEBUG(6, "log_1I0D: Ir=%#lx/%u => Ir %d\n",
bb_base + ii->instr_offset, ii->instr_size, IrRes);
if (CLG_(current_state).collect) {
@@ -1177,7 +1177,7 @@
IrRes = (*simulator.I1_Read)(bb_base + ii->instr_offset, ii->instr_size);
DrRes = (*simulator.D1_Read)(data, ii->data_size);
- CLG_DEBUG(6, "log_1I1Dr: Ir=%p/%u, Dr=%p/%u => Ir %d, Dr %d\n",
+ CLG_DEBUG(6, "log_1I1Dr: Ir=%#lx/%u, Dr=%#lx/%u => Ir %d, Dr %d\n",
bb_base + ii->instr_offset, ii->instr_size,
data, ii->data_size, IrRes, DrRes);
@@ -1209,7 +1209,7 @@
current_ii = ii;
DrRes = (*simulator.D1_Read)(data, ii->data_size);
- CLG_DEBUG(6, "log_0I1Dr: Dr=%p/%u => Dr %d\n",
+ CLG_DEBUG(6, "log_0I1Dr: Dr=%#lx/%u => Dr %d\n",
data, ii->data_size, DrRes);
if (CLG_(current_state).collect) {
@@ -1239,7 +1239,7 @@
IrRes = (*simulator.I1_Read)(bb_base + ii->instr_offset, ii->instr_size);
DwRes = (*simulator.D1_Write)(data, ii->data_size);
- CLG_DEBUG(6, "log_1I1Dw: Ir=%p/%u, Dw=%p/%u => Ir %d, Dw %d\n",
+ CLG_DEBUG(6, "log_1I1Dw: Ir=%#lx/%u, Dw=%#lx/%u => Ir %d, Dw %d\n",
bb_base + ii->instr_offset, ii->instr_size,
data, ii->data_size, IrRes, DwRes);
@@ -1270,7 +1270,7 @@
current_ii = ii;
DwRes = (*simulator.D1_Write)(data, ii->data_size);
- CLG_DEBUG(6, "log_0I1Dw: Dw=%p/%u => Dw %d\n",
+ CLG_DEBUG(6, "log_0I1Dw: Dw=%#lx/%u => Dw %d\n",
data, ii->data_size, DwRes);
if (CLG_(current_state).collect) {
@@ -1301,7 +1301,7 @@
DwRes = (*simulator.D1_Write)(data2, ii->data_size);
CLG_DEBUG(6,
- "log_1I2D: Ir=%p/%u, Dr=%p/%u, Dw=%p/%u => Ir %d, Dr %d, Dw %d\n",
+ "log_1I2D: Ir=%#lx/%u, Dr=%#lx/%u, Dw=%#lx/%u => Ir %d, Dr %d, Dw %d\n",
bb_base + ii->instr_offset, ii->instr_size,
data1, ii->data_size, data2, ii->data_size, IrRes, DrRes, DwRes);
@@ -1338,7 +1338,7 @@
DwRes = (*simulator.D1_Write)(data2, ii->data_size);
CLG_DEBUG(6,
- "log_0D2D: Dr=%p/%u, Dw=%p/%u => Dr %d, Dw %d\n",
+ "log_0D2D: Dr=%#lx/%u, Dw=%#lx/%u => Dr %d, Dw %d\n",
data1, ii->data_size, data2, ii->data_size, DrRes, DwRes);
if (CLG_(current_state).collect) {
Modified: branches/FORMATCHECK/memcheck/mc_leakcheck.c
===================================================================
--- branches/FORMATCHECK/memcheck/mc_leakcheck.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/memcheck/mc_leakcheck.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -65,7 +65,7 @@
void scan_all_valid_memory_catcher ( Int sigNo, Addr addr )
{
if (0)
- VG_(printf)("OUCH! sig=%d addr=%p\n", sigNo, addr);
+ VG_(printf)("OUCH! sig=%d addr=%#lx\n", sigNo, addr);
if (sigNo == VKI_SIGSEGV || sigNo == VKI_SIGBUS)
__builtin_longjmp(memscan_jmpbuf, 1);
}
@@ -232,7 +232,7 @@
sh_no = find_shadow_for(ptr, lc_shadows, lc_n_shadows);
if (VG_DEBUG_LEAKCHECK)
- VG_(printf)("ptr=%p -> block %d\n", ptr, sh_no);
+ VG_(printf)("ptr=%#lx -> block %d\n", ptr, sh_no);
if (sh_no == -1)
return;
@@ -245,7 +245,7 @@
if (lc_markstack[sh_no].state == Unreached) {
if (0)
- VG_(printf)("pushing %p-%p\n", lc_shadows[sh_no]->data,
+ VG_(printf)("pushing %#lx-%#lx\n", lc_shadows[sh_no]->data,
lc_shadows[sh_no]->data + lc_shadows[sh_no]->szB);
tl_assert(lc_markstack[sh_no].next == -1);
@@ -257,7 +257,7 @@
if (clique != -1) {
if (0)
- VG_(printf)("mopup: %d: %p is %d\n",
+ VG_(printf)("mopup: %d: %#lx is %d\n",
sh_no, lc_shadows[sh_no]->data, lc_markstack[sh_no].state);
/* An unmarked block - add it to the clique. Add its size to
@@ -273,11 +273,11 @@
if (sh_no != clique) {
if (VG_DEBUG_CLIQUE) {
if (lc_markstack[sh_no].indirect)
- VG_(printf)(" clique %d joining clique %d adding %lu+%lu bytes\n",
+ VG_(printf)(" clique %d joining clique %d adding %u+%lu bytes\n",
sh_no, clique,
lc_shadows[sh_no]->szB, lc_markstack[sh_no].indirect);
else
- VG_(printf)(" %d joining %d adding %lu\n",
+ VG_(printf)(" %d joining %d adding %u\n",
sh_no, clique, lc_shadows[sh_no]->szB);
}
@@ -325,7 +325,7 @@
vki_sigset_t sigmask;
if (VG_DEBUG_LEAKCHECK)
- VG_(printf)("scan %p-%p\n", start, start+len);
+ VG_(printf)("scan %#lx-%#lx\n", start, start+len);
VG_(sigprocmask)(VKI_SIG_SETMASK, NULL, &sigmask);
VG_(set_fault_catcher)(scan_all_valid_memory_catcher);
@@ -355,7 +355,7 @@
addr = *(Addr *)ptr;
lc_markstack_push_WRK(addr, clique);
} else if (0 && VG_DEBUG_LEAKCHECK)
- VG_(printf)("%p not valid\n", ptr);
+ VG_(printf)("%#lx not valid\n", ptr);
ptr += sizeof(Addr);
} else {
/* We need to restore the signal mask, because we were
@@ -413,7 +413,7 @@
pass), then the cliques are merged. */
for (i = 0; i < lc_n_shadows; i++) {
if (VG_DEBUG_CLIQUE)
- VG_(printf)("cliques: %d at %p -> Loss state %d\n",
+ VG_(printf)("cliques: %d at %#lx -> Loss state %d\n",
i, lc_shadows[i]->data, lc_markstack[i].state);
if (lc_markstack[i].state != Unreached)
continue;
@@ -421,7 +421,7 @@
tl_assert(lc_markstack_top == -1);
if (VG_DEBUG_CLIQUE)
- VG_(printf)("%d: gathering clique %p\n", i, lc_shadows[i]->data);
+ VG_(printf)("%d: gathering clique %#lx\n", i, lc_shadows[i]->data);
lc_markstack_push_WRK(lc_shadows[i]->data, i);
@@ -769,7 +769,7 @@
}
if (0)
- VG_(printf)("ACCEPT %2d %p %p\n", i, seg->start, seg->end);
+ VG_(printf)("ACCEPT %2d %#lx %#lx\n", i, seg->start, seg->end);
lc_scan_memory(seg->start, seg->end+1 - seg->start);
}
}
Modified: branches/FORMATCHECK/memcheck/mc_main.c
===================================================================
--- branches/FORMATCHECK/memcheck/mc_main.c 2007-10-04 22:48:53 UTC (rev 6950)
+++ branches/FORMATCHECK/memcheck/mc_main.c 2007-10-04 23:12:12 UTC (rev 6951)
@@ -2196,7 +2196,7 @@
{
tl_assert(sizeof(UWord) == sizeof(SizeT));
if (0)
- VG_(printf)("helperc_MAKE_STACK_UNINIT %p %lu\n", base, len );
+ VG_(printf)("helperc_MAKE_STACK_UNINIT %#lx %lu\n", base, len );
# if 0
/* Really slow version */
|