|
 |
5c4483 |
diff -up ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh.fix ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh
|
|
 |
5c4483 |
--- ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh.fix 2014-09-18 17:04:12.185250256 -0400
|
|
 |
5c4483 |
+++ ./debug/org.eclipse.cdt.debug.application/scripts/cdtdebug.sh 2014-09-18 17:46:08.236860205 -0400
|
|
 |
5c4483 |
@@ -70,27 +70,33 @@ while test $# -gt 0 ; do
|
|
 |
5c4483 |
esac
|
|
 |
5c4483 |
done
|
|
 |
5c4483 |
|
|
 |
5c4483 |
+ECLIPSE_HOME=@ECLIPSE_HOME@
|
|
 |
5c4483 |
+
|
|
 |
5c4483 |
# Make sure local directory exists and has contents initialized
|
|
 |
5c4483 |
-if [ ! -d "$HOME/cdtdebugger" ]; then
|
|
 |
5c4483 |
- /bin/sh "$SCRIPT_DIR/install.sh" || exit
|
|
 |
5c4483 |
+if [ $0 -nt $HOME/rhcdtdebugger ]; then
|
|
 |
5c4483 |
+rm -rf $HOME/rhcdtdebugger >/dev/null
|
|
 |
5c4483 |
+mkdir -p $HOME/rhcdtdebugger
|
|
 |
5c4483 |
+cp config.ini $HOME/rhcdtdebugger
|
|
 |
5c4483 |
+cp dev.properties $HOME/rhcdtdebugger
|
|
 |
5c4483 |
fi
|
|
 |
5c4483 |
|
|
 |
5c4483 |
# Calculate platform-specific jar file names
|
|
 |
5c4483 |
-ECLIPSE_HOME=$(cd "$SCRIPT_DIR/../../.." && pwd) # install.sh will modify this line. DO NOT REMOVE THE FOLLOWING MARKER: @#@#
|
|
 |
5c4483 |
PLUGIN_DIR="$ECLIPSE_HOME/plugins"
|
|
 |
5c4483 |
+CDT_PLUGIN_DIR="@CDT_DROPINS@"
|
|
 |
5c4483 |
|
|
 |
5c4483 |
OSGI_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.osgi_*.jar' -not -name '*source*' -printf "%f\n" | head -1`
|
|
 |
5c4483 |
-SWT_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.swt.*.jar' -not -name '*source*' -printf "%f\n" | head -1`
|
|
 |
5c4483 |
+SWT_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.swt.*' -not -name '*source*' -printf "%f\n" | head -1`
|
|
 |
5c4483 |
SWT_PLUGIN=`echo $SWT_JAR | sed -e "s/_[0-9]*\..*.jar//"`
|
|
 |
5c4483 |
FS_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.core.filesystem.*.jar' -not -name '*source*' -printf "%f\n" | grep -v java7 | head -1`
|
|
 |
5c4483 |
FS_PLUGIN=`echo $FS_JAR | sed -e "s/_[0-9]*\..*.jar//"`
|
|
 |
5c4483 |
-LINUX_JAR=`find "$PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.cdt.core.linux.*.jar' -not -name '*source*' -printf "%f\n" | head -1`
|
|
 |
5c4483 |
+LINUX_JAR=`find "$CDT_PLUGIN_DIR" -maxdepth 1 -name 'org.eclipse.cdt.core.linux.*.jar' -not -name '*source*' -printf "%f\n" | head -1`
|
|
 |
5c4483 |
LINUX_PLUGIN=`echo $LINUX_JAR | sed -e "s/_[0-9]*\..*.jar//"`
|
|
 |
5c4483 |
|
|
 |
5c4483 |
# Run eclipse with the Stand-alone Debugger product specified
|
|
 |
5c4483 |
"$ECLIPSE_HOME/eclipse" -clean -product org.eclipse.cdt.debug.application.product \
|
|
 |
5c4483 |
- -data "$HOME/workspace-cdtdebug" -configuration file\:"$HOME/cdtdebugger" \
|
|
 |
