Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] More web site updates


Here are two updates for the CDT web site:

An updated FAQ -- belongs in cdt-home/user   I did not produce a patch -- the changes are substantial.

A news page (in patch form)


        - Dave

Title: cdt user FAQ

CDT FAQ
frequently asked question and answers

CDT User FAQ

The following is the official CDT FAQ. This document is a work in progress -- feedback is appreciated. 


Table of contents:
General Goto Toptop
  1. What is the CDT?

    The CDT (C/C++ Development Tools) Project is working towards providing a fully functional C and C++ Integrated Development Environment (IDE) for the Eclipse platform. 

    There are a number of groups contributing to the CDT; We strongly encourage interested parties to extend our work, thereby making the Eclipse CDT project a richer set of freely available resources. We are looking for contributions from the open source community in the areas of test, development, documentation, and general users who can help us ensure that the C/C++ tools work well on all the Eclipse platforms.   

    Our current release function includes:

    • C/C++ Editor (basic functionality, syntax highlighting, code completion etc.)
    • C/C++ Debugger (APIs & Default implementation, using GDB)
    • C/C++ Launcher (APIs & Default implementation, launches and external application)
    • Parser
    • Search Engine
    • Content Assist Provider
    • Makefile generator

    Default implementations of all interfaces and extension points will be supplied for various platforms.

    The CDT is fully open-source and implemented purely in java as a set of plugins to the Eclipse platform. To learn more visit the CDT Home Page.


  2. How is the CDT licensed?

    The CDT consists of software produced by the CDT team combined with third party software developed from other Open Source Projects. The software produced by the CDT team is licensed under the Common Public License. The software designed by third parties is made available under their respective licenses. Refer to the about.html file in the root directory of every CDT plugin for specific licensing information.


  3. How is the CDT Project organized?

    Visit CDT Project Structure to find out more about the organization of CDT (History, participants, and project structure).


  4. How do I find out about future releases of the CDT?

    The official CDT Development plans are here:

    • Plans -- this is the page that contains all the new plans and meeting minutes, and
    • CDT 2.0 Plan - This plan is a description of the ongoing development on CDT 2.0.  It is subject to change.

    If you wish to contribute to the development of the CDT, we welcome the opportunity to work with you. The plans will be updated to reflect the commitments made by contributors to this projects.  See Working on the CDT for information on how to get started.

    Release Milestones (which represent planned availability dates for Stable CDT builds) are noted in the CDT Plan Documents which can be found on the CDT Overview Page. To see the currently available CDT builds, visit the CDT Download Page.


  5. What is the default configuration supported by the CDT?

    This is a bit of a moving target, but currently the compiler supported (from an error parsing point of view) is gcc, the debugger interface will work with gdb 5.2.1 and the default build command is GNU "make".


  6. Which operating systems does the CDT support?

    The CDT Framework is platform independent. It will run where Eclipse will run. However, the default implementations may depend on external applications. To follow in the Eclipse spirit of open source, the default implementations rely upon freely available open source tools, such as the GNU Tools: GDB and Make. Therefore, the dependencies on GDB for debugging, or Make for building, will require that these applications are available for the platform that the user wishes to use. References to some of the known implementations for each platform will be indicated in the sections of this FAQ that include instructions for installation, project creation and building the CDT on the various platforms.

    Which platforms are fully supported will ultimately depend on the needs of the community, as expressed by the participation in developing, and testing for each platform.

    The core plugins are written in Java with no native code and thus may be ported to any platform supported by Eclipse. However, some default implementations may require that other software or tools, licensed under GNU, may be required.

    In general there is some version of linux and some version of windows used by the developers on the CDT.  For an exact list of supported platforms see the Downloads page

    Eclipse Target Operating Environments

    The objective is to support the CDT on all target operating environments listed in the Eclipse 3.0 Project Plan.

    Eclipse SDK 3.0 is tested and validated on the following reference platforms (this list is updated over the course of the release cycle):

    Eclipse Reference Platforms
    Operating system Processor architecture Window system Java 2 Platform
    Microsoft Windows XP Intel x86 Win32 * Sun Java 2 SDK, Standard Edition, version 1.4.2_03 for Microsoft Windows
    Microsoft Windows XP Intel x86 Win32 IBM 32-bit SDK for Windows, Java 2 Technology Edition, Version 1.4.1
    * Red Hat Enterprise Linux WS 3 Intel x86 GTK * Sun Java 2 SDK, Standard Edition, 1.4.2_03 for Linux x86
    * Red Hat Enterprise Linux WS 3 Intel x86 GTK IBM 32-bit SDK for Linux on Intel architecture, Java 2 Technology Edition, Version 1.4.1
    SuSE Linux 8.2 Intel x86 GTK * Sun Java 2 SDK, Standard Edition, 1.4.2_03 for Linux x86
    SuSE Linux 8.2 Intel x86 GTK IBM 32-bit SDK for Linux on Intel architecture, Java 2 Technology Edition, Version 1.4.1
    Sun Solaris 8 SPARC Motif * Sun Java 2 SDK, Standard Edition, 1.4.2_03 for Solaris SPARC
    HP HP-UX 11i hp9000
    PA-RISC
    Motif * HP-UX SDK for the Java 2 platform, version 1.4.2.00 for hp9000 PA-RISC
    * IBM AIX 5L Version 5.2 PowerPC Motif IBM 32-bit SDK for AIX, Java 2 Technology Edition, Version 1.4.1
    * Apple Mac OS X 10.3 PowerPC Carbon Java 2 Standard Edition 1.4.1 for Mac OS X
    QNX Neutrino RTOS [version TBD] Intel x86 Photon IBM J9 VM for QNX [version TBD]

    * Although untested, Eclipse should work fine on other OSes that support the same window system. For Win32: Windows 98, ME, NT, 2000, and Server 2003; SWT HTML viewer requires Internet Explorer 5 (or higher). For GTK on other Linux systems: version 2.2.1 of the GTK+ widget toolkit and associated librares (GLib, Pango); SWT HTML viewer requires Mozilla 1.4GTK2. For Motif on other Linux systems: Open Motif 2.1 (included); SWT HTML viewer requires Mozilla 1.4GTK2.


  7. Why isn't the XXX operating system supported by CDT?

    "Supported" has a particular meaning to us. It means that on that platform we have a good level of confidence that CDT works correctly and that its function is appropriate and complete. That means

    • someone has ensured that the function addresses the important use cases
    • the function is exercised by regular execution of a test plan
    • identified problems are tracked to resolution
    • there is a recipient for user feedback
    • code patches are developed as necessary to correct or extend CDT on that platform
    To make this all happen a platform has an Owner - someone who accepts the responsibility to make sure those things all happen.

    The Framework supports all the platforms that Eclipse does. The CDT team is responsible for ensuring that this remains true for the framework. Specific default implementations will work only on platforms where the required applications are available. The following list is derived from the initial CDT meeting in July 2002. The following companies have agreed to provide support for the associated platforms:

    Platform Company
    QNX NeutrinoQNX Software Systems Ltd.
    LinuxIBM, Red Hat
    WindowsIBM, MontaVista with initial support from QNX

    If you have a favorite platform we highly encourage you to get involved and volunteer to own a feature that does not currently have an implementation that works on your platform of choice.   See Working on the CDT for more information.


  8. How do I ask questions?

    CDT related questions that are not answered in this FAQ or the documentation should be posted to the CDT newsgroup. You will need a password. You can also use this simple web interface to browse the newsgroup.

    General Questions about the Eclipse SDK which includes the Eclipse Platform , JDT (Java Development Tools), or PDE (Plugin Development Environment) should be posted to the Eclipse newsgroup.

    Keep in mind that these newsgroups are public, so do not include any confidential information in your questions. You should also read "How to ask questions the smart way" by Eric Raymond before participating in the newsgroups. NOTE: Please submit bugs to bugzilla, not to the newsgroups. See the How do I report a bug or request a feature? section of this document.

    People will still come into a newsgroup asking questions that have been answered before and often will not provide any information about what versions they have installed, and what the problem is.  You will be much more likely to get help if you provide enough information to reproduce the problem.  The section on how to report a bug gives a list of some information which could be useful.


  9. How do I report a bug or request a feature?
  10. The CDT Project (like the Eclipse Project) uses bugzilla as its bug and feature tracking system. Entering a bug\feature report is as simple as filling in a web form on the eclipse bugzilla page. The first time you enter a bug you will need to create a new bugzilla account for yourself by providing an email address and choosing a password.

    Before entering a bug report, you should search bugzilla to see if someone else has already entered a bug report similar to yours. If you find a bug report that outlines the problem you are seeing, you can simply annotate it with your comments to let the developers know that you have also hit the bug. Also you can add yourself to the CC list of the bug so that you will notified when the status of the bug changes or someone adds comments.

    Once you have searched bugzilla and not found anything, you can go ahead and enter a new bug report. Please read the bug writing guidelines located on the eclipse bug reporting page.

    To make your bug report more helpful include the following in your bug reports:

    Environmental settings:

    1. The build level of Eclipse that you are using. For example, "Eclipse 3.0M6"
    2. The build level of CDT that you are using. For example, "CDT build 2.0.0.0026"
    3. Your computer's specifications (OS version + patch level, memory, other pertinent info)
    4. The contents of your .log file (or lack thereof). This is especially important if you get a dialog that reports an internal error. See What is this .log file I hear so much about? for information on on finding your .log file.
    5. The Java runtime or development kit you are using to run eclipse (use java -version or java -fullversion)

    Problem Description:

    1. A description of what you were doing,
    2. A description of what behavior that you observed, and
    3. An explanation of how the observed behavior differs from the expected behavior


  11. Where is this .log file that I hear so much about?

    The .log file is located in the workspace/.metadata directory.

    The .log file is used by the Eclipse Platform to log runtime errors. It is useful to include it in bug reports because it contains stacktraces that occur in plug-ins. When you report a bug, make sure to include your .log file!


  12. How do I update this FAQ?

    Feedback sent do the cdt-dev developer mailing list will be incorporated into future version of this FAQ.


  13. Where do I find more information about the CDT?

    Online manuals and tutorial

    CDT Project website

    CDT Newsgroup

    Developer mailing list

    Eclipse Project FAQ


  14. Where do I find the CDT documentation?

    The CDT Manuals are part of the CDT install.   To view the books open Help Contents from the Help menu and then select a book from the combo box.

    There is also some designer documentation on the CDT website.


 

