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 |
or
|
| 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:
- Display help contents of the GDB
- Display detailed help documentation for a Class or Command
- Add Source File Directory Path
- Read and load the object file to debug
- Setting breakpoints at specified line and function
- Start the debugged program
- Single stepping of source line and source instruction
- Multiple stepping of source lines
- Disassemble a specified section of memory
- Print data type and value of an expression
- User commands to the GDB
- Clear the console contents
- Restart the GDB
- 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
-
Snapshots
-
Show View Dialogue Window with the Debugger Console View
-
Debugger Console View with the Tool being started
-
Debugger Console View with a file being debugged
-
Debugger Console View with disassemble command
|