CDT 9.0 for Neon - Paying our Debt and Moving Forward

Over the last few years at the North America EclipseCon, we have held an Eclipse CDT (C/C++ Development Tooling) Summit. It’s one of the few times we have a chance to get together in a room and be a real team and we carry on that spirit as we spread around the globe during the rest of the year. This year, there was a special moment at the Summit in Reston during the hackathon we held in the evening.

Jonah Graham from Kichwa Coders, our newest committer, had pushed up a patch that implemented our biggest feature for CDT 9.0. And we finally cornered Marc Khouzam from Ericsson, our debugger master, to review it. I captured the moment in a picture I posted to Twitter. The coolest thing, was that Jonah wasn’t physically there. His wife, the famous Tracy Miranda, was there and she Skyped him into the room and Marc and Jonah went to work.


twitter moment


It just really struck me at that moment what a great team we have working on the CDT. Our contributors from different companies from different continents working together for the greater good of the community. A huge thanks to Jonah, for being up after midnight in England to dial into the hackathon, and for Marc for dragging us line by line to make sure the patch was great and doing so despite me cat calling (joking of course) from the sidelines to “just push it”. I don’t think I’ve been as proud of the team as I was that day and we have had many good ones.

So what was this great feature they were working on? Well, it wasn’t really a feature. It was the final payment on a huge technical debt we had accumulated long ago in the CDT. It was the removal of 84,000 lines of code that was the old C Debug Interface (CDI) debugger framework. It was big enough that it made Mike’s closing slides of EclipseCon stats.


slide


The CDT community had long ago transitioned to our newer Debug Services Framework (DSF) and contributions on the CDI had dwindled to nothing for a long time. We’re not even sure it worked anymore and it led to a lot of confusion over what framework adopters should be using. We have to give CDI it’s due respect. It did get us started and we wouldn’t be where we are today without it’s solid debug support. But as the community grew and adopters were trying to make it work with really interesting but complex distributed systems, they found they needed the greater flexibility that DSF provided. So it was time to move on.

CDT 9.0 New and Noteworthy

In the end, CDT 9.0 for Eclipse Neon is mainly about opening the door with a major API change to clean up CDI and other technical debt that we’ve grown in our API that has grown over the years. A complete list of the changes can be found at the end of our CDT 9.0 New and Noteworthy. You’ll also find a nice collection of other features we’ve added for this release.

I have a few favorites:

Mapping

First is our move to leverage gdb’s built-in path mapping feature so we don’t have to duplicate it in the CDT. This feature was also done by Jonah. If you’re running your program on a different machine than where the build is done, as is often done with embedded systems, the path seen by gdb can be different than what CDT sees. It’s very hard to set that up correctly, but by letting gdb take care of it, CDT will always receive paths it understands.

mapping


Codan

Codan, our static analysis code checker, is one of the coolest features of CDT that people don’t know about. It finds logic errors in your code using CDT’s built-in parsers and presents them in the editor without having to do a build. It saves a lot of time. For CDT 9.0, we’ve started adding Quick Fixes to common problems. If you have a variable that is an instance of a class you haven’t defined yet, you can use a Quick Fix to start up the New Class wizard.

class


Now, we all know that C and C++ are hard languages to parse and sometimes we get things wrong. To help cut down on false errors, we have added the ability to suppress warnings with magic comments.

x = x; // @suppress("assignment in condition") because I know better

Of course, I have been promised that Quick Fixes will be added in the future to make this even easier. And it would be great to see the community add new checkers. There is so much we can do here.

What’s next for CDT?

The biggest growth area we see for the CDT is to better support common open application frameworks and platforms that C and C++ developers are using today. Many of those frameworks come with their own build systems and our existing build system lacks the flexibility to support these systems. In fact, our current system is probably overkill for them. To help address that, we’ve started working on a new build system infrastructure that gives us a fresh new start. It co-exists with the old system but gives integrators the flexibility to totally replace it.

With the help of this new build system, we’ve rebooted our Qt support to give Qt a renewed focus for CDT. It is one of the most popular C++ application frameworks in use today, and we really need to make sure CDT users can take advantage of it. To help with that, we now have a QML editor and have started work on giving this editor standard Eclipse features such as content assist. Since this is a reboot of the Qt support, we are offering it as a preview and plan to build on it over the next few releases with the help of the community.

CDT has been in development for over 15 years now and continues to evolve as our communities evolve. There are many places where C and C++ are still kings, especially where performance matters. Compiled languages will always provide the best MIPS/Watt for these systems and the CDT along with the rest of the Eclipse ecosystem will continue to provide a great environment that helps developers build cool things.

Getting It

Download Eclipse CDT 9.0 from the Eclipse CDT website or download the Eclipse Neon "Eclipse IDE for C/C++ Developers" package now to get started!

About the Authors

Doug Schaefer

Doug Schaefer
QNX