1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00
cdt/debug/org.eclipse.cdt.debug.application/scripts
Marc Khouzam f6534f6922 Improve Standalone Debugger scripts
- Fix indentation
- Call install.sh from cdtdebug.sh if installation needed.
  This should help the user realize they can run the script
  outside if the eclipse installation directory after the first time.
- Use a subshell to run pwd to avoid having to actually change
directory.
- Tag the line that needs to be modified with a marker to make it
future-proof.
- Use find instead of ls which is easier to parse.
- Allow to run install.sh without doing a cd to its location
- Allow to run original cdtdebug.sh without doing a cd to its location

Change-Id: I3f63dcf8a307784b0c38a286e645ea962ce62dc4
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/29834
Tested-by: Hudson CI
2014-07-29 08:16:32 -04:00
..
cdtdebug.sh Improve Standalone Debugger scripts 2014-07-29 08:16:32 -04:00
config.ini Bug 436260 - Standalone Debugger not starting 2014-06-04 16:52:15 -04:00
dev.properties Add CDT Standalone Debugger 2014-05-05 15:39:30 -04:00
install.sh Improve Standalone Debugger scripts 2014-07-29 08:16:32 -04:00
README Bug 436893 - workspace should be renamed for Standalone Debugger 2014-06-09 15:30:52 -04:00

The CDT Stand-alone Debugger brings up an minimal Eclipse instance which has all that
is needed of the CDT plug-ins to debug a C/C++ executable.  Build is not supported.
Editing is allowed, but you will need to rebuild outside the Stand-alone Debugger for
those changes to manifest in your debugging session.

To install the Stand-alone debugger locally in your $HOME directory, run the install.sh
script directly from the scripts sub-directory of the plugins directory in your
Eclipse installation:

  sh ./install.sh

The script uses relative directories so you cannot run the script from any other working directory.

The install script will create a cdtdebugger directory in your $HOME directory.  This
directory will contain a config.ini file, a dev.properties file, and a cdtdebug.sh script.
The cdtdebug.sh script will start the debugger from the command-line.  The cdtdebug.sh script
does not have to be located in the cdtdebugger directory and can be moved if you prefer.

The script takes a few options which are mentioned below:

-data : workspace to use for your Eclipse session if you do not want the default
        $HOME/workspace-cdtdebug
        
-consoleLog : if you want error messages reported directly to the command console

-a		 : specify attaching to an existing executable on system.  A dialog will
           be brought up to allow you to select which one.
           
-b $PATH : path to build log for an executable.  This will be used to figure out
           include paths and compilation flags.  This option assumes you will
           be using the -e option described below.
           
-c $CPATH : path to core-file.  This option must precede a -e option to specify an
            executable.
            
-e $PATH [args...] : path to your executable to debug plus any optional command line
                     arguments to pass to main().  This option must be last and should
                     not precede any other arguments as they will be treated as arguments
                     to main.
                     
If no -a or -e option is specified, the last executable debugged via -e will be offered for
debugging.  Otherwise, if this is the first time, a dialog will be presented to enter
an executable, build log, and program arguments.

  e.g. sh ~/cdtdebugger/cdtdebug.sh -b ~/build.log ~/myproject/bin/a.out arg1 arg2

The cdtdebug.sh script that is found in the plug-in can also be run directly, but only
from the scripts directory as it uses relative directories to find the Eclipse instance and
the plugins directory.  The one installed in the cdtdebugger directory replaces these
relative directory references with absolute ones.

  e.g. sh ./cdtdebug.sh -b ~/build.log ~/myproject/bin/a.out arg1 arg2