Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorJeff Johnston2018-09-18 19:39:57 +0000
committerJeff Johnston2018-09-18 20:37:15 +0000
commit72ec4daaa546c2b82ae7f02ffdec46bd48c9baec (patch)
treefd9089ba42ab22bd9b00ee4b7ccc1fbe2602d3b4 /debug
parent7831931f3a328fe4672c06445b45496d31e53fa3 (diff)
downloadorg.eclipse.cdt-72ec4daaa546c2b82ae7f02ffdec46bd48c9baec.tar.gz
org.eclipse.cdt-72ec4daaa546c2b82ae7f02ffdec46bd48c9baec.tar.xz
org.eclipse.cdt-72ec4daaa546c2b82ae7f02ffdec46bd48c9baec.zip
Bug 538994 - cdtdebug: argv parameters are wrapper by double-quotes
- modify cdtdebug.sh to use arrays to gather up options and then to use "${options[@]}" in the final string so each option is properly quoted if necessary Change-Id: Id7fec3bb0a6804f2124f837e1171f386ae5801f8
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh b/debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh
index 1583013e8d4..9cc046d3ae1 100644
--- a/debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh
+++ b/debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh
@@ -47,7 +47,7 @@ exit_missing_arg='
echo $0": error: option [$1] requires an argument"; exit 1'
# Parse command line.
-options=
+i=0
while test $# -gt 0 ; do
case $1 in
--help | -h )
@@ -56,20 +56,27 @@ while test $# -gt 0 ; do
echo $0": error: -vmargs option is prohibited"; exit 1;;
-e )
test $# = 1 && eval "$exit_missing_arg"
- options="$options $1 $2"
+ options[i]="$1"
+ let "i+=1"
+ options[i]="$2"
+ let "i+=1"
shift; shift;
# Get all options after -e and protect them from being
# processed by Eclipse as Eclipse options
while test $# -gt 0; do
- options="$options \"$1\""
+ options[i]=$1
+ let "i+=1"
shift;
done ;;
-c | -r )
test $# = 1 && eval "$exit_missing_arg"
- options="$options $1 $2"
+ options[i]="$1"
+ let "i+=1"
+ options[i]="$2"
+ let "i+=1"
shift; shift ;;
* )
- options="$options $1"; shift ;;
+ options[i]="$1"; let "i+=1"; shift ;;
esac
done
@@ -93,6 +100,6 @@ OSGI_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.osgi_*.jar' -not -na
# Run eclipse with the Stand-alone Debugger product specified
"$ECLIPSE_EXEC" -clean -product org.eclipse.cdt.debug.application.product \
-data "$HOME/workspace-cdtdebug" -configuration file\:"$HOME/cdtdebugger" \
- -dev file\:"$HOME/cdtdebugger/dev.properties" $options \
+ -dev file\:"$HOME/cdtdebugger/dev.properties" "${options[@]}" \
-vmargs -Dosgi.jar=$OSGI_JAR -Declipse.home="$ECLIPSE_HOME"

Back to the top