Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search


< DSDP‎ | DD

The GDB subgroup is focused on implementing a GDB debugger integration with Eclipse using the DSF framework.

Buiding and Running Instructions

To build:

  1. Install the latest milestone of Eclipse 3.4
  2. Install the latest milestone of CDT 5.0
  3. Check out following projects from /cvsroot/dsdp/org.eclipse.dd.dsf/plugins (HEAD)
    Contains basic concurrency and service APIs and tools.
    Contains base viewer model APIs and tools.
    Contains APIs for debugger services.
    Contains viewer model implementations for debugger views.
    Debug service implementations utilizing GDB/MI protocol-based back end.
    GDB-specific service extensions.
    GDB-specific UI.
    Registration of the GDB Launch (it is separated in its own plugin to allow debugger integrations to provide a customized launch and leave this one out.)
  4. Build the dsf plugins just checked-out

To run:

  1. Install and configure gdb (GDB 6.7 on Linux)
  2. From your running Eclipse, launch a new Eclipse application so as to use the above plugins (note that the version of these plugins which is downloaded by Eclipse if you install DSF, are not the latest version and do not work; that is why you must check them out and build them in the step above.)
  3. Create a new "Managed make build project" called "hello".
  4. Create a simple hello.c source file:
    #include <stdio.h>
    int main(void) {
        printf("Hello world1\n");
        printf("Hello world2\n");
        printf("Hello world3\n");
        return 0;
  5. Build the project.
  6. Create a new "DSF C/C++ Local Application" launch configuration (one with the pink icon with the letter C inside (or a red square if the icon cannot be displayed for some reason))
  7. In the Debugger tab, set the Debugger field to "gdb/mi", check "Stop on startup at:" and choose "main", set the GDB debugger to the location of your copy of GDB, set the GDB command set to "Standard" and the Protocol to "mi".
  8. Launch your project
  9. If not in the Debug perspective, manually change perspectives
  10. In the Debug view (within the Debug perspective), you should see your process listed. Expand the process tree until you can select the main thread. Once selected, you should see the current line of code highlighted and the Step and Resume buttons become active.
  11. In the case of Cygwin, if the "source not found" page appears, the path mapping needs to be created. This is an issue with latest cygwin gdb.
    1. Click on the "Edit source lookup" button in the editor, or right click on the launch node in Debug View and select "Edit source lookup"
    2. Click on the "Add..." button
    3. Select "Path Mapping" and click OK.
    4. Select the new "Path Mapping" source container and click the "Edit..." button.
    5. Once again, click the "Add..." button to create a mapping.
    6. Enter the path to map from. Look at the stack frame label in Debug view, if the filename is something like "/cygdrive/c/workspace/hello/hello.c", enter the path to the first real directory "/cygdrive/c/workspace".
    7. Enter the correct path to the directory entered above, in the file system. In example above, it would be "C:\workspace".
    8. Click OK three times and you'll be back in Kansas.... ehm Debug view that is.
    9. If the source doesn't show up right away, try stepping once.
     Note: It is also possible to edit a preference setting which will apply this source path mapping to every new launch.  See Window->Preferences->C/C++->Debug.

Supported Platforms

Currently the only supported (tested) platform is Linux with GDB 6.7.

Current Features

  • Launching
    • The "DSF C/C++Local Application" is the standard CDT launch configuration minus some of the features.
    • What is NOT working here is
      • Debugger tab: Debugger Options section
  • Debug view
    • Single thread debugging only.
    • Terminating
    • Stepping
    • Resume/Suspend
  • Console support
    • CLI command input/output
    • user process console output support
  • Breakpoints
    • Basic CDT breakpoint support implemented
  • Variables
  • Registers
  • Disassembly (Planned for 1.0)
  • Modules (no symbols)

GDB Subgroup Meetings

Back to the top