We currently support gdb, DDD and Allinea DDT.
This requires gdb 7.0 or higher. (This can be a problem on MacOS.)
Disclaimer: Since we used the implementation of STL container support (which is under GPL) we put the debugger support under GPL as well to comply with the license rules. As we separated this implementation from the rest of MTL4 it does not affect the license regulations of the remainder of MTL4, in particular not the commercial editions.
$HOME/.gdbinit could read:
python import sys # STL support and alike here sys.path.insert(0, '/home/username/tools/gdb_printers/python') from mtl.printers import register_mtl_printers register_mtl_printers (None) end
In fact, you can copy this file to your home directory and replace
/home/username/tools with the path where you unzipped the archive
The support for STL containers is highly recommended for any up-to-date C++ programmer, see here for details.
In gdb you can simple write
print v for any vector and
print A for matrices. See for supported types below.
DDD can print data in the same manner as gdb but displaying them is of course more elegant:
Vectors can be modified on the fly (you have to delete the type information in the input window). Matrices will be modifiable in the future.
If you really want to see the complete information (even for us this is ugly), you can type
print /r A
in the lower gdb window.
This should work out of the box. We will add screenshots soon.
Might be added some day -- the interface for user types is less convenient.
So far we have implemented:
The debugger support also works in CUDA applications. Matrices are represented in the same way as on the CPU. Vectors contain the additional information where the valid information resides.
Some remarks on the implementation
Proceed to the IDE.