5c4483 |
- -dev file\:"$HOME/cdtdebugger/dev.properties" $options \
|
|
 |
5c4483 |
+ -application org.eclipse.cdt.debug.application.app \
|
|
 |
5c4483 |
+ -data "$HOME/workspace-rhcdtdebug" -configuration file\:"$HOME/rhcdtdebugger" \
|
|
 |
5c4483 |
+ -dev file\:"$HOME/rhcdtdebugger/dev.properties" $options \
|
|
 |
5c4483 |
-vmargs -Dosgi.jar=$OSGI_JAR -Dswt.plugin=$SWT_PLUGIN -Dfs.plugin=$FS_PLUGIN \
|
|
 |
5c4483 |
-Dlinux.plugin=$LINUX_PLUGIN -Declipse.home="$ECLIPSE_HOME"
|
|
 |
5c4483 |
|
|
 |
5c4483 |
diff -up ./debug/org.eclipse.cdt.debug.application/scripts/install.sh.fix ./debug/org.eclipse.cdt.debug.application/scripts/install.sh
|
|
 |
5c4483 |
--- ./debug/org.eclipse.cdt.debug.application/scripts/install.sh.fix 2014-09-18 17:01:20.261391170 -0400
|
|
 |
5c4483 |
+++ ./debug/org.eclipse.cdt.debug.application/scripts/install.sh 2014-09-18 17:02:00.398058628 -0400
|
|
 |
5c4483 |
@@ -10,34 +10,4 @@
|
|
 |
5c4483 |
# Red Hat Inc. - initial API and implementation
|
|
 |
5c4483 |
###############################################################################
|
|
 |
5c4483 |
|
|
 |
5c4483 |
-# Verify that the install script is being run from a plug-ins folder of a
|
|
 |
5c4483 |
-# downloaded Eclipse and not in a local user .eclipse folder.
|
|
 |
5c4483 |
-
|
|
 |
5c4483 |
-SCRIPT_DIR=`dirname $0`
|
|
 |
5c4483 |
-
|
|
 |
5c4483 |
-if [ ! -f "$SCRIPT_DIR/../../../eclipse" ]; then
|
|
 |
5c4483 |
- echo "$0: error: eclipse executable not found in expected location"
|
|
 |
5c4483 |
- echo " "
|
|
 |
5c4483 |
- echo "This can occur if you are running this script from your local .eclipse directory"
|
|
 |
5c4483 |
- echo "which would mean you are running a shared instance of the Eclipse platform for"
|
|
 |
5c4483 |
- echo "your distro and have installed the Stand-alone Debugger from an eclipse.org"
|
|
 |
5c4483 |
- echo "download repo. Downloading the Stand-alone Debugger feature on top of a distro"
|
|
 |
5c4483 |
- echo "version of Eclipse Debugger is not supported. If you are using a distro version"
|
|
 |
5c4483 |
- echo "of the Eclipse platform, you should not use this script. Instead, install the"
|
|
 |
5c4483 |
- echo "corresponding Eclipse CDT package for your distro (e.g. eclipse-cdt package)"
|
|
 |
5c4483 |
- echo "which will install the Stand-alone Debugger for you."
|
|
 |
5c4483 |
- exit 1
|
|
 |
5c4483 |
-fi
|
|
 |
5c4483 |
-
|
|
 |
5c4483 |
-if [ ! -d "$HOME/cdtdebugger" ]; then
|
|
 |
5c4483 |
- mkdir -p "$HOME/cdtdebugger"
|
|
 |
5c4483 |
-fi
|
|
 |
5c4483 |
-cp "$SCRIPT_DIR/config.ini" "$HOME/cdtdebugger"
|
|
 |
5c4483 |
-cp "$SCRIPT_DIR/dev.properties" "$HOME/cdtdebugger"
|
|
 |
5c4483 |
-cp "$SCRIPT_DIR/cdtdebug.sh" "$HOME/cdtdebugger"
|
|
 |