Download and Installation Goto Toptop
  1. Which CDT build should I download?

    Check the CDT Download Page for information on which CDT Build to use. Currently the following builds are available there:

    CDT 1.2

    • The CDT 1.2 stream is now in maintenance mode. A new release, 1.2.1 is expected in the first quarter of 2004. The 1.2 stream runs against versions 2.1.x of Eclipse. It does not run against Eclipse 3.0 builds.
    • CDT 1.2 Note: For CDT 1.2, the standard make project type and the new managed make project type have been separated out from the CDT "Platform".  When using the update site, please install the CDT feature as well as the Standard Build feature and optionally the Managed Make feature, in that order, or optionally selecting them and installing them at the same time (Process All). Other release notes for CDT 1.2 are available here.

    CDT 2.0

    • The CDT 2.0 stream is currently under development. The objective of this stream is to keep up with the Eclipse 3.0 development and is targeted at release in sync with Eclipse 3.0, i.e. June 2004.

    CDT 1.0

    • CDT 1.0 is the first release of CDT.   It is not recommended

    CDT 1.1

    • CDT 1.1 is is the second release of CDT.  It is not recommended.

  2. How do I download the CDT?

    The best place to look for instructions is the CDT Download Page.   However, here is a summary (which is probably out of date):

    CDT 1.2

    (must have Eclipse 2.1.X installed)

    CDT release builds are made available on the CDT release update site. Use the following URL in a Site Bookmark in the update manager:

    http://update.eclipse.org/tools/cdt/updates/release

    To access the Update Manager, select Software Updates->Update Manager from the Help menu. To access an update site, select New->Site Bookmark from the context menu in the Feature Updates view. In the New Site Bookmark dialog, enter a name for the site (any name) and enter the URL for the update site. You can then expand the site bookmark in the Feature Updates view to reveal the available downloads.

    Currently, CDT releases 1.2 and 1.1 are available as well as releases of CDT/CPPUnit Integration. As new releases are made and new features are added, they will appear in this update site.

    For those who need the flexibility of the old zip distributions, they are available here.

     

    CDT 2.0

    (Requires some form of Eclipse 3.0)

    General Instructions The CDT 2.0 stream is currently under development. The objective of this stream is to keep up with the Eclipse 3.0 development and is targeted at release in sync with Eclipse 3.0, i.e. June 2004.

    To install the update in Eclipse 3.0, first uninstall any CDT version you happen to have currently installed. Then from the menu bar,

    • select Help->Software Updates->Find and Install...,
    • select “Search for new features to install”,
    • add the update site with the above URL,
    • and proceed through the rest of the wizard.

    As with 1.2, please make sure you install one or both builders to ensure you can create a C/C++ project (clicking on Select All works nicely).

     

    CDT 2.0 Development Stream The CDT 2.0 M6 build is available from the following update site:

    http://update.eclipse.org/tools/cdt/updates/builds/2.0

    The builds are all created from the head stream;  They will usually work with the latest milestone build of Eclipse -- your mileage may vary.

    CDT 2.0 M6 The CDT 2.0 M6 build is available from the following update site:

    http://update.eclipse.org/tools/cdt/updates/builds/2.0M6

    There is a zip file available http://update.eclipse.org/tools/cdt/updates/builds/2.0M6/cdt.zip.  Note that CDT 2.0 M6 will only run against Eclipse 3.0 M6 and later. This should hopefully be the last Eclipse 3.0 milestone release where platform API changes blow us out of the water.

    CDT 2.0 M7 The CDT 2.0 M7 build is available from the following update site:

    http://update.eclipse.org/tools/cdt/updates/builds/2.0M7

    Use the update manager mechanisms described in "CDT 2.0".  If you are redistributing the CDT or are having trouble with the Update Site, a zip file containing the entire CDT distribution is available here.  Note that CDT 2.0 M7 will run against Eclipse 3.0 M6 and later (but not earlier).

     


  3. I can't find the CDT download for the XXX operating system?

    The CDT is supported on the platforms specified on the download page. The downloads are structured and named to indicate, which OS and windowing system it runs on. If you do not see your OS/windowing system combination please contact us. We are always looking for volunteers to test and support platforms.

    Much of the CDT default functionality uses applications that are available on most operating systems. The CDT leverages some default system tools such as gdb(debugging), make(building). These tools are available for many platforms and if they exist on your system, there is a good chance that the default functionality will work.  See Compilers and other 3rd party tools for more information

    The caveat is that the operation of the CDT on some operating systems has not been fully tested and we cannot commit time to fixing platform specific problems found on these platforms. However, code submissions from developers wanting to improve the CDT will always be gratefully accepted.  See Working ON the CDT for more information.


  4. How do I uninstall CDT?

    We do not currently ship an uninstaller. You can uninstall the CDT manually:

    1. Shutdown the eclipse shell that is running CDT
    2. Remove the CDT plugins
      • Navigate to the directory where the CDT plugins are installed (typically eclipse/plugins)
      • Remove the following plugins:
        • org.eclipse.cdt.*
    3. Remove the CDT metadata
      • Navigate to the workspace/.metadata/.plugins directory
      • Remove the following directories (if they exist):
        • org.eclipse.cdt.*
    4. Restart Eclipse

