One of the new features for the Developer Toolset (DTS) 2.0 is Eclipse 4.3.0 (Kepler). Aside from various performance improvements to the base platform since Eclipse 4.2 (Juno) a lot of other plugins are being shipped to make life easier for development. The C/C++ Developer Tooling (CDT) is a plugin used to develop, build, run, and debug C/C++ applications in Eclipse. It has support for various toolchains, Makefile/Autotools projects, static analysis, and easy navigation of a code-base thanks to a powerful indexer. There's also support for EGit (Git Integration), Mylyn (Task Management) , and a variety of different profiling tools provided by the Linux Tools Project, such as an environment for developing SystemTap scripts.

Assuming Eclipse Kepler is installed from DTS 2.0, it will be available from the "Applications" menu, under the "Programming" category as "DTS Eclipse". It can also be started from a shell with the command :

scl enable devtoolset-2 eclipse

DTS_Kepler

In addition to shipping the CDT there's a variety of Eclipse plugins provided that allow us to profile our C/C++ applications and look for potential issues. Integrations exist for OProfile, Perf, Valgrind, Gprof and Gcov. A set of categories (Coverage, Memory, Timing) have also been created to allow for grouping profiling tools, and defining a sane default to improve the user experience. More advanced users can always use a specific tool by its name, or configure the categories as they wish.

DTS_Kepler_Profiling_Tools_Menu

In this particular case I've created a launch configuration that uses the "Helgrind" plugin to profile potential synchronization errors arising from the use of the POSIX pthreads library.

DTS_Kepler_Profiling_Tools_Config

Our application simply reads some files in parallel and outputs some data. When run under the Helgrind plugin, the Valgrind view shows us some problems as well as highlighting the relevant lines of code.

It's clear to see that a value is being accessed/modified from various threads without the use of any locking. This can produce some non-deterministic behavior.

DTS_Kepler_Helgrind_Result

For Git integration one can use the EGit plugin for Eclipse.

DTS_Kepler_Import_Git

Simply selecting "Projects from Git" from the Project Import menu and specify the repository location (local, or remote).

DTS_Kepler_Git_Config

Once cloning has completed, one can configure the project as needed. Since this is not an Eclipse project there is an additional step needed to define it as a C++ GNU Autotools project. To create an existing project we simply provide its location (hence the warning) and specify a GNU Autotools Empty Project to be used as the template.

DTS_Kepler_Project_Config

We have now successfully imported a project and configured it as C++ GNU Autotools Project with Git integration.

DTS_Kepler_Egit_Options

From here, the Autotools functionality makes it pretty simple to configure, build, and run the project.

DTS_Kepler_Gimp_Built

Lastly we can profile the project and review the results. In this case the Perf Plugin is being used to do so.

DTS_Kepler_Gimp_Perf

With these different integrations, it becomes easier to manage all aspects of a project.