Make heaptrack more compatible with other debug tools.
authorMilian Wolff <mail@milianw.de>
Mon, 15 Jun 2015 19:11:55 +0000 (21:11 +0200)
committerMilian Wolff <mail@milianw.de>
Mon, 15 Jun 2015 19:11:55 +0000 (21:11 +0200)
Ignore any '--' parameter.

heaptrack.sh.cmake

index 8039377..108a33d 100755 (executable)
@@ -95,6 +95,9 @@ while true; do
             exit 0
             ;;
         *)
+            if [[ "$1" == "--" ]]; then
+                shift 1
+            fi
             if [ ! -x "$(which "$1" 2> /dev/null)" ]; then
                 echo "Error: Debuggee \"$1\" is not an executable."
                 echo