C/C++ Project Creation Goto Toptop
  1. Creating a simple Managed C++ Project -- "Hello World on a Windows Platform"

    This section will use an example to create the familiar "Hello World!" C++ program. First, ensure that you have the CDT installed within Eclipse, as described above. Open a C/C++ Perspective and complete the following steps:

    1. In the C/C++ Projects View right click and select "New Project ..."
    2. Select "C++" in the left pane and the select "Managed Make C++ Project"
    3. Enter a name for the new project and select Finish. Note: you can determine the "Build Settings" from this dialog, but we will do so later, in the build section.
    4. In the C/C++ Projects View right click and select "New" > "Simple" > "File". Name your file hello.cpp
    5. Copy the following text into the "hello.cpp" file:
                    
      #include <stdio.h>
      int main()
      {
          printf("Hello World\n");
                          
          //block until user types something
          fgetc(stdin);
          return 0;
      } 
                    

      Now, save the file.
       


  2. Creating a simple Standard C++ Project -- "Hello World on a Windows Platform"

    This section will use an example to create the familiar "Hello World!" C++ program. First, ensure that you have the CDT installed within Eclipse, as described above. Open a C/C++ Perspective and complete the following steps:

    1. In the C/C++ Projects View right click and select "New Project ..."
    2. Select "C++" in the left pane and the select "Standard Make C++ Project"
    3. Enter a name for the new project and select Finish. Note: you can determine the "Build Settings" from this dialog, but we will do so later, in the build section.
    4. In the C/C++ Projects View right click and select "New" > "Simple" > "File". Name your file hello.cpp
    5. Repeat the previous step and name the second new file "makefile".
    6. Copy the following text into the "hello.cpp" file:
      #include <stdio.h>
      int main()
      {
          printf("Hello World\n");
                          
          //block until user types something
          fgetc(stdin);
          return 0;
      } 
      

      Now, save the file.

    7. Copy the following text into the "makefile" file:
      Remember that makefile requires that indented lines use a <tab> character and not spaces
      hello.exe : hello.o
      	g++ -o hello.exe hello.o
      
      hello.o : hello.cpp
      	g++ -c hello.cpp
      	
      all : hello.exe
      clean :
      	-rm hello.exe hello.o
               

      Now, save the file.


  3. How do I create a new project using a directory full of existing source?

    If the source is accessible to the user from thier desktop using the command line then it is possible to simply make the root directories containing that source as Eclipse projects. This is accomplished by invoking the New Project Wizard, selecting C or C++ and then Standard Make Project as the project type. On the next page, enter a name for the project, the deselect the "Use Default Location" checkbox. This will let you Browse to the root folder of the source tree. After setting other information and clicking on Finish, the project will be created in the root of the source folder you have selected.

    The resource for the project are maintained in the remote location specified, not in the workspace folder for eclipse. Meta data for the project, such as the index for the project and the "link" to the project, is stored in the metadata directory in the workspace folder.


  4. How do I create a new project using CVS?

    If the existing source tree is managed in CVS, it is possible to use the CVS Repository perspective to "Checkout As Project" any folder in the repository. The first time this is done, a Simple Project is created for the folder. To access the features of the CDT for this project, the project must be converted to a C or C++ project using the "Convert to a C or C++ Project" project type in the New Wizard.

    This does a CVS checkout of the project into the project's location (usually in the workspace).


  5. How do I Import existing code into an existing project?

    Another approach would be to create the C/C++ Project and then do an "Import"->"File System". This will make a copy of the files from the selected location into the selected folder in the project. With the copy, this approach is more wasteful and detaches the source from any control mechanism that existed in the originaly file location (e.g. a ClearCase view)


