extending eclipse cdt for remote target debugging thomas fletcher director, automotive engineering...
TRANSCRIPT
![Page 1: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/1.jpg)
Extending Eclipse CDT for Remote Target Debugging
Thomas FletcherDirector, Automotive Engineering Services
QNX Software Systems
![Page 2: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/2.jpg)
2All content copyright QNX Software Systems
Agenda
Eclipse overview
Eclipse CDT overview
Customizing and extending Eclipse CDT
Example: Extending the debugger
Installing a new debugger
Additional considerations
Summary
![Page 3: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/3.jpg)
3All content copyright QNX Software Systems
Eclipse Overview
Universal framework for tool integration Allows developers to choose best-of-breed solutions
WorkspaceWorkspace
Eclipse Platform
Workbench
HelpHelp
VCMVCM
JDT / JFaceJDT / JFace
SWTSWT
Platform Runtime
New Tool ExtensionNew Tool Extension
Existing Tool ExtensionExisting Tool Extension
Vendor Tools
Tool ATool BTool C
Tool ATool BTool C
![Page 4: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/4.jpg)
4All content copyright QNX Software Systems
Eclipse CDT Overview
Project started in 2002
Design goals
> Provide framework for C/C++ development using Eclipse
> Integrate with existing C/C++ tools (compiler, debug, etc.)
> Build extensible and/or replaceable building blocks
> Focus on framework design, not specific features
> Target wide variety of OEM and VAR users
Use in traditional embedded: RTOS/host-target systems
Use in deep embedded: soft-cores, FPGA development
Use in desktop/self-hosted development environments
Others: mainframe, parallel computing, C dialects, etc.
![Page 5: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/5.jpg)
5All content copyright QNX Software Systems
Eclipse CDT Today
Steady progress and growing adoption
> Variety of commercial products ship CDT (many embedded)
> Participation from over 10 companies, 15 project committers
> CDT 2.1 available for Eclipse 3.0, December 2004
> CDT 3.0 targeted for Eclipse 3.1, July 2005
Rich baseline of features
> C/C++ build management (projects & source wizards)
> C/C++ editor and source navigation tools
> C/C++ graphical source debugger
![Page 6: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/6.jpg)
6All content copyright QNX Software Systems
Eclipse CDT Framework
C/C++ Debug
CDT Launch
CDT Core
CDT Build
Platform Runtime
Eclipse platform
Workbench
JFace
SWT
Workspace
Debug
• C/C++ debug perspective• C/C++ centric information
• Memory, Registers, Libraries• Disassembly of source• GDB/MI Debugger support
• Transfer binary to execution state• Glue between core and debug• Custom UI for driving tools
• C/C++ code editor• Code-completion/Hover help• Class browser/Outliner
• Source indexing & search• C/C++ language parser• C/C++ AST/DOM model
• New project creation• Internal or External managed
• Source code Binary object• Binary object identification• Compilation error parsers
Team
Search
Help
Update
Projects
Editors
Wizards
Views
![Page 7: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/7.jpg)
7All content copyright QNX Software Systems
Customizing and Extending Eclipse CDT
Eclipse CDT can be customized by:
> New plugins that use Eclipse extension points
Action & view contributions
> New plugins that use CDT extension points
Editor commands such as hover help
Source navigation such as open include
> New plugins that add on to the CDT
Class browser and hierarchy views
> Replace entire CDT modules with specific behaviour
Custom build systems, language parsers
New debuggers, launch configurations
![Page 8: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/8.jpg)
8All content copyright QNX Software Systems
Example Integration: Extending the Debugger
Ecliopse CDT includes GDB debug and launch support
> Standard self-hosted GDB and GDB server configurations
> Works with most embedded toolchains
GDB startup customization may be required
> May require custom command line options
> May not support particular configurations
> May require special environment set-up
Start a simulator
Download code to a target
Download additional files to target
Start extra external tools
![Page 9: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/9.jpg)
9All content copyright QNX Software Systems
Installing a New Debugger
New debugger extension point
> org.eclipse.cdt.debug.core.CDebugger
Use this extension point to ...
> Make the CDT framework aware of a new debugger
Will show up in the default CDT launch configuration
> Qualify the capabilities of this debugger
Host platform it is available for
Target architectures it is available for
Modes of operation for the debugger
![Page 10: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/10.jpg)
10All content copyright QNX Software Systems
Installing a New Debugger (cont’d)
Java class required to implement three methods
> Normal “launch and debug” session (run)
> Attach to an existing process (attach)
> Post-mortem core file debug (core)
createLaunchSession(ILaunchConfiguration config, IFile exe) createAttachSession(ILaunchConfiguration config, IFile exe, int pid) createCoreSession(ILaunchConfiguration config, IFile exe, IPath corefile)
> GDB debugger provided
As an example for how to implement a debugger
As a customizable component for gdb like debuggers
![Page 11: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/11.jpg)
11All content copyright QNX Software Systems
Adding Debugger Controls
New debugger UI interface
> org.eclipse.cdt.debug.ui.CDebuggerPage
Use this extension point to...
> Implement custom configurations for your debugger
Java class implements AbstractLaunchConfigurationTab
> GDB configuration tab provided as reference
![Page 12: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/12.jpg)
12All content copyright QNX Software Systems
What It All Looks Like
![Page 13: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/13.jpg)
13All content copyright QNX Software Systems
Additional Considerations
Launch environment customization
> Overloading simple command-line options may not be enough
> May require a full launch configuration
> Use Eclipse launch extension point with CDT UI components
![Page 14: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/14.jpg)
14All content copyright QNX Software Systems
Conclusion
Eclipse C/C+ development tool project
> Provides a common framework for all C/C++ tools
> Easy to extend and to customize for any environment
> Perfectly suits the needs of embedded developers
> Is fostering a rapidly growing community of developers
The Eclipse CDT project allows embedded developers to focus their custom tooling efforts by leveraging a growing industry
standard for tools and technology integration.
![Page 15: Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems](https://reader036.vdocuments.mx/reader036/viewer/2022062318/5514e1d5550346935c8b568f/html5/thumbnails/15.jpg)
15All content copyright QNX Software Systems
Q&A
Thank you for your time!
Questions? Comments?