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):
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 168 shows an untransformed and transformed list and vector.
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.
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.