Editing C/C++ Projects Goto Toptop
  1. I'd like to use the code assist functionality, but it doesn't seem to work for me. I don't get anything showing up when I select CTRL+SPACE in a C/C++ source file.

    Content Assist is a work in Progress. For CDT 2.0 you should be able to ask for code completion anywhere in your source file. If you fail to find a completion you expect to find, most probably this is because of a failure in parsing your source file. In this case, check that you have added the correct set of include paths to the project containing your source file.

    For example in the following code:

    int main() {
        pr
    }

    You should not expect "pr" to provide "printf" as a completion unless:

    1. You have an #include <stdio.h>  in the file
    2. the include path to stdio.h is available in the project
    3. any macro's necessary to read stdio.h are set (often a missing macro will cause a system header to encounter a #error in the header file -- for example on windows using cygwin, the defining the symbol __i386__ will allow stdio.h to be understood)

    As we improve and further develop the CDT, this function will get better and better.


  2. Search is broken!

    Often when search is not behaving as expected, it is due to the CDT not having enough information available to parse the source files.  For example, if you include a header file, but do not tell CDT about the directory where that header file exists, then it is unlikely that CDT will understand the contents of your source file.


  3. I am having problems with the outline view!

    The outline view does not respect macros and header contents.  It is simply a file view.  This may not be what you desire.


  4. How can I add another extension to CDT so that files other than c/cpp/cc/h files are recognized as source files? My compiler needs the file extension to be "xyz", and when I open xyz files there is no syntax highlighting.

    Go to
        Preferences -> Workbench -> Editors -> File Associations
    and add a new File Association xyz


