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 "DSDP/DD/DSF SetUp"

< DSDP‎ | DD
(To run:)
(Supported Platforms)
Line 52: Line 52:
  
 
==Supported Platforms==
 
==Supported Platforms==
Currently only Windows with cygwin GDB has been tested.
+
Currently both Windows with cygwin GDB and Linux with GDB 6.6 have been tested.
  
 
==Current Features==
 
==Current Features==

Revision as of 09:36, 26 March 2007

Buiding and Running Instructions

To build:

  1. Install Eclipse 3.3 (latest milestone)
  2. Install CDT 4.0 (latest milestone)
  3. Install and configure gdb (cygwin on windows, GDB 6.6 on Linux)
  4. Check out following projects from /cvsroot/dsdp/org.eclipse.dd.dsf/plugins
    org.eclipse.dd.dsf 
    Contains basic concurrency and service APIs and tools.
    org.eclipse.dd.dsf.ui 
    Contains base viewer model APIs and tools.
    org.eclipse.dd.dsf.debug 
    Contains APIs for debugger services.
    org.eclipse.dd.dsf.debug.ui 
    Contains viewer model implementations for debugger views.
    org.eclipse.dd.dsf.mi.core 
    Debug service implementations utilizing GDB/MI protocol-based back end.
    org.eclipse.dd.dsf.mi.ui 
    Launch and other UI needed to connect to a GDB/MI back end.
  5. Build the dsf plugins just checked-out
  6. From you 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.)

To run:

  1. Create a new "Managed make build project" called "hello".
  2. 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;
    }
    
  3. Build the project.
  4. 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))
  5. 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".
  6. Launch your project
  7. If not in the Debug perspective, manually change perspectives
  8. 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.
  9. 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 both Windows with cygwin GDB and Linux with GDB 6.6 have been tested.

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: the selection of debugger back ends (gdb/mi, Cygwin gdb debugger, etc.), tThe implementation is currently hard-wired for Cygwin,
      • 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
      • no filtering support,
      • no advanced options (hardware, temporary, etc)
      • no watchpoints
  • Variables
    • not yet

Back to the top