Sign in



Don't have an account?

Signing up is free and easy
Home -> Our Services -> Programming Tools BU -> Open Source Tools -> Development of an Eclipse Plug-in for Command line Debugger

Development of an Eclipse Plug-in for Command line Debugger

Requirements

To develop an Eclipse Plug-in that will create a view in Eclipse through which an object file shall be debugged using a command line GDB.

Challenges

  • Understanding the plug-in terminologies
  • Understanding about Eclipse plug-in development
  • How to create, test, debug and deploy plug-in
  • Providing easy to use interfaces/GUI
  • Knowledge in Java language

Solution

  • Environment
    OS
    Windows
    Language/Platform
    • Eclipse Europa

    or

    • Eclipse Ganymede
    • Java
    Development model Incremental development model
  • Features
    • Interactive console view for debugging
    • Easy Toolbar interface to execute the commands to the GDB
    • Context menu and Pulldown menu in addition to Toolbar
    • Guidance to the user to perform the debugging
    • No hidden commands to the GDB
    • Help and detailed help display
    • Breakpoints and Stepping
    • Disassemble functions and Inspect variables
    • Provision to enter GDB commands by user
  • Description

    The object file which is the output of the Toolchain Integration Plug-in can be debugged using a GDB in command prompt. So we decided to create a Command line Debugger Plug-in for debugging the object file using the GDB in Eclipse.

    Using the Plug-in Development Environment (PDE), we extended the Eclipse User interface component Views to create a console view. The rest of the development was carried out in Java. The console view was made interactive with the Toolbar, which is loaded with the following actions to debug the object file:

    1. Display help contents of the GDB
    2. Display detailed help documentation for a Class or Command
    3. Add Source File Directory Path
    4. Read and load the object file to debug
    5. Setting breakpoints at specified line and function
    6. Start the debugged program
    7. Single stepping of source line and source instruction
    8. Multiple stepping of source lines
    9. Disassemble a specified section of memory
    10. Print data type and value of an expression
    11. User commands to the GDB
    12. Clear the console contents
    13. Restart the GDB
    14. Stop the debugging process

    The actions in the Toolbar were also made accessed using the Context menu or Pulldown menu. All the features were added to the command line GDB plug-in incrementally and the project was completed in the planned schedule.

    • Tools Used
      mipstx19a-elf-gd Debugg
      • mipstx19a-elf-gdb is a property of Toshiba, Japan.

    • Snapshots
      • Show View Dialogue Window with the Debugger Console View
        Show View Dialogue Window with the Debugger Console View
      • Debugger Console View with the Tool being started
        ourservices-open-source-debugger-console-view-with-the-tool-being-started
      • Debugger Console View with a file being debugged
        Debugger Console View with a file being debugged
      • Debugger Console View with disassemble command
        ourservices-open-source-debugger-console-view-with-disassemble-command