Compilers and other 3rd party tools Goto Toptop
  1. What tools do I need to run CDT?
  2. In order to build your C++ code and debug your C++ executable, you will need to get a compiler, a make program and a debugger.

    There are several tools that can help you run GNU Tools on Windows.

    Both of these tools offer a selection of GNU tools such as gcc, gdb and make.

    For example, on Windows you can install the Cygwin toolkit which is a Unix environment for Windows and includes automake and gdb.
    Note: The CDT currently uses GDB version 5.2.1 and later.


  3. I just installed Eclipse and the CDT. However, CDT does not recognize the existing toolchain [ie Visual Studio, Borland, Watcom, Cygwin, MinGW, GCC, etc]. How do I get the CDT to recognize these tools?

    The current CDT doesn't integrate with a specific toolchain, but rather integrates with a build command, such as make, nmake, jam ant etc and this build command drives the toolchain. The default build command is make, but can be configured via the project properties:

    1. Select a project in the navigator pane and open its properties
    2. Clear the "use default" check box and type in the desired build command. Note that you must provide a real executable for the build command, batch files won't work.

    CDT however, will generate a makefile for you (if you want it to).  See When do I use the managed make feature.  Currently the default toolchain for this feature is g++, make, and gdb.  See How do I add support for my toolchain via the managed build feature for information on adding other toolchains to this feature.


  4. How do I add support for my toolchain via the managed build feature?

    There is documentation available as Managed Build Extensibility Reference Document.  Please feel free to provide feedback on this doc to the cdt-dev mailing list.


  5. Are there C++ libraries included in the CDT (or elsewhere in Eclipse)?

    No. CDT is only the IDE part of Eclipse. It doesn't provide any compiler toolchain nor C++ libraries, as these are part of the compilers and the operating system etc.


