Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CDT/StandaloneDebugger"

< CDT
(How to try it out)
(How to try it out)
(12 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
== How to try it out ==
 
== How to try it out ==
  
# Clone the CDT git repository
+
# Get the CPP EPP Luna M5 product for Linux (either x86_64 or x86)
#* git clone git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
+
#* (x86_64) http://mirrors.xmission.com/eclipse/technology/epp/downloads/release/luna/M5/eclipse-cpp-luna-M5-linux-gtk-x86_64.tar.gz
# Checkout the GDBStandalone branch
+
#* (x86) http://mirrors.xmission.com/eclipse/technology/epp/downloads/release/luna/M5/eclipse-cpp-luna-M5-linux-gtk-x86.tar.gz
#* cd org.eclipse.cdt; git checkout GDBStandalone
+
# Untar the CPP EPP into $HOME/eclipse-cpp-luna-m5 or create a link with that name to where ever you place it
# Start up a Kepler 4.3 Eclipse
+
# Get the GDBStandalone jars and copy them into the dropins folder of the Eclipse CPP
#* Go to http://www.eclipse.org/downloads/index-developer.php
+
#* cd $HOME/eclipse-cpp-luna-m5/eclipse/dropins
#* Download and unpack the Eclipse standard package for your system
+
#* wget http://download.eclipse.org/linuxtools/gdbstandalone/*.jar
#* run DIRECTORY_YOU_UNPACKED_TO/eclipse/eclipse -data ~/workspace-gdbstandalone
+
# Get the gdbstandalone command (either for x86_64 linux or x86 linux)
#* this will start up Eclipse
+
#* (x86_64 linux) wget http://download.eclipse.org/linuxtools/gdbstandalone/gdbstandalone.zip
# In Eclipse, import the CDT plug-ins
+
#* (x86 linux) wget http://download.eclipse.org/linuxtools/gdbstandalone/gdbstandalonex86.zip
#* Click from the top menu: File->Import
+
#* unzip gdbstandalone.zip or gdbstandalonex86.zip into your $HOME directory
#* Choose Git->Projects from Git
+
# Run the command
#* Choose "local" repository and click Next
+
#* $HOME/run-gdbstandalone.sh [-b build_log_location] -e executable_path [arg1 ... argn]
#* Click the Add button if org.eclipse.cdt/.git isn't found in list
+
#* this will default to workspace-gdbstandalone
#** Type in the location of the org.eclipse.cdt directory you cloned into
+
#* if you run with no arguments, it will debug the same executable you ran the last time
#** Remember to specify org.eclipse.cdt as part of the location
+
#** Hit Search button
+
#** Make sure the directory with org.eclipse.cdt/.git is checked on
+
#** Hit Finish
+
#* Select the CDT repository (org.eclipse.cdt/.git) and hit Next
+
#* Select to Import Existing Projects from the wizard if not already defaulted
+
#* Click Next
+
#* Select all projects, then deselect all projects that do not start with org.eclipse.cdt or GDBStandalone
+
#** You can also deselect org.eclipse.cdt.p2 projects as well
+
#* Hit Finish
+
# Now import the sample launch configuration
+
#* File->Import...
+
#* Choose Run/Debug->Launch configurations
+
#* Point to your [CDT clone directory]/debug/GDBStandalone/GDBStandalone.application.launch
+
#* Select the launch and hit Finish
+
# Edit the launch configuration
+
#* Click on the top menu: Run
+
#* Select Run Configurations...
+
#* Open up the tree element Eclipse Applications
+
#* Select GDBStandalone
+
#* Select the Arguments tab
+
#* Change the executable after -e to be the location of the executable you want to debug followed by arguments
+
#** In the future a wrapper script will be provided so you can specify this from the command line
+
#** If you have the build log for the executable, add -b [log file location]
+
#*** This will allow the indexer to have all the correct build flags and include paths to index with
+
# The debugger will be up and running
+
# Click on Help->Help Topics to find out how to use the C/C++ debugger
+
# When the executable is complete, you can relaunch
+
#* Right-click on top line
+
#* Choose
+
# If you want, create a new launch to run last executable
+
#* Click on the top menu: Run->Run configurations...
+
#* Open Eclipse Applications and right-click on the GDBStandlone launch you just added'
+
#* Rename it if you want to
+
#* Select Arguments tab
+
#* Remove the -e arguments to end of line
+
#* With no executable specified, the last launch is used, if one exists
+
#* Using the last launch saves cleaning up of the executable and doesn't require importing again
+
  
 
== Status ==
 
== Status ==
Line 101: Line 63:
 
* added support for specifying build console
 
* added support for specifying build console
 
** build console is parsed for flags and include path settings
 
** build console is parsed for flags and include path settings
 +
 +
=== Nov 18, 2013 ===
 +
 +
* added progress dialog
 +
* added support for running via command-line script
 +
** fixed program argument parsing
 +
** figured out what minimally is needed to reuse repository
 +
* fixed some warnings and errors
 +
 +
=== Dec 20, 2013 ===
 +
 +
* added gdbstandalone.zip to run from command line with Luna M4 CPP EPP
 +
* added default jar to use with Eclipse Luna M4 CPP EPP
 +
* completed GDBStandalone.product which contains icons
 +
* added check for invalid executable
 +
** special dialog brought up to fix executable location and enter arguments
 +
* fixed NPE issue when running debugger 2nd time on same workspace
 +
 +
=== Jan 15, 2014 ===
 +
 +
* added New Executable dialog off of File menu to allow specification of different executable to debug
 +
* added Help doc support, but no docs enabled as of yet
 +
* added Customize Perspective from Window menu to allow enablement of Reverse Debugging and C/C++ Tracepoint support
 +
 +
=== Jan 17, 2014 ===
 +
 +
* added Help menu which contains Help Contents, Search, Dynamic Help, and About Eclipse items
 +
 +
=== Feb 07, 2014 ===
 +
 +
* added User Guide which is transformed CDT guide
 +
* added mnemonics for menus
 +
* updated for Luna M5

Revision as of 19:17, 7 February 2014

This page details the effort to create a stand-alone Debugger using Eclipse.

StandaloneDebuggerScreenshot.png


How to try it out

  1. Get the CPP EPP Luna M5 product for Linux (either x86_64 or x86)
  2. Untar the CPP EPP into $HOME/eclipse-cpp-luna-m5 or create a link with that name to where ever you place it
  3. Get the GDBStandalone jars and copy them into the dropins folder of the Eclipse CPP
  4. Get the gdbstandalone command (either for x86_64 linux or x86 linux)
  5. Run the command
    • $HOME/run-gdbstandalone.sh [-b build_log_location] -e executable_path [arg1 ... argn]
    • this will default to workspace-gdbstandalone
    • if you run with no arguments, it will debug the same executable you ran the last time

Status

Sept 17, 2013

  • first pass at standalone GDB debugger using CDT components
  • using Eclipse application and restricting plug-ins used
  • debugger is working but indexer is not being invoked
  • header files not being recognized

Sept 23, 2013

  • added default GCC spec file LanguageSettingsProvider
  • this gets standard header files to open in Outline view

Sept 30, 2013

  • added code to add all source files specified as Project resources
  • this gets indexer to work and adds non-C-standard header file support

Oct 07, 2013

  • Removed Source and Refactoring menus using IActivity filters

Oct 14, 2013

  • added support for reading .debug_macro section to find command-line flags
    • currently not being picked up by indexer for header files

Oct 21, 2013

  • added Dwarf4 support to CDT
    • code submitted upstream for review
  • solved issue with indexer using data discovered from .debug_macro
    • command line macros now discovered from modules compiled with -g3

Oct 28, 2013

  • changed code to clean-up if an executable is specified
    • running again with no executable specified will use the last launch
  • added support for specifying build console
    • build console is parsed for flags and include path settings

Nov 18, 2013

  • added progress dialog
  • added support for running via command-line script
    • fixed program argument parsing
    • figured out what minimally is needed to reuse repository
  • fixed some warnings and errors

Dec 20, 2013

  • added gdbstandalone.zip to run from command line with Luna M4 CPP EPP
  • added default jar to use with Eclipse Luna M4 CPP EPP
  • completed GDBStandalone.product which contains icons
  • added check for invalid executable
    • special dialog brought up to fix executable location and enter arguments
  • fixed NPE issue when running debugger 2nd time on same workspace

Jan 15, 2014

  • added New Executable dialog off of File menu to allow specification of different executable to debug
  • added Help doc support, but no docs enabled as of yet
  • added Customize Perspective from Window menu to allow enablement of Reverse Debugging and C/C++ Tracepoint support

Jan 17, 2014

  • added Help menu which contains Help Contents, Search, Dynamic Help, and About Eclipse items

Feb 07, 2014

  • added User Guide which is transformed CDT guide
  • added mnemonics for menus
  • updated for Luna M5

Copyright © Eclipse Foundation, Inc. All Rights Reserved.