Applications keep adding more complex functionality but development timeframes and resources are as short as ever. To account for this, programming languages and frameworks have added abstraction layers (lambda functions, STL, Boost, application middleware). These abstractions make debugging harder because developers need to look through indirect pointers to their actual data and the stack frames get filled with glue code so they lose their place while debugging.
TotalView for HPC and CodeDynamics, leading multithreaded debuggers, includes a type transformation framework (TTF), and stack transformation framework (STF), which help solve the data and call stack abstractions respectively.
Type transformation framework
TotalView and CodeDynamics provide the ability for developers to define how they view their aggregate data, in classes or structures. By default, TotalView and CodeDynamics use the TTF to transform STL strings, vectors, lists, maps, multimaps, sets, and multisets, as well as the unordered STL types for recent g++ compilers.
TTF allows developers to focus on the data elements of interest and not unnecessary detail provided by the compiler. By using TTF, developers can create a transformation to show only some of the class or structure and hide the rest from view, thus simplifying the process of debugging. The transformation can be loaded from a file or applied automatically to every TotalView and CodeDynamics debugging session.
Stack transformation framework
TotalView 2017.1 and CodeDynamics 2017.1 add the ability to transform the Call Stack. The Stack Transformation Facility maintains a list of rules that modify the displayed stack frames.
Using the STF, it’s possible to create a set of rules to filter out unwanted stack frames, allowing the user to focus only on those stack frames that are of interest. This can greatly simplify and enhance the debugging process for complex applications.
TotalView and CodeDynamics use the STF to filter out glue code in our new mixed language (Python and C/C++) support. For more details on the mixed language support, read this white paper.
As a simple example, the following (Figure 2) shows a rule is added to filter out the function named ‘_start’ from the stack trace view.
The effect of adding this rule can also be seen in the Call Stack window (Figure 3 and Figure 4) where the function named ‘_start’ is removed from view.
Using TTF and STF gives developers an unprecedented level of control over how they view their data and functions. These powerful features of TotalView and CodeDynamics are available to help transform the debugging experience and simplify complex tasks.
For more details about our dynamic analysis products, visit our website.