Type Transformation Defined
TotalView, as it is shipped, knows how to display a variety of compiler-defined data types and, depending on your programming language, structs, or user-defined types. If your data embeds pointers, diving on a pointer displays the "pointed to" data. If you are using more complicated data types or are using the STL data types, you will need to create a prototype that tells TotalView how it should display this data. This is because TotalView displays your data as the compiler understands it to be defined.
The prototype you can define names a set of Tcl callback functions that TotalView invokes when it displays your data. These routines tell TotalView that is should display the information in the way you say, which will either be a struct or an array. This process of telling TotalView how to display your data is called type transformation.
For instance, the next figure shows how TotalView displays an object of class vector<int> if you used the C++ std::vector used by g++.
Unmapped std::vector<int>
|
Although this is exactly what the compiler told TotalView, most users would like this information displayed as an array. After instantiating a prototype for this type, TotalView can display this information as follows:
Mapped std::vector<int>
|
Notice that TotalView shows the vector's current size and allows the user to slice and filter the data. The user could even send this data to the Visualizer.