From 75b92a2ec92132259711cfb6986217941383bd44 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 14 Jul 2009 06:55:05 +0000 Subject: [PATCH] Shorten the preamble by moving some of it into the --help output. This partly fixes bug 197933. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10451 --- coregrind/m_main.c | 32 ++++++-------------- memcheck/tests/long_namespace_xml.stderr.exp | 3 -- memcheck/tests/xml1.stderr.exp32 | 3 -- memcheck/tests/xml1.stderr.exp64 | 3 -- none/tests/cmdline1.stdout.exp | 9 +++--- none/tests/cmdline2.stdout.exp | 9 +++--- tests/filter_stderr_basic | 8 ++--- 7 files changed, 19 insertions(+), 48 deletions(-) diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 19273e76ef..f41f201830 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -207,12 +207,11 @@ static void usage_NORETURN ( Bool debug_help ) "\n" " Extra options read from ~/.valgrindrc, $VALGRIND_OPTS, ./.valgrindrc\n" "\n" -" Valgrind is Copyright (C) 2000-2009 Julian Seward et al.\n" -" and licensed under the GNU General Public License, version 2.\n" -" Bug reports, feedback, admiration, abuse, etc, to: %s.\n" +" %s is %s\n" +" Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al\n" +" LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP\n" "\n" -" Tools are copyright and licensed by their authors. See each\n" -" tool's start-up message for more information.\n" +" Bug reports, feedback, admiration, abuse, etc, to: %s.\n" "\n"; Char* gdb_path = GDB_PATH; @@ -242,7 +241,8 @@ static void usage_NORETURN ( Bool debug_help ) VG_(printf)(" (none)\n"); } } - VG_(printf)(usage3, VG_BUGS_TO); + VG_(printf)(usage3, VG_(details).name, VG_(details).copyright_author, + VG_BUGS_TO); VG_(exit)(0); } @@ -789,10 +789,8 @@ static void print_preamble(Bool logging_to_fd, const char* toolname) VG_(details).description, xpost); - if (VG_(strlen)(toolname) >= 4 - && 0 == VG_(strncmp)(toolname, "exp-", 4)) { - VG_(message)( - Vg_UserMsg, + if (VG_(strlen)(toolname) >= 4 && VG_STREQN(4, toolname, "exp-")) { + VG_UMSG( "%sNOTE: This is an Experimental-Class Valgrind Tool.%s", xpre, xpost ); @@ -802,21 +800,9 @@ static void print_preamble(Bool logging_to_fd, const char* toolname) xpre, VG_(details).copyright_author, xpost); /* Core details */ - VG_(message)(Vg_UserMsg, - "%sUsing LibVEX, a library for dynamic binary translation.%s", - xpre, xpost ); VG_(message)(Vg_UserMsg, - "%sCopyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP.%s", + "%sBuilt with Valgrind and LibVEX; rerun with -h for copyright info%s", xpre, xpost ); - VG_(message)(Vg_UserMsg, - "%sUsing valgrind-%s, a dynamic binary instrumentation framework.%s", - xpre, VERSION, xpost); - VG_(message)(Vg_UserMsg, - "%sCopyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al.%s", - xpre, xpost ); - - if (VG_(clo_verbosity) == 1 && !VG_(clo_xml)) - VG_(message)(Vg_UserMsg, "For more details, rerun with: -v"); if (VG_(clo_xml)) VG_(message)(Vg_UserMsg, ""); diff --git a/memcheck/tests/long_namespace_xml.stderr.exp b/memcheck/tests/long_namespace_xml.stderr.exp index 362d27c01b..3cff7c7f1a 100644 --- a/memcheck/tests/long_namespace_xml.stderr.exp +++ b/memcheck/tests/long_namespace_xml.stderr.exp @@ -8,9 +8,6 @@ ... ... ... - ... - ... - ... ... diff --git a/memcheck/tests/xml1.stderr.exp32 b/memcheck/tests/xml1.stderr.exp32 index 1e3d4bc191..de2c4f6bb0 100644 --- a/memcheck/tests/xml1.stderr.exp32 +++ b/memcheck/tests/xml1.stderr.exp32 @@ -8,9 +8,6 @@ ... ... ... - ... - ... - ... ... diff --git a/memcheck/tests/xml1.stderr.exp64 b/memcheck/tests/xml1.stderr.exp64 index c83a95f35d..439311684e 100644 --- a/memcheck/tests/xml1.stderr.exp64 +++ b/memcheck/tests/xml1.stderr.exp64 @@ -8,9 +8,6 @@ ... ... ... - ... - ... - ... ... diff --git a/none/tests/cmdline1.stdout.exp b/none/tests/cmdline1.stdout.exp index 6e680bcd61..4d30986a03 100644 --- a/none/tests/cmdline1.stdout.exp +++ b/none/tests/cmdline1.stdout.exp @@ -51,10 +51,9 @@ usage: valgrind [options] prog-and-args Extra options read from ~/.valgrindrc, $VALGRIND_OPTS, ./.valgrindrc - Valgrind is Copyright (C) 2000-2009 Julian Seward et al. - and licensed under the GNU General Public License, version 2. - Bug reports, feedback, admiration, abuse, etc, to: www.valgrind.org. + Nulgrind is Copyright (C) 2002-2009, and GNU GPL'd, by Nicholas Nethercote. + Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al + LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP - Tools are copyright and licensed by their authors. See each - tool's start-up message for more information. + Bug reports, feedback, admiration, abuse, etc, to: www.valgrind.org. diff --git a/none/tests/cmdline2.stdout.exp b/none/tests/cmdline2.stdout.exp index 79c2a6e4d8..60d81cb22d 100644 --- a/none/tests/cmdline2.stdout.exp +++ b/none/tests/cmdline2.stdout.exp @@ -96,10 +96,9 @@ usage: valgrind [options] prog-and-args Extra options read from ~/.valgrindrc, $VALGRIND_OPTS, ./.valgrindrc - Valgrind is Copyright (C) 2000-2009 Julian Seward et al. - and licensed under the GNU General Public License, version 2. - Bug reports, feedback, admiration, abuse, etc, to: www.valgrind.org. + Nulgrind is Copyright (C) 2002-2009, and GNU GPL'd, by Nicholas Nethercote. + Valgrind is Copyright (C) 2000-2009, and GNU GPL'd, by Julian Seward et al + LibVEX is Copyright (C) 2004-2009, and GNU GPL'd, by OpenWorks LLP - Tools are copyright and licensed by their authors. See each - tool's start-up message for more information. + Bug reports, feedback, admiration, abuse, etc, to: www.valgrind.org. diff --git a/tests/filter_stderr_basic b/tests/filter_stderr_basic index a7b2e7413c..f792587af8 100755 --- a/tests/filter_stderr_basic +++ b/tests/filter_stderr_basic @@ -18,17 +18,13 @@ sed "/^--[0-9]\{1,7\}:0:*/d" | # Remove "WARNING: assuming toc 0x.." strings sed "/^WARNING: assuming toc 0x*/d" | -# Remove "Using valgrind..." line and the following +# Remove "Built with Valgrind and LibVEX..." line and the following # copyright notice line. Tools have to filter their own line themselves. -sed "/^Using valgrind-.*, a dynamic binary instrumentation framework/ , /./ d" | +sed "/^Built with Valgrind and LibVEX; rerun with -h for copyright info/ d" | # ... and also remove the "Using LibVEX..." line and the one after it. sed "/^Using LibVEX, a library for dynamic binary translation/ , /./ d" | -# Remove other introductory lines -sed "/Estimated CPU clock rate is [0-9]* MHz/d" | -sed "/For more details, rerun with: -v/d" | - # Anonymise line numbers in vg_replace_malloc.c, remove dirname if present perl -p -e "s/(m_replacemalloc\/)?vg_replace_malloc.c:[0-9]*/vg_replace_malloc.c:.../" | -- 2.47.3