]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
When user asks enough verbosity, also give the full version in preamble
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 21 Nov 2017 21:17:47 +0000 (22:17 +0100)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 21 Nov 2017 21:17:47 +0000 (22:17 +0100)
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

index f6ba2022e278e2bf50df9495461e96902d8ee99a..3c437e4d9a62d5580a2ef35f2af779f76fc99a00 100644 (file)
@@ -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