CrossStudio debugger type interpretation files are used by the debugger to provide list and string displays of C++ template container types. The files are structured using XML syntax for its simple construction and parsing.

Consider the following C++ template type

template <class _Type> class VeryBasicArray
    size_t m_Count;
    _Type *m_pData; 
    VeryBasicArray(size_t count)
        : m_Count(count)
       , m_pData(new _Type[count])

VeryBasicArray<int> basicArray(5);

To display a variable of this type as a list the type interpretation file contains the following entry

<List Name="VeryBasicArray&lt;*&gt;"

The Name attribute is used to match the template type name note that the &lt and &gt xml entities are used to match the template argument.

When an entry has been matched the head of the list is located by evaluating the debugger expression in the Head attribute. The debugger expressions can contain macros that refer to the matched template type and will use the symbols HEAD and CURRENT.

The macro $(T) refers to the instantiated template type, for the above example $(T)=VeryBasicArray<int>.

The template arguments are referred to using macros $(T0), for the above example $(T0)=int.

The symbol HEAD is the address of the variable being displayed, for the above example if the variable basicArray is allocated at address 0x20004000 then the Head expression


will be evaluated by the debugger, note that the . operator and the -> operator are equivalent in debugger expressions.

To display an element the debugger will evaluate the Data expression. This expression contains the symbol CURRENT which is the address of the element to display, for the above example the first element is at the address basicArray.m_pData which is allocated at address 0x20008000 then the Data expression


will be evaluated by the debugger.

To increment the CURRENT symbol the Next expression


will be evaluated by the debugger.

Before the CURRENT symbol is incremented the debugger needs to check if it is at the end of list. The can be done either as a Condition expression or as a Length expression


The String display is simpler than the List display since the characters are contiguous and optionally null terminated. The Data and Length expressions are supported, for example

<String Name="string"
        Data="*(($(T) *)HEAD)._M_start_of_storage._M_data"
        Length="(($(T) *)HEAD)._M_finish-(($(T) *)HEAD)._M_start_of_storage._M_data"/>

is used to display STLPort std::string types.