5c4483 |
-chmod +x "$HOME/cdtdebugger/cdtdebug.sh"
|
|
 |
5c4483 |
-
|
|
 |
5c4483 |
-ECLIPSE_HOME=$(cd "$SCRIPT_DIR/../../.." && pwd)
|
|
 |
5c4483 |
-# Replace the entire line with tag @#@# by the actual location of the eclipse installation
|
|
 |
5c4483 |
-sed -i -e "s,^.*@#@#.*$,ECLIPSE_HOME=$ECLIPSE_HOME," "$HOME/cdtdebugger/cdtdebug.sh"
|
|
 |
5c4483 |
-echo "Installation complete"
|
|
 |
5c4483 |
+echo "Installation already done"
|
|
 |
5c4483 |
diff -up ./debug/org.eclipse.cdt.debug.application/scripts/README.fix ./debug/org.eclipse.cdt.debug.application/scripts/README
|
|
 |
5c4483 |
--- ./debug/org.eclipse.cdt.debug.application/scripts/README.fix 2014-09-18 17:38:12.868978973 -0400
|
|
 |
5c4483 |
+++ ./debug/org.eclipse.cdt.debug.application/scripts/README 2014-09-18 17:43:27.474194808 -0400
|
|
 |
5c4483 |
@@ -3,15 +3,11 @@ is needed of the CDT plug-ins to debug a
|
|
 |
5c4483 |
Editing is allowed, but you will need to rebuild outside the Stand-alone Debugger for
|
|
 |
5c4483 |
those changes to manifest in your debugging session.
|
|
 |
5c4483 |
|
|
 |
5c4483 |
-To install the Stand-alone debugger locally in your $HOME directory, run the install.sh
|
|
 |
5c4483 |
-script found in the scripts sub-directory of the plugins directory in your Eclipse installation:
|
|
 |
5c4483 |
+Running the debugger for the first time will create a rhcdtdebugger directory in your $HOME directory.
|
|
 |
5c4483 |
+This directory will contain a config.ini file and a dev.properties file.
|
|
 |
5c4483 |
|
|
 |
5c4483 |
- ./install.sh
|
|
 |
5c4483 |
-
|
|
 |
5c4483 |
-The install script will create a cdtdebugger directory in your $HOME directory. This
|
|
 |
5c4483 |
-directory will contain a config.ini file, a dev.properties file, and a cdtdebug.sh script.
|
|
 |
5c4483 |
-The cdtdebug.sh script will start the debugger from the command-line. The cdtdebug.sh script
|
|
 |
5c4483 |
-does not have to be located in the cdtdebugger directory and can be moved if you prefer.
|
|
 |
5c4483 |
+Use the cdtdebug command to start the debugger from the command-line. The cdtdebug command is
|
|
 |
5c4483 |
+actually a script that is installed on the default PATH.
|
|
 |
5c4483 |
|
|
 |
5c4483 |
The script takes a few options which are mentioned below:
|
|
 |
5c4483 |
|
|
 |
5c4483 |
@@ -39,8 +35,5 @@ If no -a or -e option is specified, the
|
|
 |
5c4483 |
debugging. Otherwise, if this is the first time, a dialog will be presented to enter
|
|
 |
5c4483 |
an executable, build log, and program arguments.
|
|
 |
5c4483 |
|
|
 |
5c4483 |
- e.g. ~/cdtdebugger/cdtdebug.sh -b ~/build.log ~/myproject/bin/a.out arg1 arg2
|
|
 |
5c4483 |
-
|
|
 |
5c4483 |
-The cdtdebug.sh script that is found in the plug-in can also be run directly, but cannot
|
|
 |
5c4483 |
-be moved. The one installed in the cdtdebugger directory on the other hand, can be moved.
|
|
 |
5c4483 |
+ e.g. cdtdebug -b ~/build.log ~/myproject/bin/a.out arg1 arg2
|
|
 |
5c4483 |
|