MTL 4: Debugger Support
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 (the notation does not work in all gdb versions).
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:
Proceed to the IDE.