summaryrefslogtreecommitdiff
path: root/coregrind/pub_core_options.h
diff options
context:
space:
mode:
authorsewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2009-07-15 14:48:32 +0000
committersewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>2009-07-15 14:48:32 +0000
commit738856f99eea33d86ce91dcb1d6cd5b151e307ca (patch)
tree347a37b60cc17d32cc3d9b3464b62308066388c3 /coregrind/pub_core_options.h
parent93106a1425334d30a619690a60a23a51ef12baee (diff)
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'coregrind/pub_core_options.h')
-rw-r--r--coregrind/pub_core_options.h28
1 files changed, 6 insertions, 22 deletions
diff --git a/coregrind/pub_core_options.h b/coregrind/pub_core_options.h
index 73f4a630..b113a7e9 100644
--- a/coregrind/pub_core_options.h
+++ b/coregrind/pub_core_options.h
@@ -65,30 +65,14 @@ extern Bool VG_(clo_trace_children);
intermingled with the parent's output. This is especially
problematic when VG_(clo_xml) is True. Setting
VG_(clo_child_silent_after_fork) causes children to fall silent
- after fork() calls. */
+ after fork() calls. Although note they become un-silent again
+ after the subsequent exec(). */
extern Bool VG_(clo_child_silent_after_fork);
-/* Where logging output is to be sent to.
-
- With --log-fd (and by default), clo_log_fd holds the file id, and is
- taken from the command line. (fd 2, stderr, is the default.)
- clo_log_name is irrelevant.
-
- With --log-file, clo_log_name holds the log-file name, and is taken from
- the command line (and possibly has process ID/env var contents in it, if
- the %p or %q format specifiers are used). clo_log_fd is then made to
- hold the relevant file id, by opening clo_log_name (concatenated with the
- process ID) for writing.
-
- With --log-socket, clo_log_name holds the hostname:portnumber pair,
- and is taken from the command line. clo_log_fd is then made to hold
- the relevant file handle, by opening a connection to that
- hostname:portnumber pair.
-
- Global default is to set log_to == VgLogTo_Fd and log_fd == 2
- (stderr). */
-extern Int VG_(clo_log_fd);
-extern Char* VG_(clo_log_name);
+/* If the user specified --log-file=STR and/or --xml-file=STR, these
+ hold STR after expansion of the %p and %q templates. */
+extern Char* VG_(clo_log_fname_expanded);
+extern Char* VG_(clo_xml_fname_expanded);
/* Add timestamps to log messages? default: NO */
extern Bool VG_(clo_time_stamp);