Presentation on theme: "Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems."— Presentation transcript:
Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems
2 All 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... Code Samples?
3 All content copyright QNX Software Systems Eclipse Overview Universal framework for tool integration Allows developers to choose best-of-breed solutions Workspace Eclipse Platform Workbench Help VCM JDT / JFace SWT Platform Runtime New Tool Extension Existing Tool Extension Vendor Tools Tool A Tool B Tool C Tool A Tool B Tool C
4 All 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.
5 All 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
6 All content copyright QNX Software Systems Eclipse CDT Today (cont) Works out of the box >Default is a GNU self-hosted environment make for build management GCC compiler (error parsing, command line arguments) Binutils & ELF objects (objdump, nm, addr2line) GDB debugger >Designed as a fully implemented example Replace or enhance as required
7 All 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
8 All 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 use the CDT data/internal framework Class browser and hierarchy views >Replace entire CDT modules with specific behaviour Custom build systems, language parsers New debuggers, launch configurations
9 All content copyright QNX Software Systems Example Integration: Extending the Debugger Eclipse CDT includes GDB debug and launch support >Standard self-hosted GDB and GDB server configurations >Works with most embedded toolchains Your 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
10 All 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
11 All content copyright QNX Software Systems Installing a New Debugger (contd) 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
12 All 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
13 All content copyright QNX Software Systems What It All Looks Like
14 All 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
15 All 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.
16 All content copyright QNX Software Systems Q&A Thank you for your time! Questions? Comments?