|
From: <sv...@va...> - 2011-03-22 16:47:43
|
Author: sewardj
Date: 2011-03-22 16:47:35 +0000 (Tue, 22 Mar 2011)
New Revision: 11660
Log:
Print data addresses in race error reports in capital hex (0xABC)
rather than lowercase (0xabc) as the former is easier to read and also
is consistent with the rest of hex number printing in error messages.
Modified:
branches/HGDEV2/helgrind/hg_errors.c
Modified: branches/HGDEV2/helgrind/hg_errors.c
===================================================================
--- branches/HGDEV2/helgrind/hg_errors.c 2011-03-20 20:50:54 UTC (rev 11659)
+++ branches/HGDEV2/helgrind/hg_errors.c 2011-03-22 16:47:35 UTC (rev 11660)
@@ -1178,8 +1178,8 @@
emit( " <kind>Race</kind>\n" );
emit( " <xwhat>\n" );
emit( " <text>Possible data race during %s of size %d "
- "at %#lx by thread #%d</text>\n",
- what, szB, err_ga, (Int)xe->XE.Race.thr->errmsg_index );
+ "at %p by thread #%d</text>\n",
+ what, szB, (void*)err_ga, (Int)xe->XE.Race.thr->errmsg_index );
emit( " <hthreadid>%d</hthreadid>\n",
(Int)xe->XE.Race.thr->errmsg_index );
emit( " </xwhat>\n" );
@@ -1227,8 +1227,8 @@
xe->XE.Race.h2_ct_locksHeldW );
emit( "Possible data race during %s of size %d "
- "at %#lx by thread #%d\n",
- what, szB, err_ga, (Int)xe->XE.Race.thr->errmsg_index );
+ "at %p by thread #%d\n",
+ what, szB, (void*)err_ga, (Int)xe->XE.Race.thr->errmsg_index );
tl_assert(xe->XE.Race.locksHeldW);
show_LockP_summary_textmode( xe->XE.Race.locksHeldW, "" );
@@ -1271,14 +1271,14 @@
if (xe->XE.Race.hctxt) {
SizeT delta = err_ga - xe->XE.Race.haddr;
if (xml) {
- emit(" <auxwhat>Address %#lx is %ld bytes inside a block "
- "of size %ld alloc'd</auxwhat>\n", err_ga, delta,
+ emit(" <auxwhat>Address %p is %ld bytes inside a block "
+ "of size %ld alloc'd</auxwhat>\n", (void*)err_ga, delta,
xe->XE.Race.hszB);
VG_(pp_ExeContext)( xe->XE.Race.hctxt );
} else {
emit("\n");
- emit("Address %#lx is %ld bytes inside a block "
- "of size %ld alloc'd\n", err_ga, delta,
+ emit("Address %p is %ld bytes inside a block "
+ "of size %ld alloc'd\n", (void*)err_ga, delta,
xe->XE.Race.hszB);
VG_(pp_ExeContext)( xe->XE.Race.hctxt );
}
|