From 0a5ff8c309d18778bb919a1a661a1976b04a6483 Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Tue, 21 Nov 2017 22:17:47 +0100 Subject: [PATCH] When user asks enough verbosity, also give the full version in preamble so that e.g. valgrind -v date produces ==7639== Using Valgrind-3.14.0.GIT-c470e0c23c-20171120X and LibVEX; rerun with -h for copyright info to give the verbose version. --- coregrind/m_libcprint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c index f6ba2022e2..3c437e4d9a 100644 --- a/coregrind/m_libcprint.c +++ b/coregrind/m_libcprint.c @@ -29,6 +29,7 @@ The GNU General Public License is contained in the file COPYING. */ +#include "vgversion.h" #include "pub_core_basics.h" #include "pub_core_vki.h" #include "pub_core_vkiscnums.h" @@ -164,7 +165,7 @@ void VG_(print_preamble)(Bool logging_to_fd) /* Core details */ umsg_or_xml( "%sUsing Valgrind-%s and LibVEX; rerun with -h for copyright info%s\n", - xpre, VERSION, xpost); + xpre, VG_(clo_verbosity) <= 1 ? VERSION : VERSION "-" VGGIT, xpost); // Print the command line. At one point we wrapped at 80 chars and // printed a '\' as a line joiner, but that makes it hard to cut and -- 2.47.2