Building C/C++ Projects Goto Toptop
  1. When do I use the standard make feature

    When you already have a makefile and you wish to use it.


  2. When do I use the managed make feature

    When you do not have a makefile, and do not want to write one, the managed make feature will be able to generate one for you. Note that the current CDT (1.2.1 and 2.0) generates makefiles that use GNU gcc and g++. If you are not using this compiler, (and you do not have a managed make plugin for your compiler), then you will need to use the standard make feature.


  3. Building a simple C++ Project -- "Hello World" on a Windows Platform
    1. Follow the instructions, on the respective web site, to install your GNU tools.
    2. Create a new C++ project
    3. In the C/C++ Projects View, select your new C/C++ project, right click and select "Rebuild Project"
    4. You will have two additional files. "hello.o" and "hello.exe"
    5. Double click on "hello.exe" or right click and select "Open With" > "Default Editor" to launch your simple program.

  4. Can I see the raw compiler output? Where is this information placed?

    The C-Build view is a console which shows all of the activity which occurs once a project's build command is executed.


  5. I get the error    Build error
       (Exec error:Launching failed)

    This usually indicates that "make" is not on your path.   Open a command window and type "make".   If you receive the equivalent of "command not found" then you will need to ensure that the location of the make executable is on your path.  (If you have changed your build command to something else, like "mingw32-make -f makefile" then this something else needs to be on your path.)

    Note that the managed build project will always use "make.exe".  If make.exe does not exist it will not work.


  6. My Compiler errors seem to be truncated or split. What is going on?

    When using GCC toolchain, you need to add to each compile/link line the following (either in Makefile, add this to CFLAGS/CXXFLAGS/LDFLAGS, or when using managed builds, add this in each configuration to the misc-sections):

    -fmessage-length=0

    This will disable the line breaks in the compiler and linker error messages.

  7. What causes the message
        make (e=2): The system cannot find the file specified?

    This message usually indicates that the a tool called from inside the makefile is not found (on the path).  If the error looks like the following, then "gcc" could not be found:

    gcc -c hello.c
    Process begin: CreateProcess((null), gcc -c hello.c, ...) failed.
    make (e=2): The system cannot find the file specified.

    You will need to ensure that the path to the executable "gcc" is on your path.


Debugging C/C++ Projects Goto Toptop
  1. I'm missing some basic C/C++ debugging functionality, where is it hidden?

    You have to customize your debug perspective to see all C/C++ actions. In the Debug perspective open "Window"-->"Customize perspective"-->"Other" and check the "C/C++ Debug" box. In the latest version it is checked by default. To customize your views open "Window"-->"Preferences"-->"Debug"-->"Debug Action groups" and check/uncheck the "C/C++ Debug" and "Java Debug" boxes.


  2. Is it possible to see global variables? The Variables view shows only local variables.

    The "Variables" view displays only local variables and arguments for the selected stack frame. You can use the "Add _expression_ (C/C++)" option to add a global variable to the "Expressions" view.


  3. Can I debug remote targets?

    Yes; when you enter the debug window you can select GdbServer as debugger. Then the window information changes and you can enter the TCP-IP address and port of your target debug server or select the serial line.


  4. Since the debugger is gdb, can I simply access the gdb console?

    Yes, partially. The console can be flipped into gdb mode (see the "Show Debugger Console" button in the debugger view which does this) and you can type in commands at that point. Doing this can possibly de-synchronize the IDE with gdb, so you should be careful to what extent you drive the debugger using this interface.


  5. Can I see/log all of the commands which are being driven to gdb?

    Yes, you can turn on tracing for the debug plugin and it will show you all of the information about what commands are being sent to gdb. To run with tracing:

    1. Create a file (for example, .options)
    2. Add the following line to it:
              org.eclipse.cdt.debug.mi.core/debug=true
    3. Start Eclipse with:
              -debug "file:<full path>/.options"


  6. Why can't I see the source in the debugger?

    I use some classes in standard c++ library and I'd like to view the source of it in debugging mode, just like viewing the source of my own cpp files when I stepped into some method.   I've tried to add the path of gcc source (extracted from gcc tar ball) into the "Additional Source Locations" of the Source Tab in the debugging configuration for project. Could anybody tell me how to configure CDT to do this?

    Check:
    - if your library contains the debug information,
    - if the library symbols are loaded when you try to step into a library function (use the Shared Libraries view or set the "Load shared library symbols automatically" options of the launch configuration), If your library is built in a different location you should use the "Associate with" option of the "Add Directory Source Location" dialog.


  7. Can I debug Java and C++ at the same time?

    If you can get this to work, please let the cdt-dev mailing list know!


  8. Can I set a breakpoint in a DLL?

    A breakpoint in DLL can be set if the symbol information of DLL is loaded in gdb. On Windows this happens when DLL is loaded. The CDT uses the "stop-on-solib-events" command of gdb to catch the moment when DLL is loaded and tries to plant the breakpoints that belong the project or the reference projects. This all is transparent for user. As far as I know (but I am not 100% sure) this option ("stop-on-solib-events") is not supported by gdb on Windows. What you can do is to stop after your DLL is loaded and then set a breakpoint in it.


  9. When I want to debug my "Hello World" program, I have this error :
    "Failed Launching CDI Debugger : Error creating session: gdb: unrecognized
    option '-i'"

    The GDB debugger interface in CDT requires version 5.2.1 or later of gdb.  Your version of gdb is older than this,  you will need to upgrade to use gdb and CDT together.


  10. Why is my executable not listed in the debug dialog?

    Problem is that all the files including exe are not getting proper icon (All icons are text editor icons). Also when we try to debug the exe is not listed in the dialog so that we can select the exe from the list.

    This is usually caused by having the wrong binary parser selected.  Change the binary parser (from the properties on the project).


  11. When I launch debug, I get two suspended threads and a command window that doesn't show up anything. If I do Run/Resume, I get an error message:

    Resume failed.
    Reason:
    Exceptions occurred attempting to resume.
    Details: Target request failed: Target is not responding (timed out)

    What is wrong?

    Your version  of gdb (2003-09-02-cvs cygwin-special?) had problems with "data-list-changed-registers". Disabling the updating the Registers view option (Windows->Preferences->Debug->Registers view) and unchecking the "Auto-Refresh by default" option will take  care of the problem.


  12. Is there any way of using the dbx debugger from the CDT?

    There is currently no integration with the dbx debugger.


