Summary Format for C++ templated union type

I'm working with the glm library (http://glm.g-truc.net/0.9.8/index.html) for vector math - unfortunately, the underlying data types have very unfriendly representations in the lldb debugger summary format view. For example, a simple array of vec2 data type (which is a typedef for glm::tvec2<float, glm::precision::highp>) gets the following view in the debugger:


http://imgur.com/a/P8Icz


I was able to use the Edit Summary Format functionality to make a nice view for vec2 -- e.g., ({$VAR.x},{$VAR.y}) -- when the debugger recognizes it as a vec2 (e.g., in my code). But when the debugger sees it as glm::tvec2<float, glm::precision::highp> (e.g., inside library code) editing the summary format doesn't seem to work. Instead of a nice human readable summary, I get "Summary Unavailable"


I edited the plist in /Library/Developer/Xcode/UserData/Debugger/CustomDataFormatters to see what happened:


<SummaryFormatter

formatString = "({$VAR.x},{$VAR.y})"

type = "glm::tvec2&lt;float, glm::precision::highp&gt;">

</SummaryFormatter>


I figured the escaping of the angle brackets might be the issue, so I changed it to:


<SummaryFormatter

formatString = "({$VAR.x},{$VAR.y})"

type = "glm::tvec2<float, glm::precision::highp>">

</SummaryFormatter>


TLDR: In my project's namespace 'vec2' is a simple typedef for glm::tvec2<float, glm::precision::highp>. The summary format for `vec2` works great, but when glm::tvec2<float, glm::precision::highp> is encountered in library code, none of the summary formats I've defined for it work.


But this doesn't solve the problem, now instead of seeing "Summary Unavailable" I see no attempt at a summary at all.


Any suggestions for me? It's very hard to step through some of my geometry logic with a debugger when it's so hard to see the values of the data I'm acting on.

Summary Format for C&#43;&#43; templated union type
 
 
Q