| 60 | == Linuxtools == |
| 61 | |
| 62 | The Linuxtools package contain the support for autotools that we have configured above already, but also support for profilers and code checkers such as [valgrind http://www.valgrind.org/]. Some general remarks on [debugging http://wissrech.ins.uni-bonn.de/inside/wikka/Debuggen] and [profiling http://wissrech.ins.uni-bonn.de/inside/wikka/Profilieren] can be found in the Inside wiki in german. |
| 63 | |
| 64 | Running valgrind within eclipse has the advantage that memory errors can be directly associated with the respective responsible code lines. Proceed as follows: |
| 65 | In the '''Run''' menu, select '''Profile configurations''' to create a configuration of the command you wish to run under valgrind's authority. Select '''Profile with Valgrind''' from the left-hand menu. Click on the '''new launch configuration''' in the icon list above. Give the test a decent name, e.g. ''Valgrinding !TestRunner'', select your project, use the build configuration you created above (!CppUnitTest) and finally '''Search Project''' for the new executable, here ''!TestRunner''. If you need to run more complex commands, arguments and can be given in the '''Arguments''' tab. In the '''Valgrind options''' command line options of valgrind can be specified. You might want to change the '''Leak resolution''' there to ''full'' and check the '''Show reachable blocks''' for full report on memory leaks and reachable adresses. Also make sure to have your Project listed in the '''Source''' tab, if not '''Add''' it. Click '''Apply''' and '''Profile'''. |
| 66 | |
| 67 | Note that now you can easily access the created Profile by its name in the '''Run''' menu under '''Profile as'''. |