#include "pub_tool_basics.h"
#include "pub_tool_libcbase.h"
#include "pub_tool_libcprint.h"
+#include "pub_tool_xarray.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_libcassert.h"
#include "pub_tool_options.h"
//////////////////////////////////////////////////////////////
// //
-// Error management //
+// Error management -- storage //
// //
//////////////////////////////////////////////////////////////
Addr addr;
SSizeT sszB; /* -ve is write, +ve is read */
Seg* vseg;
- Char descr1[96];
- Char descr2[96];
+ XArray* descr1; /* XArray* of HChar */
+ XArray* descr2; /* XArray* of HChar */
Char datasym[96];
PtrdiffT datasymoff;
} Heap;
}
+//////////////////////////////////////////////////////////////
+// //
+// Error management -- printing //
+// //
+//////////////////////////////////////////////////////////////
+
+/* This is the "this error is due to be printed shortly; so have a
+ look at it any print any preamble you want" function. Which, in
+ Ptrcheck, we don't use. Hence a no-op.
+*/
+void pc_before_pp_Error ( Error* err ) {
+}
+
+/* Do a printf-style operation on either the XML or normal output
+ channel, depending on the setting of VG_(clo_xml).
+*/
+static void emit_WRK ( HChar* format, va_list vargs )
+{
+ if (VG_(clo_xml)) {
+ VG_(vprintf_xml)(format, vargs);
+ } else {
+ VG_(vmessage)(Vg_UserMsg, format, vargs);
+ }
+}
+static void emit ( HChar* format, ... ) PRINTF_CHECK(1, 2);
+static void emit ( HChar* format, ... )
+{
+ va_list vargs;
+ va_start(vargs, format);
+ emit_WRK(format, vargs);
+ va_end(vargs);
+}
+static void emiN ( HChar* format, ... ) /* With NO FORMAT CHECK */
+{
+ va_list vargs;
+ va_start(vargs, format);
+ emit_WRK(format, vargs);
+ va_end(vargs);
+}
+
+
static Char* readwrite(SSizeT sszB)
{
return ( sszB < 0 ? "write" : "read" );
void pc_pp_Error ( Error* err )
{
+ const Bool xml = VG_(clo_xml); /* a shorthand, that's all */
+
XError *xe = (XError*)VG_(get_error_extra)(err);
tl_assert(xe);
//----------------------------------------------------------
case XE_SorG:
- tl_assert(xe);
- VG_(message)(Vg_UserMsg, "Invalid %s of size %ld",
- xe->XE.SorG.sszB < 0 ? "write" : "read",
- Word__abs(xe->XE.SorG.sszB) );
- VG_(pp_ExeContext)( VG_(get_error_where)(err) );
- VG_(message)(Vg_UserMsg, " Address %#lx expected vs actual:",
- xe->XE.SorG.addr);
- VG_(message)(Vg_UserMsg, " Expected: %s", &xe->XE.SorG.expect[0] );
- VG_(message)(Vg_UserMsg, " Actual: %s", &xe->XE.SorG.actual[0] );
+
+ if (xml) {
+
+ emit( " <kind>SorG</kind>\n");
+ emit( " <what>Invalid %s of size %ld</what>\n",
+ xe->XE.SorG.sszB < 0 ? "write" : "read",
+ Word__abs(xe->XE.SorG.sszB) );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ emit( " <auxwhat>Address %#lx expected vs actual:</auxwhat>\n",
+ xe->XE.SorG.addr );
+ emiN( " <auxwhat>Expected: %t</auxwhat>\n",
+ &xe->XE.SorG.expect[0] );
+ emiN( " <auxwhat>Actual: %t</auxwhat>\n",
+ &xe->XE.SorG.actual[0] );
+
+ } else {
+
+ emit( "Invalid %s of size %ld\n",
+ xe->XE.SorG.sszB < 0 ? "write" : "read",
+ Word__abs(xe->XE.SorG.sszB) );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ emit( " Address %#lx expected vs actual:\n", xe->XE.SorG.addr );
+ emit( " Expected: %s\n", &xe->XE.SorG.expect[0] );
+ emit( " Actual: %s\n", &xe->XE.SorG.actual[0] );
+
+ }
break;
//----------------------------------------------------------
if (NONPTR == vseg) {
// Access via a non-pointer
- VG_(message)(Vg_UserMsg, "Invalid %s of size %ld",
- readwrite(xe->XE.Heap.sszB),
- Word__abs(xe->XE.Heap.sszB));
- VG_(pp_ExeContext)( VG_(get_error_where)(err) );
- VG_(message)(Vg_UserMsg,
- " Address %#lx is not derived from any known block", a);
+
+ if (xml) {
+
+ emit( " <kind>Heap</kind>\n");
+ emit( " <what>Invalid %s of size %ld</what>\n",
+ readwrite(xe->XE.Heap.sszB),
+ Word__abs(xe->XE.Heap.sszB) );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ emit( " <auxwhat>Address %#lx is not derived from "
+ "any known block</auxwhat>\n", a );
+
+ } else {
+
+ emit( "Invalid %s of size %ld\n",
+ readwrite(xe->XE.Heap.sszB),
+ Word__abs(xe->XE.Heap.sszB) );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ emit( " Address %#lx is not derived from "
+ "any known block\n", a );
+
+ }
} else {
// Access via a pointer, but outside its range.
? "Doubly-invalid" : "Invalid" );
legit = ( Seg__is_freed(vseg) ? "once-" : "" );
- VG_(message)(Vg_UserMsg, "%s %s of size %ld", how_invalid,
- readwrite(xe->XE.Heap.sszB),
- Word__abs(xe->XE.Heap.sszB));
- VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+ if (xml) {
+
+ emit( " <kind>Heap</kind>\n");
+ emit( " <what>%s %s of size %ld</what>\n",
+ how_invalid,
+ readwrite(xe->XE.Heap.sszB),
+ Word__abs(xe->XE.Heap.sszB) );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ emit( " <auxwhat>Address %#lx is %lu bytes %s "
+ "the accessing pointer's</auxwhat>\n",
+ a, miss_size, place );
+ emit( " <auxwhat>%slegitimate range, "
+ "a block of size %lu %s</auxwhat>\n",
+ legit, Seg__size(vseg),
+ Seg__is_freed(vseg) ? "free'd" : "alloc'd" );
+ VG_(pp_ExeContext)(Seg__where(vseg));
+
+ } else {
+
+ emit( "%s %s of size %ld\n",
+ how_invalid,
+ readwrite(xe->XE.Heap.sszB),
+ Word__abs(xe->XE.Heap.sszB) );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ emit( " Address %#lx is %lu bytes %s the accessing pointer's\n",
+ a, miss_size, place );
+ emit( " %slegitimate range, a block of size %lu %s\n",
+ legit, Seg__size(vseg),
+ Seg__is_freed(vseg) ? "free'd" : "alloc'd" );
+ VG_(pp_ExeContext)(Seg__where(vseg));
+
+ }
+ }
+
+ /* If we have a better description of the address, show it.
+ Note that in XML mode, it will already by nicely wrapped up
+ in tags, either <auxwhat> or <xauxwhat>, so we can just emit
+ it verbatim. */
+ if (xml) {
+
+ if (xe->XE.Heap.descr1)
+ emiN( " %t\n",
+ (HChar*)VG_(indexXA)( xe->XE.Heap.descr1, 0 ) );
+ if (xe->XE.Heap.descr2)
+ emiN( " %t\n",
+ (HChar*)VG_(indexXA)( xe->XE.Heap.descr2, 0 ) );
+ if (xe->XE.Heap.datasym[0] != 0)
+ emiN( " <auxwhat>Address 0x%llx is %llu bytes "
+ "inside data symbol \"%t\"</auxwhat>\n",
+ (ULong)xe->XE.Heap.addr,
+ (ULong)xe->XE.Heap.datasymoff,
+ xe->XE.Heap.datasym );
+
+ } else {
+
+ if (xe->XE.Heap.descr1)
+ emit( " %s\n",
+ (HChar*)VG_(indexXA)( xe->XE.Heap.descr1, 0 ) );
+ if (xe->XE.Heap.descr2)
+ emit( " %s\n",
+ (HChar*)VG_(indexXA)( xe->XE.Heap.descr2, 0 ) );
+ if (xe->XE.Heap.datasym[0] != 0)
+ emit( " Address 0x%llx is %llu bytes "
+ "inside data symbol \"%s\"\n",
+ (ULong)xe->XE.Heap.addr,
+ (ULong)xe->XE.Heap.datasymoff,
+ xe->XE.Heap.datasym );
- VG_(message)(Vg_UserMsg,
- " Address %#lx is %lu bytes %s the accessing pointer's",
- a, miss_size, place);
- VG_(message)(Vg_UserMsg,
- " %slegitimate range, a block of size %lu %s",
- legit, Seg__size(vseg),
- Seg__is_freed(vseg) ? "free'd" : "alloc'd" );
- VG_(pp_ExeContext)(Seg__where(vseg));
}
- if (xe->XE.Heap.descr1[0] != 0)
- VG_(message)(Vg_UserMsg, " %s", xe->XE.Heap.descr1);
- if (xe->XE.Heap.descr2[0] != 0)
- VG_(message)(Vg_UserMsg, " %s", xe->XE.Heap.descr2);
- if (xe->XE.Heap.datasym[0] != 0)
- VG_(message)(Vg_UserMsg, " Address 0x%llx is %llu bytes "
- "inside data symbol \"%s\"",
- (ULong)xe->XE.Heap.addr,
- (ULong)xe->XE.Heap.datasymoff,
- xe->XE.Heap.datasym);
break;
}
tl_assert(BOTTOM != seg1);
tl_assert(BOTTOM != seg2 && UNKNOWN != seg2);
- VG_(message)(Vg_UserMsg, "Invalid arguments to %s", xe->XE.Arith.opname);
- VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+ if (xml) {
- if (seg1 != seg2) {
- if (NONPTR == seg1) {
- VG_(message)(Vg_UserMsg, " First arg not a pointer");
- } else if (UNKNOWN == seg1) {
- VG_(message)(Vg_UserMsg, " First arg may be a pointer");
+ emit( " <kind>Arith</kind>\n");
+ emit( " <what>Invalid arguments to %s</what>\n",
+ xe->XE.Arith.opname );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ if (seg1 != seg2) {
+ if (NONPTR == seg1) {
+ emit( " <auxwhat>First arg not a pointer</auxwhat>\n" );
+ } else if (UNKNOWN == seg1) {
+ emit( " <auxwhat>First arg may be a pointer</auxwhat>\n" );
+ } else {
+ emit( " <auxwhat>First arg derived from address %#lx of "
+ "%lu-byte block alloc'd</auxwhat>\n",
+ Seg__addr(seg1), Seg__size(seg1) );
+ VG_(pp_ExeContext)(Seg__where(seg1));
+ }
+ which = "Second arg";
} else {
- VG_(message)(Vg_UserMsg, " First arg derived from address %#lx of "
- "%lu-byte block alloc'd",
- Seg__addr(seg1), Seg__size(seg1) );
- VG_(pp_ExeContext)(Seg__where(seg1));
+ which = "Both args";
}
- which = "Second arg";
- } else {
- which = "Both args";
- }
- if (NONPTR == seg2) {
- VG_(message)(Vg_UserMsg, " %s not a pointer", which);
+ if (NONPTR == seg2) {
+ emit( " <auxwhat>%s not a pointer</auxwhat>\n", which );
+ } else {
+ emit( " <auxwhat>%s derived from address %#lx of "
+ "%lu-byte block alloc'd</auxwhat>\n",
+ which, Seg__addr(seg2), Seg__size(seg2) );
+ VG_(pp_ExeContext)(Seg__where(seg2));
+ }
+
} else {
- VG_(message)(Vg_UserMsg, " %s derived from address %#lx of "
- "%lu-byte block alloc'd",
- which, Seg__addr(seg2), Seg__size(seg2) );
- VG_(pp_ExeContext)(Seg__where(seg2));
+
+ emit( "Invalid arguments to %s\n",
+ xe->XE.Arith.opname );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ if (seg1 != seg2) {
+ if (NONPTR == seg1) {
+ emit( " First arg not a pointer\n" );
+ } else if (UNKNOWN == seg1) {
+ emit( " First arg may be a pointer\n" );
+ } else {
+ emit( " First arg derived from address %#lx of "
+ "%lu-byte block alloc'd\n",
+ Seg__addr(seg1), Seg__size(seg1) );
+ VG_(pp_ExeContext)(Seg__where(seg1));
+ }
+ which = "Second arg";
+ } else {
+ which = "Both args";
+ }
+ if (NONPTR == seg2) {
+ emit( " %s not a pointer\n", which );
+ } else {
+ emit( " %s derived from address %#lx of "
+ "%lu-byte block alloc'd\n",
+ which, Seg__addr(seg2), Seg__size(seg2) );
+ VG_(pp_ExeContext)(Seg__where(seg2));
+ }
+
}
+
break;
}
// freed block
tl_assert(is_known_segment(seglo));
tl_assert(Seg__is_freed(seglo)); // XXX what if it's now recycled?
- VG_(message)(Vg_UserMsg, "%s%s contains unaddressable byte(s)",
- what, s);
- VG_(pp_ExeContext)( VG_(get_error_where)(err) );
- VG_(message)(Vg_UserMsg, " Address %#lx is %ld bytes inside a "
- "%ld-byte block free'd",
- lo, lo-Seg__addr(seglo),
- Seg__size(seglo) );
- VG_(pp_ExeContext)(Seg__where(seglo));
+ if (xml) {
- } else {
- // mismatch
- VG_(message)(Vg_UserMsg, "%s%s is non-contiguous", what, s);
- VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+ emit( " <kind>SysParam</kind>\n");
+ emit( " <what>%s%s contains unaddressable byte(s)</what>\n",
+ what, s );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ emit( " <auxwhat>Address %#lx is %ld bytes inside a "
+ "%ld-byte block free'd</auxwhat>\n",
+ lo, lo-Seg__addr(seglo), Seg__size(seglo) );
+ VG_(pp_ExeContext)(Seg__where(seglo));
- if (UNKNOWN == seglo) {
- VG_(message)(Vg_UserMsg, " First byte is not inside a known block");
} else {
- VG_(message)(Vg_UserMsg, " First byte (%#lx) is %ld bytes inside a "
- "%ld-byte block alloc'd",
- lo, lo-Seg__addr(seglo),
- Seg__size(seglo) );
+
+ emit( " %s%s contains unaddressable byte(s)\n",
+ what, s );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ emit( " Address %#lx is %ld bytes inside a "
+ "%ld-byte block free'd\n",
+ lo, lo-Seg__addr(seglo), Seg__size(seglo) );
VG_(pp_ExeContext)(Seg__where(seglo));
+
}
- if (UNKNOWN == seghi) {
- VG_(message)(Vg_UserMsg, " Last byte is not inside a known block");
+ } else {
+ // mismatch
+
+ if (xml) {
+
+ emit( " <kind>SysParam</kind>\n");
+ emit( " <what>%s%s is non-contiguous</what>\n",
+ what, s );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ if (UNKNOWN == seglo) {
+ emit( " <auxwhat>First byte is "
+ "not inside a known block</auxwhat>\n" );
+ } else {
+ emit( " <auxwhat>First byte (%#lx) is %ld bytes inside a "
+ "%ld-byte block alloc'd</auxwhat>\n",
+ lo, lo-Seg__addr(seglo), Seg__size(seglo) );
+ VG_(pp_ExeContext)(Seg__where(seglo));
+ }
+
+ if (UNKNOWN == seghi) {
+ emit( " <auxwhat>Last byte is "
+ "not inside a known block</auxwhat>\n" );
+ } else {
+ emit( " <auxwhat>Last byte (%#lx) is %ld bytes inside a "
+ "%ld-byte block alloc'd</auxwhat>\n",
+ hi, hi-Seg__addr(seghi), Seg__size(seghi) );
+ VG_(pp_ExeContext)(Seg__where(seghi));
+ }
+
} else {
- VG_(message)(Vg_UserMsg, " Last byte (%#lx) is %ld bytes inside a "
- "%ld-byte block alloc'd",
- hi, hi-Seg__addr(seghi),
- Seg__size(seghi) );
- VG_(pp_ExeContext)(Seg__where(seghi));
+
+ emit( "%s%s is non-contiguous\n",
+ what, s );
+ VG_(pp_ExeContext)( VG_(get_error_where)(err) );
+
+ if (UNKNOWN == seglo) {
+ emit( " First byte is not inside a known block\n" );
+ } else {
+ emit( " First byte (%#lx) is %ld bytes inside a "
+ "%ld-byte block alloc'd\n",
+ lo, lo-Seg__addr(seglo), Seg__size(seglo) );
+ VG_(pp_ExeContext)(Seg__where(seglo));
+ }
+
+ if (UNKNOWN == seghi) {
+ emit( " Last byte is not inside a known block\n" );
+ } else {
+ emit( " Last byte (%#lx) is %ld bytes inside a "
+ "%ld-byte block alloc'd\n",
+ hi, hi-Seg__addr(seghi), Seg__size(seghi) );
+ VG_(pp_ExeContext)(Seg__where(seghi));
+ }
+
}
+
}
break;
}
tl_assert(xe);
switch (xe->tag) {
case XE_SorG:
- return sizeof(XError);
+ break;
case XE_Heap: {
- tl_assert(sizeof(xe->XE.Heap.descr1) == sizeof(xe->XE.Heap.descr2));
- tl_assert(sizeof(xe->XE.Heap.descr1) > 0);
+ Bool have_descr;
+
tl_assert(sizeof(xe->XE.Heap.datasym) > 0);
- VG_(memset)(&xe->XE.Heap.descr1, 0, sizeof(xe->XE.Heap.descr1));
- VG_(memset)(&xe->XE.Heap.descr2, 0, sizeof(xe->XE.Heap.descr2));
+ xe->XE.Heap.datasymoff = 0;
+ xe->XE.Heap.datasym[0] = 0;
+
+ tl_assert(!xe->XE.Heap.descr1);
+ tl_assert(!xe->XE.Heap.descr2);
+
+ xe->XE.Heap.descr1
+ = VG_(newXA)( VG_(malloc), "pc.update_extra.Heap.descr1",
+ VG_(free), sizeof(HChar) );
+ xe->XE.Heap.descr2
+ = VG_(newXA)( VG_(malloc), "pc.update_extra.Heap.descr1",
+ VG_(free), sizeof(HChar) );
+
VG_(memset)(&xe->XE.Heap.datasym, 0, sizeof(xe->XE.Heap.datasym));
xe->XE.Heap.datasymoff = 0;
- if (VG_(get_data_description)( &xe->XE.Heap.descr1[0],
- &xe->XE.Heap.descr2[0],
- sizeof(xe->XE.Heap.descr1)-1,
- xe->XE.Heap.addr )) {
- tl_assert(xe->XE.Heap.descr1[sizeof(xe->XE.Heap.descr1)-1] == 0);
- tl_assert(xe->XE.Heap.descr1[sizeof(xe->XE.Heap.descr2)-1] == 0);
+
+ have_descr
+ = VG_(get_data_description)( xe->XE.Heap.descr1,
+ xe->XE.Heap.descr2,
+ xe->XE.Heap.addr );
+
+ /* If there's nothing in descr1/2, free it. Why is it safe to
+ to VG_(indexXA) at zero here? Because
+ VG_(get_data_description) guarantees to zero terminate
+ descr1/2 regardless of the outcome of the call. So there's
+ always at least one element in each XA after the call.
+ */
+ if (0 == VG_(strlen)( VG_(indexXA)( xe->XE.Heap.descr1, 0 ))
+ || !have_descr) {
+ VG_(deleteXA)( xe->XE.Heap.descr1 );
+ xe->XE.Heap.descr1 = NULL;
}
- else
- if (VG_(get_datasym_and_offset)( xe->XE.Heap.addr,
- &xe->XE.Heap.datasym[0],
- sizeof(xe->XE.Heap.datasym)-1,
- &xe->XE.Heap.datasymoff )) {
- tl_assert(xe->XE.Heap.datasym[sizeof(xe->XE.Heap.datasym)-1] == 0);
+ if (0 == VG_(strlen)( VG_(indexXA)( xe->XE.Heap.descr2, 0 ))
+ || !have_descr) {
+ VG_(deleteXA)( xe->XE.Heap.descr2 );
+ xe->XE.Heap.descr2 = NULL;
+ }
+
+ /* If Dwarf3 info produced nothing useful, see at least if
+ we can fish something useful out of the ELF symbol info. */
+ if (!have_descr) {
+ if (VG_(get_datasym_and_offset)(
+ xe->XE.Heap.addr, &xe->XE.Heap.datasym[0],
+ sizeof(xe->XE.Heap.datasym)-1,
+ &xe->XE.Heap.datasymoff )
+ ) {
+ tl_assert(xe->XE.Heap.datasym[sizeof(xe->XE.Heap.datasym)-1]
+ == 0);
+ }
}
- return sizeof(XError);
+ break;
}
case XE_Arith:
- return sizeof(XError);
+ break;
case XE_SysParam:
- return sizeof(XError);
+ break;
default:
VG_(tool_panic)("update_extra");
}
+ return sizeof(XError);
}
Bool pc_is_recognised_suppression ( Char* name, Supp *su )
static void pp_StackBlocks ( XArray* sbs )
{
Word i, n = VG_(sizeXA)( sbs );
- VG_(message)(Vg_DebugMsg, "<<< STACKBLOCKS" );
+ VG_(message)(Vg_DebugMsg, "<<< STACKBLOCKS\n" );
for (i = 0; i < n; i++) {
StackBlock* sb = (StackBlock*)VG_(indexXA)( sbs, i );
VG_(message)(Vg_DebugMsg,
- " StackBlock{ off %ld szB %lu spRel:%c isVec:%c \"%s\" }",
+ " StackBlock{ off %ld szB %lu spRel:%c isVec:%c \"%s\" }\n",
sb->base, sb->szB, sb->spRel ? 'Y' : 'N',
sb->isVec ? 'Y' : 'N', &sb->name[0]
);
}
- VG_(message)(Vg_DebugMsg, ">>> STACKBLOCKS" );
+ VG_(message)(Vg_DebugMsg, ">>> STACKBLOCKS\n" );
}
if (moans > 0 && !VG_(clo_xml)) {
moans--;
VG_(message)(Vg_UserMsg, "Warning: bogus DWARF3 info: "
- "overlapping stack blocks");
+ "overlapping stack blocks\n");
if (VG_(clo_verbosity) >= 2)
pp_StackBlocks(orig);
if (moans == 0)
VG_(message)(Vg_UserMsg, "Further instances of this "
- "message will not be shown" );
+ "message will not be shown\n" );
}
VG_(dropTailXA)( orig, VG_(sizeXA)( orig ));
break;
if (already_present && moans > 0 && !VG_(clo_xml)) {
moans--;
VG_(message)(Vg_UserMsg, "Warning: bogus DWARF3 info: "
- "overlapping global blocks");
+ "overlapping global blocks\n");
if (VG_(clo_verbosity) >= 2) {
GlobalTree__pp( gitree,
"add_block_to_GlobalTree: non-exact duplicate" );
}
if (moans == 0)
VG_(message)(Vg_UserMsg, "Further instances of this "
- "message will not be shown" );
+ "message will not be shown\n" );
}
/* tl_assert(!already_present); */
}
if (0 && (sb || gb))
VG_(message)(Vg_DebugMsg,
"exp-sgcheck: new max tree sizes: "
- "StackTree %ld, GlobalTree %ld",
+ "StackTree %ld, GlobalTree %ld\n",
stats__max_sitree_size, stats__max_gitree_size );
}
} else {
{
if (VG_(clo_verbosity) >= 2) {
VG_(message)(Vg_DebugMsg,
- " sg_: %'llu total accesses, of which:", stats__total_accesses);
+ " sg_: %'llu total accesses, of which:\n", stats__total_accesses);
VG_(message)(Vg_DebugMsg,
- " sg_: stack0: %'12llu classify",
+ " sg_: stack0: %'12llu classify\n",
stats__classify_Stack0);
VG_(message)(Vg_DebugMsg,
- " sg_: stackN: %'12llu classify",
+ " sg_: stackN: %'12llu classify\n",
stats__classify_StackN);
VG_(message)(Vg_DebugMsg,
- " sg_: global: %'12llu classify",
+ " sg_: global: %'12llu classify\n",
stats__classify_Global);
VG_(message)(Vg_DebugMsg,
- " sg_: unknown: %'12llu classify",
+ " sg_: unknown: %'12llu classify\n",
stats__classify_Unknown);
VG_(message)(Vg_DebugMsg,
- " sg_: %'llu Invars preened, of which %'llu changed",
+ " sg_: %'llu Invars preened, of which %'llu changed\n",
stats__Invars_preened, stats__Invars_changed);
VG_(message)(Vg_DebugMsg,
- " sg_: t_i_b_MT: %'12llu", stats__t_i_b_empty);
+ " sg_: t_i_b_MT: %'12llu\n", stats__t_i_b_empty);
VG_(message)(Vg_DebugMsg,
- " sg_: qcache: %'llu searches, %'llu probes, %'llu misses",
+ " sg_: qcache: %'llu searches, %'llu probes, %'llu misses\n",
stats__qcache_queries, stats__qcache_probes, stats__qcache_misses);
VG_(message)(Vg_DebugMsg,
- " sg_: htab-fast: %'llu hits",
+ " sg_: htab-fast: %'llu hits\n",
stats__htab_fast);
VG_(message)(Vg_DebugMsg,
- " sg_: htab-slow: %'llu searches, %'llu probes, %'llu resizes",
+ " sg_: htab-slow: %'llu searches, %'llu probes, %'llu resizes\n",
stats__htab_searches, stats__htab_probes, stats__htab_resizes);
}
}