mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
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
This commit is contained in:
parent
7831931f3a
commit
72ec4daaa5
1 changed files with 13 additions and 6 deletions
|
@ -47,7 +47,7 @@ exit_missing_arg='
|
||||||
echo $0": error: option [$1] requires an argument"; exit 1'
|
echo $0": error: option [$1] requires an argument"; exit 1'
|
||||||
|
|
||||||
# Parse command line.
|
# Parse command line.
|
||||||
options=
|
i=0
|
||||||
while test $# -gt 0 ; do
|
while test $# -gt 0 ; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--help | -h )
|
--help | -h )
|
||||||
|
@ -56,20 +56,27 @@ while test $# -gt 0 ; do
|
||||||
echo $0": error: -vmargs option is prohibited"; exit 1;;
|
echo $0": error: -vmargs option is prohibited"; exit 1;;
|
||||||
-e )
|
-e )
|
||||||
test $# = 1 && eval "$exit_missing_arg"
|
test $# = 1 && eval "$exit_missing_arg"
|
||||||
options="$options $1 $2"
|
options[i]="$1"
|
||||||
|
let "i+=1"
|
||||||
|
options[i]="$2"
|
||||||
|
let "i+=1"
|
||||||
shift; shift;
|
shift; shift;
|
||||||
# Get all options after -e and protect them from being
|
# Get all options after -e and protect them from being
|
||||||
# processed by Eclipse as Eclipse options
|
# processed by Eclipse as Eclipse options
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
options="$options \"$1\""
|
options[i]=$1
|
||||||
|
let "i+=1"
|
||||||
shift;
|
shift;
|
||||||
done ;;
|
done ;;
|
||||||
-c | -r )
|
-c | -r )
|
||||||
test $# = 1 && eval "$exit_missing_arg"
|
test $# = 1 && eval "$exit_missing_arg"
|
||||||
options="$options $1 $2"
|
options[i]="$1"
|
||||||
|
let "i+=1"
|
||||||
|
options[i]="$2"
|
||||||
|
let "i+=1"
|
||||||
shift; shift ;;
|
shift; shift ;;
|
||||||
* )
|
* )
|
||||||
options="$options $1"; shift ;;
|
options[i]="$1"; let "i+=1"; shift ;;
|
||||||
esac
|
esac
|
||||||
done
|
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
|
# Run eclipse with the Stand-alone Debugger product specified
|
||||||
"$ECLIPSE_EXEC" -clean -product org.eclipse.cdt.debug.application.product \
|
"$ECLIPSE_EXEC" -clean -product org.eclipse.cdt.debug.application.product \
|
||||||
-data "$HOME/workspace-cdtdebug" -configuration file\:"$HOME/cdtdebugger" \
|
-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"
|
-vmargs -Dosgi.jar=$OSGI_JAR -Declipse.home="$ECLIPSE_HOME"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue