| <!doctype html> |
| <html lang="en"> |
| |
| <head> |
| <meta charset="utf-8"> |
| |
| <title>Eclipse CDT</title> |
| |
| <meta name="description" content="CDT Overview talk first given at EclipseCon 2013"> |
| <meta name="author" content="Marc Khouzam (Ericsson) and Doug Schaefer (BlackBerry/QNX)"> |
| |
| <meta name="apple-mobile-web-app-capable" content="yes" /> |
| <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> |
| |
| <link rel="stylesheet" href="css/reveal.min.css"> |
| <link rel="stylesheet" href="css/theme/sky.css" id="theme"> |
| |
| <!-- For syntax highlighting --> |
| <link rel="stylesheet" href="lib/css/zenburn.css"> |
| |
| <!-- If the query includes 'print-pdf', use the PDF print sheet --> |
| <script> |
| document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' ); |
| </script> |
| |
| <!--[if lt IE 9]> |
| <script src="lib/js/html5shiv.js"></script> |
| <![endif]--> |
| </head> |
| |
| <body> |
| <div style="float: left"> |
| <img src="img/eclipse.png"/> |
| </div> |
| |
| <div style="float: right"> |
| <img hspace="25px" vspace="7px" height="64px" src="img/cdt_logo_icon.png"/> |
| </div> |
| |
| <div class="reveal"> |
| |
| <div class="slides"> |
| |
| <section> |
| <h1>Eclipse CDT</h1> |
| <br><br> |
| <h3>The C/C++ IDE for Everyone</h3> |
| <p> |
| <small>Doug Schaefer (BlackBerry/QNX) and Marc Khouzam (Ericsson)</small> |
| </p> |
| </section> |
| |
| <section> |
| <h2>Agenda</h2> |
| <ul> |
| <li>What is the CDT?</li> |
| <li>C/C++ Projects</li> |
| <li>Getting to Know Your Code</li> |
| <li>Refactoring</li> |
| <li>Debug</li> |
| <li>Unit Testing</li> |
| <li>Future Plans</li> |
| </ul> |
| </section> |
| |
| <section> |
| <section> |
| <h2>What is the CDT?</h2> |
| <ul> |
| <li class="fragment">C/C++ Development Tooling (CDT)</li> |
| <li class="fragment">Tools for building applications in C/C++ using Eclipse</li> |
| <li class="fragment">Platform used to create C/C++ IDEs</li> |
| <li class="fragment">The Eclipse C/C++ IDE Package</li> |
| <li class="fragment">A community of passionate tools developers</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>Uses</h2> |
| <ul> |
| <li class="fragment">Embedded Systems</li> |
| <li class="fragment">Desktop Apps</li> |
| <li class="fragment">Mobile Apps</li> |
| <li class="fragment">Server-side</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>History</h2> |
| <ul> |
| <li class="fragment">Started in 2001 as QNX Momentics</li> |
| <li class="fragment">Opened source in 2002 at Eclipse</li> |
| <li class="fragment">Rational joined shortly after</li> |
| <li class="fragment">followed by TI, Intel, Symbian, Nokia, ...</li> |
| <li class="fragment">then Ericsson, Google, individual contributors</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>The Committers</h2> |
| <div style="float:left"> |
| <ul> |
| <li>Andrew Gvozdev</li> |
| <li>Anton Leherbauer</li> |
| <li>Chris Recoskie</li> |
| <li>Doug Schaefer</li> |
| <li>Elena Laskavaia</li> |
| <li>John Cortell</li> |
| <li>Jeff Johnston</li> |
| <li>Mikhail Khodjaiants</li> |
| <li>Marc Khouzam</li> |
| <li>Marc-Andre Laperle</li> |
| </ul> |
| </div> |
| <div style="float:right"> |
| <ul> |
| <li>Markus Schorn</li> |
| <li>Patrick Chuong</li> |
| <li>Pawel Piech</li> |
| <li>Randy Rohrbach</li> |
| <li>Sergey Prigogin</li> |
| <li>Teodor Madan</li> |
| <li>Vivian Kong</li> |
| <li>William Swanson</li> |
| <li>Thomas Corbat</li> |
| </ul> |
| </div> |
| </section> |
| |
| <section> |
| <h2>Contributors</h2> |
| <img src="img/CDTContributions.png"/> |
| </section> |
| |
| <section> |
| <h3>Sibling Eclipse Communities</h3> |
| <ul> |
| <li>Linux Tools Project</li> |
| <li>Parallel Tools Project</li> |
| <li>Mylyn</li> |
| <li>Automotive Working Group</li> |
| <li>M2M WG, Internet of Things</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>Commercial Adopters</h2> |
| <ul> |
| <li>QNX Momentics & BlackBerry NDK</li> |
| <li>Wind River Workbench</li> |
| <li>Red Hat Enterprise Linux</li> |
| <li>IBM Rational Software Architect</li> |
| <li>Intel C++ Compiler for Linux</li> |
| <li>Freescale CodeWarrior</li> |
| <li>TI Code Composer Studio</li> |
| <li>Pretty much every silicon vendor</li> |
| <li>Pretty much every RTOS vendor</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>Open Source Users</h2> |
| <p>Eclipse C/C++ IDE Downloads</p> |
| <ul> |
| <li class="fragment">Helios CDT 7.0.1 - 625,162 downlaods</li> |
| <li class="fragment">Indigo CDT 8.0.1 - 812,430 downloads</li> |
| <li class="fragment">Juno CDT 8.1.1?</li> |
| </ul> |
| <img class="fragment" width="100%" height="60%" src="img/JunoSR1.png" alt="Juno SR1 Stats"/> |
| </section> |
| </section> |
| |
| <section> |
| <h2>CDT Features</h2> |
| <ul> |
| <li class="fragment">Project and Build</li> |
| <li class="fragment">Full featured editor</li> |
| <li class="fragment">Source code navigation</li> |
| <li class="fragment">Refactoring</li> |
| <li class="fragment">Static code analysis</li> |
| <li class="fragment">Debugging</li> |
| <li class="fragment">Unit Test</li> |
| </ul> |
| </section> |
| |
| <section> |
| <section> |
| <h2>Project and Build</h2> |
| </section> |
| <section> |
| <h2>New Project Wizard</h2> |
| <img src="img/NewProjectWizard.png"/> |
| </section> |
| <section> |
| <h2>Build Systems</h2> |
| <ul> |
| <li class="fragment">Managed and not Managed</li> |
| <li class="fragment">Extensible for new toolchains</li> |
| <li class="fragment">Built-in Toolchain support: gcc, msvc, clang</li> |
| <li class="fragment">Major capability provided by RTOS and silicon vendors</li> |
| </ul> |
| </section> |
| </section> |
| |
| <section> |
| <section> |
| <h2>The Editor</h2> |
| </section> |
| <section> |
| <h2>Highlighting</h2> |
| <img height="375px" src="img/SyntaxHighlighting.png" alt="Syntax Highlighting"/> |
| </section> |
| <section> |
| <h2>Content Assist</h2> |
| <img height="375px" src="img/ContentAssist.png" alt="Content Assist"/> |
| </section> |
| <section> |
| <h2>Hover Help</h2> |
| <img height="375px" src="img/HoverHelp.png" alt="Hover Help"/> |
| </section> |
| <section> |
| <h2>Block Selection</h2> |
| <img height="375px" src="img/BlockSelection.png" alt="Block Selection"/> |
| </section> |
| <section> |
| <h2>Formatting</h2> |
| <img height="375px" src="img/Formatter.png" alt="Formatter"/> |
| </section> |
| <section> |
| <h2>Outline View</h2> |
| <img height="375px" src="img/OutlineView.png" alt="Outline View"/> |
| </section> |
| </section> |
| |
| <section> |
| <h2>Parser and Indexer</h2> |
| <ul> |
| <li class="fragment">Full C and C++ parser producing AST</li> |
| <li class="fragment">C++ parser progressing on C++11 support</li> |
| <li class="fragment">Indexer captures symbols, definitions and references</li> |
| <li class="fragment">Parser uses index for speed, e.g. content assist</li> |
| <li class="fragment">Available as API for advanced tooling</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h3>Refactoring and other cool tricks</h3> |
| <ul> |
| <li class="fragment">Rename Refactoring</li> |
| <li class="fragment">Extract Constant</li> |
| <li class="fragment">Extract Local Variable</li> |
| <li class="fragment">Extract Function</li> |
| <li class="fragment">Toggle Function Definition</li> |
| <li class="fragment">Hide Method</li> |
| <li class="fragment">Implement Method</li> |
| <li class="fragment">Generate Getters and Setters</li> |
| <li class="fragment">Organize Imports</li> |
| </ul> |
| </section> |
| |
| <section> |
| <section> |
| <h2>Code Analysis - Codan</h2> |
| <ul> |
| <li class="fragment">Framework for static analysis</li> |
| <li class="fragment">Out-of-the-box static analysis rules and checkers</li> |
| </ul> |
| </section> |
| <section> |
| <h2>Codan Customizations</h2> |
| <img src="img/CodanCustomize.png" alt="Customizing Rules"> |
| <ul> |
| <li class="fragment">Ability to enable or disable existing rules</li> |
| <li class="fragment">Ability to modify properties of existing rules</li> |
| <li class="fragment">Ability to modify severity of rules</li> |
| </ul> |
| </section> |
| <section> |
| <h2>Codan Triggers</h2> |
| <img style="float: left;" src="img/CodanRun.png" alt="Running Rules"> |
| <ul> |
| <li class="fragment">Run upon user request</li> |
| <li class="fragment">Run when project is built</li> |
| <li class="fragment">Run as you type!</li> |
| </ul> |
| <img style="float: left;" height="350px" src="img/CodanTrigger.png" alt="Rules Triggers"> |
| </section> |
| <section> |
| <h2>Codan Reporting</h2> |
| <ul> |
| <li class="fragment">Entries in Problems view<br> |
| <img src="img/CodanProblem.png" alt="Problems view"></li> |
| <li class="fragment">Problem markers in Editor<br> |
| <img src="img/CodanQuickFix.png" alt="Quick Fix"></li> |
| <li class="fragment">Some checkers support Quick Fix!</li> |
| </ul> |
| </section> |
| </section> |
| |
| <section> |
| <h2>Discovering Parser Configuration</h2> |
| <ul> |
| <li class="fragment">Required for parser to find header files</li> |
| <li class="fragment">Include Paths</li> |
| <li class="fragment">Macro Definitions</li> |
| <li class="fragment">Other advanced build options that impact parsing</li> |
| <li class="fragment">Detects compiler built-ins</li> |
| <li class="fragment">Scans build output</li> |
| <li class="fragment">Extensible mechanism to plug in other methods</li> |
| </ul> |
| </section> |
| |
| <section> |
| <section> |
| <h2>Debug</h2> |
| </section> |
| |
| <section> |
| <h2>Debug View</h2> |
| <img height="500px" src="img/DebugView.png"/> |
| </section> |
| |
| <section> |
| <h2>Variables View</h2> |
| <img height="500px" src="img/VariablesView.png"/> |
| </section> |
| |
| <section> |
| <h2>Pretty-Printing</h2> |
| <img height="600px" src="img/PrettyPrintTogether.png" alt="Pretty Printing"/> |
| </section> |
| |
| <section> |
| <h2>Registers View</h2> |
| <img height="500px" src="img/RegistersView.png"/> |
| </section> |
| |
| <section> |
| <h2>Expressions View</h2> |
| <img height="500px" src="img/ExpressionsView.png"/> |
| </section> |
| |
| <section> |
| <h2>Enhanced Expressions</h2> |
| <ul> |
| <li>Glob-pattern matching with '=' prefix |
| <pre><code class="no-highlight">=var*</code></pre> |
| <pre><code class="no-highlight">=myArray[20-30]</code></pre> |
| <pre><code class="no-highlight">=$e?x</code></pre> |
| </li> |
| |
| <li class="fragment">Sorted matches |
| <pre><code class="no-highlight">=* or *</code></pre> |
| <pre><code class="no-highlight">=$* or $*</code></pre> |
| </li> |
| |
| <li class="fragment">Grouping using ';' separator |
| <pre><code class="no-highlight">myVar;=myArray[20,24]</code></pre> |
| <pre><code class="no-highlight">myVar;$eax</code></pre> |
| </li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>Enhanced Expressions</h2> |
| <img height="500px" src="img/EnhancedExpressions.png" alt="Enhanced Expressions"/> |
| </section> |
| |
| <section> |
| <h2>Project-less Debugging</h2> |
| <img height="600px" src="img/DebugNoProject.png" alt="Project-less Debugging"/> |
| </section> |
| |
| <section> |
| <h2>Reverse Debugging</h2> |
| <ul> |
| <li>Step or Resume forwards AND backwards</li> |
| <li>Go back in time, change data and re-write history</li> |
| <li>Use breakpoints to enable/disable recording</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>Reverse Debugging</h2> |
| <img height="600px" src="img/ReverseDebugging.png" alt="Reverse Debugging"/> |
| </section> |
| |
| <section> |
| <h3>Multi-Process Debugging</h3> |
| <img height="600px" src="img/MultiProcess.png" alt="Multi-Process Debugging"/> |
| </section> |
| |
| <section> |
| <h2>OS Resources view</h2> |
| <img style="float: left;" width="550px" src="img/OSResources.png" alt="OS Resources"/> |
| <div style="float: right;"> |
| <ul> |
| <li>All Processes</li> |
| <li>All Threads</li> |
| <li>Semaphores</li> |
| <li>Sockets</li> |
| <li>Kernel Modules</li> |
| <li>File Descriptors</li> |
| <li>Message queues</li> |
| <li>Memory Segments</li> |
| </ul> |
| </div> |
| </section> |
| |
| <section> |
| <h2>Multicore Visualizer</h2> |
| <img src="img/MulticoreVisualizerTriplet.png" alt="Multicore Visualizer"/> |
| <ul> |
| <li>Monitor entire system at a glance</li> |
| <li>Control program execution from Visualizer</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h3>Multicore Visualizer CPU Load Meters</h3> |
| <img width="500px" src="img/MulticoreVisualizerLoad.png" alt="Multicore Visualizer CPU Load"/> |
| <ul> |
| <li>Optionally monitor your target</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>Multicore Visualizer Filtering</h2> |
| <div style="position: relative;width: 450px;height: 375px"> |
| <img style="position: absolute;left:50px;top: 0px" width="400px" height="375px" src="img/MulticoreVisualizer24.png" alt="Multicore Visualizer Full"/> |
| <img style="position: absolute;left:50px;top: 0px" class="fragment" data-fragment-index="3" width="400px" height="375px" src="img/MulticoreVisualizer24Selection.png" alt="Multicore Visualizer Selection"/> |
| <img style="position: absolute;left:500px;top: 0px" class="fragment" data-fragment-index="4" height="375px" src="img/MulticoreVisualizer4Filtered.png" alt="Multicore Visualizer Filtered"/> |
| </div> |
| <ul style="padding-top: 20px"> |
| <li class="fragment" data-fragment-index="2">Focus on interesting parts</li> |
| <li class="fragment" data-fragment-index="5">Allow for more information to be displayed</li> |
| </ul> |
| </section> |
| |
| <section> |
| <h2>Dynamic-Printf</h2> |
| <img style="float: left;" width="400px" src="img/DynamicPrintf.png" alt="Dynamic Printf Type"/> |
| <ul> |
| <li class="fragment" data-fragment-index="3">No re-compiling</li> |
| <li class="fragment" data-fragment-index="4">No re-deploying</li> |
| <li class="fragment" data-fragment-index="5">Debugger can disconnect</li> |
| </ul> |
| <img width="600px" src="img/DynamicPrintfProperties.png" alt="Dynamic Printf Properties"/> |
| </section> |
| |
| <section> |
| <h2>Step Into Selection</h2> |
| <pre class="fragment"><code>void compute(int a, float b) { |
| subtract(multiply(add(a, b), 3)); |
| } </code></pre> |
| |
| <h4 class="fragment">How many operations to step into subtract()?</h4> |
| <p class="fragment">Step-into:</p> |
| <pre class="fragment"><code>int add(int arg1, int arg2) { |
| return arg1 + arg2; |
| } </code></pre> |
| |
| <p class="fragment">Return and Step-into again:</p> |
| <pre class="fragment"><code>int multiply(int arg1, int arg2) { |
| return arg1 * arg2; |
| } </code></pre> |
| |
| <p class="fragment">Return and Step-into yet again to finally get to:</p> |
| <pre class="fragment"><code>int subtract(int arg1, int arg2) { |
| return arg1 - arg2; |
| } </code></pre> |
| <h4 class="fragment">Five stepping operations!</h4> |
| </section> |
| |
| <section> |
| <h2>Step Into Selection</h2> |
| <pre><code>void compute(int a, float b) { |
| subtract(multiply(add(a, b), 3)); |
| } </code></pre> |
| <p class="fragment">Select the "subtract" method call in the Editor</p> |
| <p class="fragment">Choose the Step-Into-Selection operation:</p> |
| <pre class="fragment"><code>int subtract(int arg1, int arg2) { |
| return arg1 - arg2; |
| } </code></pre> |
| <p class="fragment">All other method calls are stepped-over automatically</p> |
| <br> |
| <h4 class="fragment">Just one stepping operation!</h4> |
| </section> |
| </section> |
| |
| <section> |
| <section> |
| <h2>C/C++ Unit Testing</h2> |
| <br> |
| <p class="fragment">Support for different testing frameworks directly in CDT</p> |
| <br> |
| <ul> |
| <li class="fragment"><a href="http://www.boost.org/doc/libs/1_46_1/libs/test/doc/html/index.html">Boost.Test</a></li> |
| <li class="fragment"><a href="http://doc.qt.nokia.com/solutions/4/qttestlib">Qt Test</a></li> |
| <li class="fragment"><a href="http://code.google.com/p/googletest/">Google Testing Framework</a></li> |
| </ul> |
| </section> |
| <section> |
| <h2>C/C++ Unit Testing</h2> |
| <ul> |
| <li class="fragment">Compile tests into executable binary |
| <img class="fragment" src="img/CUnitTest-Launch.png" alt="Launching Unit Tests"></li> |
| <li class="fragment">Launch in Run or Debug mode</li> |
| </ul> |
| </section> |
| <section> |
| <h2>C/C++ Unit Testing</h2> |
| <img class="fragment" src="img/CUnitTest-View.png" alt="Viewing Unit Tests Results"> |
| <ul> |
| <li class="fragment">Hierarchical results browsing</li> |
| <li class="fragment">Error message display</li> |
| <li class="fragment">Source Lookup from error</li> |
| <li class="fragment">Result count and timing</li> |
| <li class="fragment">Error filtering by severity</li> |
| <li class="fragment">Re-run selected tests</li> |
| </ul> |
| </section> |
| </section> |
| |
| <section> |
| <h2>Qt Support</h2> |
| <ul> |
| <li>New project template for qmake</li> |
| <li>Slots and Signals content assist and search</li> |
| <li>"Syntax" highlighting</li> |
| <li>Templates for Qt classes and methods</li> |
| <li>Project file editor</li> |
| </ul> |
| </section> |
| |
| <section> |
| <section> |
| <h2>Future Plans</h2> |
| <ul> |
| <li class="fragment">Multicore Visualizer |
| <ul class="fragment"> |
| <li>Memory Usage Monitoring</li> |
| <li>Automatic display of important information</li> |
| </ul> |
| </li> |
| <li class="fragment">Global Breakpoints</li> |
| <li class="fragment">Per-target Breakpoints</li> |
| <li class="fragment">Grouping of Debug view elements</li> |
| <li class="fragment">Improve Qt support to first class</li> |
| <li class="fragment">Advanced Makefile projects for cmake, qmake</li> |
| <li class="fragment">LLVM for code analysis</li> |
| </ul> |
| </section> |
| </section> |
| <section> |
| <h2>Q&A</h2> |
| </section> |
| </div> |
| |
| </div> |
| |
| <script src="lib/js/head.min.js"></script> |
| <script src="js/reveal.min.js"></script> |
| |
| <script> |
| |
| // Full list of configuration options available here: |
| // https://github.com/hakimel/reveal.js#configuration |
| Reveal.initialize({ |
| controls: true, |
| progress: true, |
| history: true, |
| center: true, |
| |
| theme: Reveal.getQueryHash().theme, // available themes are in /css/theme |
| transition: Reveal.getQueryHash().transition || 'fade', // default/cube/page/concave/zoom/linear/fade/none |
| |
| // Optional libraries used to extend on reveal.js |
| dependencies: [ |
| { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, |
| { src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, |
| { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, |
| { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, |
| { src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }, |
| { src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } } |
| // { src: 'plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } } |
| // { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } } |
| ] |
| }); |
| |
| </script> |
| |
| </body> |
| </html> |