TotalView User Guide : Part II: Debugging Tools and Tasks : Examining and Editing Data and Program Elements : Changing How Data is Displayed : Displaying STL Variables
Displaying STL Variables
The C++ STL (Standard Template Library) greatly simplifies access to data. Since it offers standard and prepackaged ways to organize data, you do not have to be concerned with the mechanics of the access method. The disadvantage to using the STL while debugging is that the information debuggers display is organized according to the compiler’s view of the data, rather than the STL’s logical view. For example, here is how your compiler sees a map compiled using the GNU C++ compiler (gcc):
Figure 104: An Untransformed Map
Most of the information is generated by the STL template and, in most cases, is not interesting. In addition, the STL does not aggregate the information in a useful way.
STLView solves these problems by rearranging (that is, transforming) the data so that you can easily examine it. For example, here is the transformed map.
Figure 105: A Transformed Map
Figure 106 shows an untransformed and transformed list and vector.
Figure 106: List and Vector Transformations
*By default, TotalView transforms STL strings, vectors, lists, maps, multimaps, sets, and multisets. You can create transformations for other STL containers. See "Creating Type Transformations" in the TotalView Reference Guide for more information.
By default, TotalView transforms STL types. If you need to look at the untransformed data structures, clear the View simplified STL containers (and user-defined transformations) checkbox on the Options Page of the File > Preference Dialog Box.
CLI: dset TV::ttf { true | false }
Following pointers in an STL data structure to retrieve values can be time-consuming. By default, TotalView only follows 500 pointers. You can change this by altering the value of the TV::ttf_ max_length variable.
 
RELATED TOPICS 
 
General information on creating custom type transformations
"Creating Type Transformations" in the TotalView Reference Guide
Tranforming C++ types