mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-11 22:08:14 +00:00
First pass at adding ability for Memcheck to print all output in XML
form. The relevant flag is --xml=yes. Currently this only works with Memcheck. Specifying this flag fixes various other options relating to verbosity and behaviour of the leak checker, so that the resulting output is in a relatively fixed form suitable for parsing by GUIs. Still to do: * Add mechanism to show error counts * Add regression test * Document the resulting format git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3773
This commit is contained in:
@@ -191,14 +191,26 @@ static void printIpDesc(UInt n, Addr ip)
|
||||
static UChar buf[VG_ERRTXT_LEN];
|
||||
|
||||
VG_(describe_IP)(ip, buf, VG_ERRTXT_LEN);
|
||||
VG_(message)(Vg_UserMsg, " %s %s", ( n == 0 ? "at" : "by" ), buf);
|
||||
|
||||
if (VG_(clo_xml)) {
|
||||
VG_(message)(Vg_UserMsg, " %s", buf);
|
||||
} else {
|
||||
VG_(message)(Vg_UserMsg, " %s %s", ( n == 0 ? "at" : "by" ), buf);
|
||||
}
|
||||
}
|
||||
|
||||
/* Print a StackTrace. */
|
||||
void VG_(pp_StackTrace) ( StackTrace ips, UInt n_ips )
|
||||
{
|
||||
vg_assert( n_ips > 0 );
|
||||
|
||||
if (VG_(clo_xml))
|
||||
VG_(message)(Vg_UserMsg, " <stack>");
|
||||
|
||||
VG_(apply_StackTrace)( printIpDesc, ips, n_ips );
|
||||
|
||||
if (VG_(clo_xml))
|
||||
VG_(message)(Vg_UserMsg, " </stack>");
|
||||
}
|
||||
|
||||
/* Get and immediately print a StackTrace. */
|
||||
|
||||
Reference in New Issue
Block a user