aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2011-02-25 18:21:45 +0100
committerPatrik Nyblom <[email protected]>2011-02-25 18:24:43 +0100
commit1b161433719e79d812b61672f1a864886a5aa8d3 (patch)
treeca487389cce5ea9d6474f94e9d62c1f07f2a86d0 /erts/etc
parentb0d6abb72cf32df548703b284b737a4a7c0a9d8a (diff)
downloadotp-1b161433719e79d812b61672f1a864886a5aa8d3.tar.gz
otp-1b161433719e79d812b61672f1a864886a5aa8d3.tar.bz2
otp-1b161433719e79d812b61672f1a864886a5aa8d3.zip
Teach cerl to handle newer valgrind
Diffstat (limited to 'erts/etc')
-rw-r--r--erts/etc/unix/cerl.src19
1 files changed, 14 insertions, 5 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index 73b1bafbe0..b873f04dd3 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -228,17 +228,26 @@ if [ $run_valgrind != yes ]; then
fi
if [ "x$GDB" = "x" ]; then
if [ $run_valgrind = yes ]; then
+ valversion=`valgrind --version`
+ valmajor=`echo $valversion | sed 's,[a-z]*\-\([0-9]*\).*,\1,'`
+ valminor=`echo $valversion | sed 's,[a-z]*\-[0-9]*.\([0-9]*\).*,\1,'`
emu_xargs=`echo $xargs | sed "s|+|-|g"`
- if [ "x$VALGRIND_LOG_DIR" = "x" ]; then
- valgrind_log=
- else
- valgrind_log="--log-file=$VALGRIND_LOG_DIR/$VALGRIND_LOGFILE_PREFIX$VALGRIND_LOGFILE_INFIX$EMU.log"
- fi
if [ "x$VALGRIND_LOG_XML" = "x" ]; then
valgrind_xml=
+ log_file_prefix="--log-file="
else
export VALGRIND_LOG_XML
valgrind_xml="--xml=yes"
+ log_file_prefix="--xml-file="
+ fi
+ if [ "x$VALGRIND_LOG_DIR" = "x" ]; then
+ valgrind_log=
+ else
+ if [ $valmajor -gt 2 -a $valminor -gt 4 ]; then
+ valgrind_log="$log_file_prefix$VALGRIND_LOG_DIR/$VALGRIND_LOGFILE_PREFIX$VALGRIND_LOGFILE_INFIX$EMU.log.$$"
+ else
+ valgrind_log="$log_file_prefix$VALGRIND_LOG_DIR/$VALGRIND_LOGFILE_PREFIX$VALGRIND_LOGFILE_INFIX$EMU.log"
+ fi
fi
if [ "x$VALGRIND_MISC_FLAGS" = "x" ]; then
valgrind_misc_flags=