History log of /external/valgrind/coregrind/m_libcprint.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b3a1e4bffbdbbf38304f216af405009868f43628 21-Aug-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates, to include 2015. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
8eb8bab992e3998c33770b0cdb16059a8b918a06 21-Jul-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Bug 345248 - add support for Solaris OS in valgrind

Authors of this port:
Petr Pavlu setup@dagobah.cz
Ivo Raisr ivosh@ivosh.net
Theo Schlossnagle theo@omniti.com



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
68c62931cb136f5e79da49ae855b91dd1f618f8d 21-Apr-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move a comment useful to the caller to the .h, rather than keeping it
in the .c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15127 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
596b3febd09acf0ef8acc562472d2aac19482b63 20-Apr-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove function sr_ResHI from Linux specific code.
Add function VG_(sr_as_string).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15116 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
227a1ecca7f44cb07e74aa8f1bd24b29df629499 12-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add limited support for printing floating point numbers to
VG_(debugLog_vprintf).
Remove function VG_(percentify) and fix up its call sites (part of
fixing BZ #337869.
Allow the width in a format specification to be '*', i.e. the width is
given as an additional function argument.

The limitations for printing floating point numbers are:
(1) %f is the only supported format. Width and precision can be
specified.
(2) Funny numbers (NaN and such) are not supported.
(3) Floating point numbers need to be benign in the sense that their
integral part fits into an ULong.
This is good enough for our purposes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14806 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
5b99e6669a0b2a925bb3fb2604259cc317963b6d 29-Nov-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix BZ 334802. Patch by Mark Wielaard with a few mods to make it apply.
r14794 is related as well.
Also: remove -Wno-format-zero-length from compile options.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14795 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
77dec3a379afc466a7cff8cfd905d0ccd62e7b46 14-Nov-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Pass buffer size to VG_(elapsed_wallclock_time) so the function
can check it's large enough.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14724 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
12d2eb58c09505f8b1a171bcdd8352c9713591b4 30-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge revisions 14222, 14268, and 14270 from the BUF_REMOVAL branch to trunk.
Assorted fixes in exp-bbv to eliminate a few buffers.
Implement a suggestion found in the massif source, namely to add the
equivalent of fprintf to m_libcprint. Good suggestion. Thusly
- VgFile: similar to FILE; buffered output, 8k buffer
- VG_(fopen): similar to fopen, but with arguments as in VG_(open)
- VG_(fprintf) and VG_(vfprintf): like [v]fprintf with VgFile 1at argument
- VG_(fclose)
Change massif, exp-bbv and cachegrind to use this functionality.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14678 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
be1036eebe7972602e1d3493f18651bfb954e0c7 17-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove some dead code.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14637 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
35a82d2777d20a0bf421a6b947ec028e46b7b085 14-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge revisions 14220, 14221, and 15629 from BUF_REMOVAL branch to trunk.
Couple of format fixes and FIXMEs for VG_(percentify).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14630 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
3e81b8bed1f7ab6848a83f5507487131a6f9d778 07-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge revisions 14230, 14602, and 14604 from the BUF_REMOVAL branch to trunk.
The change eliminates the fixed size buffers in gen_suppression and
show_used_suppressions. This is achieved by changing the return type from
VG_TDICT_CALL(tool_get_extra_suppression_info and
VG_TDICT_CALL(tool_print_extra_suppression_use from Bool to SizeT.
A return value of 0 indicates that nothing (except the terminating '\0'
which is always inserted) was written to the buffer. This corresponds to the
previous False return value. A return value which is equal to the buffer
size (that was passed in as function argument) indicates that the buffer was
not large enough. The caller then resizes the buffer and retries.
Otherwise, the buffer was large enough.
Regtested with a resize value of 1.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14606 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
a4ca4fef8c189e861492e1e2b36b52ba3fca1725 16-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix incorrect use of VG_(tool_panic). Adapt checker script accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14544 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
e2800c958044937e72eefa371c10ae47ac40e089 15-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> coregrind files shall use vg_assert not tl_assert.
Tool files shall use tl_assert not vg_assert.
Fix code accordingly.
Adapted check_headers_and_includes to make sure the code
stays clean in that respect.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14542 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
ec905f7ed1659f2251045114c785659fbb11ea88 17-Aug-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> The attached patch cleanups the clo processing
of clo which are (or should be) 'enum set'.

* pub_tool_options.h : add new macrox VG_USET_CLO and VG_USETX_CLO to
parse an 'enum set' command line option (with or without "all" keyword).

* use VG_USET_CLO for existing enum set clo options:
memcheck --errors-for-leak-kinds, --show-leak-kinds, --leak-check-heuristics
coregrind --vgdb-stop-at

* change --sim-hints and --kernel-variants to enum set
(this allows to detect user typos: currently, a typo in a sim-hint
or kernel variant is silently ignored. Now, an error will be given
to the user)

* The 2 new sets (--sim-hints and --kernel-variants) should not make
use of the 'all' keyword => VG_(parse_enum_set) has a new argument
to enable/disable the use of the "all" keyword.

* The macros defining an 'all enum' set definition was duplicating
all enum values (so addition of a new enum value could easily
give a bug). Removing these macros as they are unused
(to the exception of the leak-kind set).
For this set, the 'all macro' has been replaced by an 'all function',
coded using parse_enum_set parsing the "all" keyword.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14301 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
07c08527f05caeb0062b42ca9a58ee774ec5fba1 14-May-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factorises the address code description and printing
of memcheck and helgrind in a common module:
pub_tool_addrinfo.h pub_core_addrinfo.h m_addrinfo.c

At the same time, the factorised code is made usable by other
tools also (and is used by the gdbserver command 'v.info location'
which replaces the helgrind 'describe addr' introduced 1 week ago
and which is now callable by all tools).

The new address description code can describe more addresses
(e.g. for memcheck, if the block is not on the free list anymore,
but is in an arena free list, this will also be described).

Similarly, helgrind address description can now describe more addresses
when --read-var-info=no is given (e.g. global symbols are
described, or addresses on the stack are described as
being on the stack, freed blocks in the arena free list are
described, ...).
See e.g. the change in helgrind/tests/annotate_rwlock.stderr.exp
or locked_vs_unlocked2.stderr.exp

The patch touches many files, but is basically a lot of improvements
in helgrind output files.
The code changes are mostly refactorisation of existing code.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13965 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
1a046d5a3c34f924b648cc22c01f0a8e02ca221e 16-Sep-2013 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Include pub_core/tool_clreq.h instead of valgrind.h where apropriate.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13555 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
c91f58449e6fc2a4ce0851639a342c4277612fbb 15-Sep-2013 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix inclusion of header files in coregrind. No pub_tool_*.h should be
included here.
Added pub_core_poolalloc.h and renamed pub_tool_inner.h to pub_core_inner.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13548 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
02ea4132fcf47a67ece0513c8a1737bc5db6fdc6 04-Sep-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix 324514 gdbserver monitor cmd output behaviour consistency + allow user
to put a "marker" msg in process log output

* v.info n_errs_found accepts optional msg, added in the output of
the monitor command.

* use VG_(printf) rather than VG_(gdb_printf) when output of command
should be redirected according to v.set gdb_output|log_output|mixed_output

* also avoid calling gdb_printf in output sink processing
to output zero bytes, as gdb_printf expects to have a null terminated
string, which is not ensured when 0 bytes have to be output.

* some minor reformatting (replace char* xxx by char *xxx).




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13532 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
3a00f5277ed3b83f2e76303991ace9bd24877120 26-Feb-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix vassert_fail producing random output for an empty format
vsnprintf does not do any addition to the buffer for an empty
format. So, buf was not null terminated.
This e.g. causes an assert_fail to output random characters
after the failed expression.
Fix by ensuring the buffer of vsnprintf is always null terminated
to start with.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13291 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
dbb3584f591710a15a437918c0fc27e300993566 27-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> More Char/HChar fixes and constification.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13088 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
0447bbd096d5b08db6e4483b8138888a9fa0802a 17-Oct-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix 308341 vgdb should report process exit (or fatal signal)
patch from Mark Wielaard.
(with small modifications).
Also clarified some comments related to the resume reply.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13052 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
bbd9a21ca8518fc34cd7b6254a61d72f82495120 14-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Char/ HChar cleanup: The various panic and printf-like functions
all take const HChar * arguments.
__FILE__ and __func__ expand into string literals (or character
arrays initialised by them), as do strings created by the preprocessor
e.g. #stuff.
This change reduces the number of warnings from 17000+ to ~5500


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13039 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
72faf10172c04674ac1e31cf4f7e57be241da7da 11-Mar-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Allows to run regression tests in an outer/inner setup.

A '3 lines how to':
perl tests/vg_regtest --outer-valgrind=../trunk_untouched/install/bin/valgrind --all
(the outer results for a test xxx is in xxx.outer.log)
To run with another tool (e.g. drd), add the argument --outer-tool=drd


Still to do/things to improve:

* Most (inner) tests are successful when running under an outer
memcheck. Need to analyse the reasons of remaining failures.

* The memcheck annotations in m_mallocfree.c can be improved:
- A superblock is marked 'undefined', it should rather be marked
'no access'.
- When a free block is splitted, the remaining free block is
not made 'no access'. Instead, it is made 'undefined'.
=> this decreases the chance to find bugs.
=> this is not very efficient (e.g. the rest of a superblock
is often marked undefined repetitively).
Similarly, the free block created by VG_(arena_memalign)
is marked 'undefined'. 'No access' would be preferrable.
- mkInuseBlock marks the new block as undefined. This is probably
not needed, as VALGRIND_MALLOCLIKE_BLOCK will do it already.
- VG_(arena_malloc) should give the requested size to
VALGRIND_MALLOCLIKE_BLOCK, not the malloc usable size,
as this decreases the chance to find buffer overrun bugs.
But giving the requested size is tricky (see comments in
the code).

* need to do memcheck annotations in m_poolalloc.c
so as to allow leak checking for pool allocated elements.

* vg_regtest.in
- should analyse the results of the outer and should
produce a separate result for the tests for which
the outer detects an error or a memory leak or ...


Changes done:
README_DEVELOPERS: document the new outer/inner features.
manual-core.xml: document the new sim-hint no-inner-prefix
tests/outer_inner.supp: new file, containing the suppressions for inner.
vg_regtest.in: implement new args --outer-valgrind, --outer-tool, --outer-args.
m_mallocfree.c: annotations for memcheck.
m_libcprint.c: handle the new sim-hint no-inner-prefix
m_main.c: do an (early) parse of --sim-hints




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12441 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
b3af9cf0b234d0d188347d92944e04ac9c8fbcd0 06-Oct-2011 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Format functions: change format specifier %t into %pS. Remove the _no_f_c formatting function variants.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12108 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
1763e815a2ae21db24f7a819f0a713ac0cf8a239 12-Jul-2011 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make the location for temporary files configurable at runtime.
To that effect observe the environment variable TMPDIR. If defined,
its value takes precedence over VG_TMPDIR.
Because the directory name is no longer a compile time constant,
VG_(err_config_error) was changed to take a variable argument list.
Fixes #267020.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11892 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
3b290486cd4cd601b20e04340e593c9ed9717e5f 06-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
c7ffc94890e120c72d5802487b1092425323dc02 28-Mar-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11673 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
18a71e810d4c20cf08774d76bbd4e1e58ccecf14 06-Jul-2010 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Replace the handful of uses of Vg_ExtraDebugMsg and VG_(emsg) with
Vg_DebugMsg and VG_(dmsg).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11210 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
b1cc5d666cc8f8065419e4a8c819ed0b8256a764 06-Jul-2010 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make error messages at start-up more consistent. Every line of such
messages now begin with "valgrind: ", and they're more often printed before
the preamble. This required introducing a new message kind, Vg_FailMsg, and
functions VG_(fmsg) and VG_(fmsg_bad_option), and removing
VG_(err_bad_option).

Where we used to have horrible output like this:

[ocean:~/grind/ws2] vg5 --tool=massif --threshold=101 date
==31877== Massif, a heap profiler
==31877== Copyright (C) 2003-2010, and GNU GPL'd, by Nicholas Nethercote
==31877== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright info
==31877== Command: date
==31877==
==31877== --threshold must be between 0.0 and 100.0
valgrind: Bad option '--threshold'; aborting.
valgrind: Use --help for more information.

We now have nice output like this:

[ocean:~/grind/ws2] vg2 --tool=massif --threshold=101 date
valgrind: Bad option: --threshold=101
valgrind: --threshold must be between 0.0 and 100.0
valgrind: Use --help for more information or consult the user manual.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11209 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
8ddb93a6bb78015a042cf0b512199f70be9a0373 15-Feb-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of kludgey and non-functional PID caching in the printing
mechanism.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11046 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
ee2965794d41a5418edd7f10f9472bbaff45937d 04-Jan-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Disable pid caching for print output: it's wrong in a child after
a fork() and is very confusing.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11017 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
82baca7d2c2dd74a7cdecaf7aef7edb2231b1489 24-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> This was meant to go in with r10573.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10574 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
738856f99eea33d86ce91dcb1d6cd5b151e307ca 15-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> 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
/external/valgrind/coregrind/m_libcprint.c
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
a0b6b2cf9abc7b0d87be1215a245eaccc0452af9 07-Jul-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged FORMATCHECK branch (r8368) to trunk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
5018f533d9eabd64845b871be7e59ea2b148a933 16-Apr-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fixed compiler warning.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7884 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
14b151d5a123b26c60aa240c43630703dec90ca6 14-Apr-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove VG_ prefixing from static (non-exported) functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7876 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
1a0cb6a6445213408e938455f1ec9299e24c56e3 14-Apr-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Extended VG_(message)() buffer from 100 to 128 characters. Made sure that lines printed by different threads are not mixed up in the output.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7875 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
6e31f80899f1c79a54f164955069f3f74fe8b7e2 17-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a new flag, --child-silent-after-fork=no|yes [no]. When enabled,
causes child processes after fork to fall completely silent, which can
make the output a lot less confusing. In addition it is pretty much
essential in XML output mode, so as to avoid mixing up any child XML
output with the parent's.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7177 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
8a7b41b41b46c0aa7bd4b6678b82285437e7f08c 23-Sep-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix various format string errors, courtesy of Florian Krohm.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6902 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
03e2bb86b50e50bd1786a900595c4df552b4352a 24-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Always ensure that the output buffer is zero-terminated, even if it is
already full. (Nick N)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6417 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
4cfea4f9480393ed6799db463b2e0fb8865a1a2f 14-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that. Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.

include/pub_tool_basics.h previously dragged in the entire kernel
interface. I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly. This is why there are many modified .c files -- they have
all acquired an extra #include line.

This certainly breaks all platforms except x86. Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
592ae0985ef9a72d2dd0ec52f3361955d0ba72b4 08-Nov-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Reinstate timestamping, sort-of, having trashed VG_(ctime) as part of
the glibc-removal process. Timestamps are now printed in terms of
elapsed wallclock time since startup, shown as days, hours, minutes,
seconds and milliseconds. The arithmetic is done with 32-bit unsigned
ints, so people doing Valgrind runs that last longer than 49.71 days
are going to see some funny results :-)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5042 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
45f4e7c91119c7d01a59f5e827c67841632c9314 27-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive). That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome. The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
and include it in a couple of places. Building etc seems to still
work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
stuff was moved from -generic to -linux after the branch was created.
I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
is strange, and makes it hard to diagnose regtest failures. In
particular memcheck/tests/x86/scalar.stderr.exp remains in a
conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable. I'll
attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
5eaff2fd1fdde317468f5545e180373a13e502ad 25-Sep-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix incorrect computation of miss rates due to Int/Long mixups <sigh>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4769 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
a11553a1f8f0ba3d56744e328583cc0dbc834878 19-Jul-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move the code for generating a human-readable time string into its own
function.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4181 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
641e616c41f850b777953c57b1673d4ac2eb2c19 17-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make VG_(percentify)() cope if the denominator is zero.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4149 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
7a5915e9d68cafbfa58d5c02a8aadeef3395446a 17-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix comments.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4148 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
856c54e8c6a56e5a29124a5ee3cb12b37b850342 26-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Combine the percentify() functions from Cachegrind and m_transtab into
a single more general one exported from m_libcprint.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4034 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
24a6efb2f94eb0cb5d53174d580e1dc00893a6d6 20-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove some unnecessary #includes, comment some others.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3966 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
c7561b931e249acf3768ead77638545b0ccaa8f1 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Final commit for the initial modularisation pass:

- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
f39e9a36dca9642668a66c6b054f81c88650bcb9 12-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Finished the modularisation of vg_mylibc.c, which meant it could be removed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3894 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
eb8896b58301a0a7a34281384d705072994369f0 04-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised file and socket libc stuff in m_libcfile.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3844 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
132bfccd21960e462352175f8553a5bdce8a210c 04-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised assertions and panics in m_libcassert.

As part of this, killed the VG_STRINGIFY macro, which was used to expand
out names like "VG_(foo)" and "vgPlain_foo" in assertion failure
messages. This is good since we actually want the "VG_(foo)" form used
in these messages.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3842 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c
c44a6c2b3b25f094850685904269822e2fa3e433 03-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> whoops, add this



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3841 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_libcprint.c