]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Merge coregrind/ changes from branches/MESSAGING_TIDYUP r10464.
authorJulian Seward <jseward@acm.org>
Wed, 15 Jul 2009 14:48:32 +0000 (14:48 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 15 Jul 2009 14:48:32 +0000 (14:48 +0000)
commite7dde85a24ee8155eae1ba06bc36fa32e70860fe
tree347a37b60cc17d32cc3d9b3464b62308066388c3
parentd9a6e3b3f7716513626534d5c5cb476e4d4be284
Merge coregrind/ changes from branches/MESSAGING_TIDYUP r10464.

This commit tidies up and rationalises what could be called the
"messaging" system -- that part of V to do with presenting output to
the user.  In particular it brings significant improvements to XML
output.

Changes are:

* XML and normal text output now have separate file descriptors,
  which solves longstanding problems for XML consumers caused by
  the XML output getting polluted by unexpected non-XML output.

* This also means that we no longer have to hardwire all manner
  of output settings (verbosity, etc) when XML is requested.

* The XML output format has been revised, cleaned up, and made
  more suitable for use by error detecting tools in general
  (various Memcheck-specific features have been removed).  XML
  output is enabled for Ptrcheck and Helgrind, and Memcheck is
  updated to the new format.

* One side effect is that the behaviour of VG_(message) has been
  made to be consistent with printf: it no longer automatically
  adds a newline at the end of the output.  This means multiple
  calls to it can be used to build up a single line message; or a
  single call can write a multi-line message.  The ==pid==
  preamble is automatically inserted at each newline.

* VG_(message)(Vg_UserMsg, ..args..) now has the abbreviated form
  VG_(UMSG)(..args..); ditto VG_(DMSG) for Vg_DebugMsg and
  VG_(EMSG) for Vg_DebugExtraMsg.  A couple of other useful
  printf derivatives have been added to pub_tool_libcprint.h,
  most particularly VG_(vcbprintf).

* There's a small change in the core-tool interface to do with
  error handling: VG_(needs_tool_errors) has a new method
  void (*before_pp_Error)(Error* err)  which, if non-NULL, is
  called just before  void (*pp_Error)(Error* err).  This is to
  give tools the chance to look at errors before any part of them
  is printed, so they can print any XML preamble they like.

* coregrind/m_errormgr.c has been overhauled and cleaned up, and
  is a bit simpler and more commented.  In particular pp_Error
  and VG_(maybe_record_error) are significantly changed.

The diff is huge, but mostly very boring.  Most of the changes
are of the form

-   VG_(message)(Vg_UserMsg, "this is a message %d", n);
+   VG_(message)(Vg_UserMsg, "this is a message %d\n", n);

Unfortunately as a result of this, it touches a large number
of source files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10465
48 files changed:
coregrind/m_commandline.c
coregrind/m_coredump/coredump-elf.c
coregrind/m_debugger.c
coregrind/m_debuginfo/d3basics.c
coregrind/m_debuginfo/debuginfo.c
coregrind/m_debuginfo/readdwarf.c
coregrind/m_debuginfo/readdwarf3.c
coregrind/m_debuginfo/readelf.c
coregrind/m_debuginfo/readpdb.c
coregrind/m_debuginfo/readstabs.c
coregrind/m_debuginfo/readxcoff.c
coregrind/m_debuginfo/storage.c
coregrind/m_demangle/demangle.c
coregrind/m_errormgr.c
coregrind/m_execontext.c
coregrind/m_libcassert.c
coregrind/m_libcprint.c
coregrind/m_libcproc.c
coregrind/m_main.c
coregrind/m_mallocfree.c
coregrind/m_options.c
coregrind/m_redir.c
coregrind/m_replacemalloc/replacemalloc_core.c
coregrind/m_scheduler/scheduler.c
coregrind/m_sigframe/sigframe-amd64-linux.c
coregrind/m_sigframe/sigframe-ppc32-aix5.c
coregrind/m_sigframe/sigframe-ppc32-linux.c
coregrind/m_sigframe/sigframe-ppc64-aix5.c
coregrind/m_sigframe/sigframe-ppc64-linux.c
coregrind/m_sigframe/sigframe-x86-linux.c
coregrind/m_signals.c
coregrind/m_stacks.c
coregrind/m_stacktrace.c
coregrind/m_syswrap/syswrap-aix5.c
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/m_syswrap/syswrap-main.c
coregrind/m_syswrap/syswrap-ppc32-linux.c
coregrind/m_syswrap/syswrap-ppc64-linux.c
coregrind/m_syswrap/syswrap-x86-linux.c
coregrind/m_tooliface.c
coregrind/m_translate.c
coregrind/m_transtab.c
coregrind/m_ume/main.c
coregrind/pub_core_libcprint.h
coregrind/pub_core_options.h
coregrind/pub_core_tooliface.h