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/GDB"

< DSDP‎ | DD
m (GDB Subgroup Meetings)
m
 
(26 intermediate revisions by 2 users not shown)
Line 80: Line 80:
  
 
== GDB Subgroup Meetings ==
 
== GDB Subgroup Meetings ==
 +
* [[DSDP/DD/DSF_Phone_9-October-2008]]
 +
* [[DSDP/DD/DSF_Phone_2-October-2008]]
 +
* [[DSDP/DD/DSF_Phone_04-September-2008]]
 +
* [[DSDP/DD/DSF_Phone_28-August-2008]]
 +
* [[DSDP/DD/DSF_Phone_21-August-2008]]
 +
* [[DSDP/DD/DSF_Phone_14-August-2008]]
 +
* [[DSDP/DD/DSF_Phone_7-August-2008]]
 +
* [[DSDP/DD/DSF_Phone_31-July-2008]]
 +
* [[DSDP/DD/DSF_Phone_24-July-2008]]
 +
* [[DSDP/DD/DSF_Phone_17-July-2008]]
 +
* [[DSDP/DD/DSF_Phone_3-July-2008]]
 +
* [[DSDP/DD/DSF_Phone_26-June-2008]]
 +
* [[DSDP/DD/DSF_Phone_19-June-2008]]
 +
* [[DSDP/DD/DSF_Phone_12-June-2008]]
 +
* [[DSDP/DD/DSF_Phone_5-June-2008]]
 +
* [[DSDP/DD/DSF_Phone_29-May-2008]]
 +
* [[DSDP/DD/DSF_Phone_20-May-2008]]
 +
* [[DSDP/DD/DSF_Phone_15-May-2008]]
 +
* [[DSDP/DD/DSF_Phone_6-May-2008]]
 +
* [[DSDP/DD/DSF_Phone_29-April-2008]]
 +
* [[DSDP/DD/DSF_Phone_22-April-2008]]
 +
* [[DSDP/DD/DSF_Phone_15-April-2008]]
 
* [[DSDP/DD/DSF_Phone_8-April-2008]]
 
* [[DSDP/DD/DSF_Phone_8-April-2008]]
 
* [[DSDP/DD/DSF_Phone_1-April-2008]]
 
* [[DSDP/DD/DSF_Phone_1-April-2008]]

Latest revision as of 17:14, 7 October 2008

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)
    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.mi 
    Debug service implementations utilizing GDB/MI protocol-based back end.
    org.eclipse.dd.dsf.gdb 
    GDB-specific service extensions.
    org.eclipse.dd.dsf.gdb.ui 
    GDB-specific UI.
    org.eclipse.dd.dsf.gdb.launch 
    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