summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/gdb_run6
-rw-r--r--source4/script/valgrind_run7
2 files changed, 11 insertions, 2 deletions
diff --git a/source4/script/gdb_run b/source4/script/gdb_run
index 146259d705..8ad101ed60 100755
--- a/source4/script/gdb_run
+++ b/source4/script/gdb_run
@@ -1,5 +1,9 @@
#!/bin/sh
+ENV="$1"
+
+shift 1
+
if test -z "$TMPDIR"; then
TMPDIR="/tmp"
fi
@@ -13,4 +17,4 @@ EOF
trap "/bin/rm -f $TMPFILE" EXIT
CMD="gdb -x $TMPFILE --args $@"
echo $CMD
-eval "$CMD"
+eval $ENV "$CMD"
diff --git a/source4/script/valgrind_run b/source4/script/valgrind_run
index 6aa54c70f1..45361c22b1 100644
--- a/source4/script/valgrind_run
+++ b/source4/script/valgrind_run
@@ -1,2 +1,7 @@
#!/bin/sh
-valgrind -q --db-attach=yes --num-callers=30 $@
+
+ENV="$1"
+
+shift 1
+
+$ENV valgrind -q --db-attach=yes --num-callers=30 $@