]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Make error messages at start-up more consistent. Every line of such
authorNicholas Nethercote <njn@valgrind.org>
Tue, 6 Jul 2010 04:05:23 +0000 (04:05 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Tue, 6 Jul 2010 04:05:23 +0000 (04:05 +0000)
commit11f94ef626165beac82bac7a41aa05db431a1c39
treec8c0d2de114b9acc4f0c7637585f854dbc1015fc
parentd5e8a6384bcdec692eca759f98765e6669b0a30b
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
16 files changed:
cachegrind/cg_main.c
callgrind/sim.c
coregrind/m_libcprint.c
coregrind/m_main.c
coregrind/m_options.c
coregrind/m_replacemalloc/replacemalloc_core.c
coregrind/m_ume/main.c
coregrind/pub_core_libcprint.h
coregrind/pub_core_options.h
include/pub_tool_libcprint.h
include/pub_tool_options.h
include/pub_tool_tooliface.h
massif/ms_main.c
memcheck/mc_main.c
none/tests/cmdline2.stdout.exp
none/tests/cmdline4.stderr.exp