Miscellaneous Troubleshooting Goto Toptop
  1. CDT tells me that I keep running out of memory, but I have XX GB of memory. What is wrong?

    You should try starting Eclipse using the -vmargs -Xmx512m parameter after the -vm argument. This will increase the Java heap size to 512MB. E.g.
       ./eclipse <other eclipse arguments> -vm ~/jdk/bin/java -vmargs -Xmx512m

    To see more on the command line arguments of eclipse, see Running Eclipse section of the "Workbench User Guide"


  2. Whenever I build the project, the eclipse hangs (gets "stuck"). I need to kill a process named: "c++ filt" to restart it.  Why?

    There was a bug in the old version of c++filt that did not flush its output when it finishes (this same problem happens with addr2line). CDT is waiting for the answer from c++filt.  You need get a new version of c++filt to fix the problem.


Working ON the CDT Goto Toptop
  1. How do I get access to the CDT source code?

    This document describes the process of building, running and debugging the CDT within Eclipse. We will try to keep this document up-to-date with the behaviour of the latest builds.

    To build the CDT inside Eclipse you will need a build of eclipse from the Eclipse Download Page. Once you have Eclipse properly installed, the CDT CVS Respository can be accessed and the CDT plugins checked-out and built. Note: The exact steps may vary depending on what Eclipse build you use.

    1. Set up CVS
      1. Open the "CVS Repository Exploring" Perspective
      2. Right-Click in the "CVS Repositories" view and select "New ->Repository Location"
      3. From the "Add CVS Repository" dialog, perform the following:
        • Change the values to:
          Host: dev.eclipse.org
          Repository Path: /home/tools
          User: anonymous
          Password: you can leave this blank
          Connection Type: pserver
          Use Default Port: selected
          Validate Connection on Finish: selected
      4. Select "Finish" (this should create a new repository in the CVS Repositories View called :pserver:anonymous@xxxxxxxxxxxxxxx:/home/tools)
    2. Get Appropriate Source Files
      1. Expand your new repository
      2. Expand the HEAD
      3. Hold down the <Ctrl> key and select all the plugins you wish to build. The complete list for the CDT are those that match org.eclipse.cdt.* , however you may wish to select only a subset. Of course you may have to return to this step if you have checked out a subset and are missing some dependencies.   Recommendation:  select all the cdt plugins
      4. Once you have selected your plugins, right-click on the selected list and choose "Check Out". This should start checking out all the selected plugins and subsequently build them.

  2. How do I use eclipse to develop eclipse?

    The self-hosting instructions explain how to use eclipse to develop eclipse.

    • If you want to work with the current version of the eclipse code, you will need to connect to the Eclipse Project CVS repository. To connect to the Eclipse Project CVS repository, open the CVS repositories view (Perspective->Show View->Other...->CVS->CVS Repositories) and create a new CVS repository location (right click->New->CVS Repository Location. Enter the following information into the "Add CVS Repository" dialog.

        Connection type: pserver

        User name: anonymous

        Password: <leave empty>

        Host name: dev.eclipse.org

        Repository path: /home/eclipse

    NOTE: When you are connected as anonymous you will have read rights to the repository, but you will not be able to commit any code.


  3. How do I modify the code

    Change any file you want.  When you save it, it will be built.


  4. How do I run with my changes?

    After successfully building the CDT inside Eclipse, one typically wants to run an instance of Eclipse with the freshly built plugins (perhaps after making some changes to the source code). This is very easy to do in the PDE. Here are the steps:

    1. Open the "Plug-in Development" perspective (you may have to goto "Others" to find it).
    2. Select the menu action Run -> Run As... -> Run-time workbench.
    3. You may also use the drop down on the debug icon, select  Run-time workbench


  5. How do I submit a fix for a bug?

    While using the Eclipse SDK to develop your plug-in, you found a bug in CDT. You submitted a bug report, but need the fix now. You've debugged the problem, and there is a simple fix. So you figured out how to use eclipse to develop eclipse and have written a fix for the bug you found. Now you want to release the fix to the eclipse community. How do you do this?

    First, create a patch. You can create a patch by using the Team patch creation facility.

    1. Select the project you have patched. It must be connected to the CDT CVS repository.
    2. Right click->Team->Create Patch...
    3. The Create Patch wizard will prompt you for a file name. You should name your patch with the bugzilla bug report id.

    Now you can submit the patch to the appropriate component developer mailing list. Be sure to include information about what your patch fixes. The committers for the component will evaluate your patch to see if it fixes the bug and is acceptable. If your patch is accepted, it will be released by the component team into the repository.


  6. How do I distribute my changes to my customers?

    Anyway that you see fit!   Actually, if anybody has suggestions for this answer, please send them to the cdt-dev mailing list.


  7. How do I generate JavaDocs?

    The following steps can be used to create JavaDocs for any CDT project.

    1. Check out the project (i.e. org.eclipse.cdt.debug.core) from dev.eclipse.org with cvsroot /home/tools
    2. Ensure that you have JavaDoc installed and configured (go to preferences->Java->Javadoc and set the location for the javadoc command
    3. Select the project in the package explorer, right-click Export, select Javadoc and follow the wizard instructions. It will generate the Javadoc html in a doc directory for that plugin

    The result will be a complete JavaDoc hierarchy of all the public APIs for the selected plugin.


  8. What are some areas that are not complete

    This is an endless list, but here are a few examples:

    • Source code formatting
    • Integration with profiler
    • Refactoring engine
    • Full DOM read/write

  9. In addition to submitting fixes, how else can I contribute to the CDT Project?

    One initially thinks of submitting patches and enhancing components as the best way to contribute. However, there are many other valuable ways to get involved and help.

    • You can participate in the newsgroups. There are many questions that arise on the newsgroup; you can use your eclipse experience to help others.
    • You can report bugs.
    • You can develop your own plug-ins and provide feedback based on your experience.
    • You can write articles.
    • But the most important contribution you can make to the success of CDT (or eclipse)  is to build real, useful tool plugins for CDT (or eclipse) that solve real problems for users - either as commercial products or open source projects.

Last Modified on Wednesday Feb 17, 2004
Index: news.html
===================================================================
retrieving revision 1.15
diff -u -r1.15 news.html
--- news.html	11 Feb 2004 19:30:07 -0000	1.15
+++ news.html	17 Feb 2004 20:08:56 -0000
@@ -36,9 +36,23 @@
   </tr>
   <tr>
     <td width="23%" align="center">
-    <p style="margin-top: 3; margin-bottom: 3">Feb 11, 2004</td>
-    <td width="51%" align="center">Update to CDT</td>
-    <td width="76%">&nbsp;</td>
+    <p style="margin-top: 3; margin-bottom: 3">Feb 17, 2004</td>
+    <td width="51%" align="center">Update to CDT web pages</td>
+    <td width="76%">
+    <p align="center">
+    <a href="http://www.eclipse.org/cdt/";>CDT Main Page</a>
+    <br>
+    <a href="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/cdt-home/plans/CDT_ConferenceCalls.html?cvsroot=Tools_Project";>
+    CDT Monthly Conference calls</a>
+    <br>
+    <a href="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/cdt-home/developer/docs.html?cvsroot=Tools_Project";>
+    Designer Documentation</a>
+    <br>
+    <a href="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/cdt-home/developer/Project%20Structure.html?cvsroot=Tools_Project";>
+    CDT Project Structure</a>
+    <br>
+    <a href="http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/cdt-home/user/faq.html?cvsroot=Tools_Project";>
+    CDT FAQ</a></td>
   </tr>
   <tr>
     <td width="23%" align="center">
@@ -199,7 +213,7 @@
 </tr>
 </table>
 <center><I>
-Last Modified on Tuesday, Feb 10, 2004</I></center>
+Last Modified on Monday, Feb 16, 2004</I></center>
 
 </body>
 </html>

Back to the top