<div dir="ltr"><div dir="ltr">On Mon, Jun 7, 2021 at 3:00 PM <<a href="mailto:paul.robinson@sony.com">paul.robinson@sony.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="gmail-m_6304228892295333854WordSection1">
<p class="MsoNormal">Fully expanded names of template instantiations can become impressively large, yeah.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The DWARF Wiki’s Best Practices page <a href="http://wiki.dwarfstd.org/index.php?title=Best_Practices" target="_blank">
http://wiki.dwarfstd.org/index.php?title=Best_Practices</a> recommends including a canonical form of the template parameters in the DW_AT_name attribute.  I don’t know that I agree; it talks about omitting qualifiers (namespaces, containing classes) because
 those can be reconstructed from the DIE hierarchy, but the same argument can be made for template parameters (the difference being that qualifiers come from higher up the tree, while template parameters come from farther down).  The DRY principle would seem
 to apply here.</p></div></div></blockquote><div><br>Ah, good to know - and yeah, the asymmetry between omitting namespace qualifiers but including parameters is noteworthy.<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_6304228892295333854WordSection1">
<p class="MsoNormal">I’ll verify with our debugger team, but I’m confident that dropping the <params> from the type name will not affect Sony, as our debugger looks at the template-parameter children already (that’s why we have that turned on by default for
 sce tuning).  LLDB seems to be the odd debugger out, here, and we have some control over that.
<span style="font-family:"Segoe UI Emoji",sans-serif">😊</span></p></div></div></blockquote><div><br>Ah, fascinating/good to know!<br><br>So even if /maybe/ we wouldn't want to do this for GDB tuning (I'd be a bit hesitant to diverge that much from GCC's defaults even if it seems to work (more testing to see how broadly it works) you might be interested in this being the default for SCE? That'd be good to do. I guess if we fix LLDB might be able to switch the defaults there too.<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_6304228892295333854WordSection1"><p class="MsoNormal"><span style="font-family:"Segoe UI Emoji",sans-serif"></span><u></u><u></u></p>
<p class="MsoNormal"><u></u> Oh, is there any consequence for deduplication in LTO?  Isn’t that name-based?</p></div></div></blockquote><div><br>Should be OK - that's based on the fully mangled/linkage name of the type, which would be untouched by this.<br><br>One quirk is that we probably can't do this for templates with pointer non-type template parameters (I haven't tested non-pointer non-type template parameters (such as integers, chars, etc) but I'd hope GDB can handle that and that would provide at least some "proof of concept") since they don't have an easy unambiguous stringification - even though you can only use a named variable/function/etc (ie: can't use an array offset, or other computed address) - neither GCC nor Clang encode that string, but instead encode the address (well, GCC doesn't even encode the address - so that debug info doesn't adversely affect code generation by causing the symbol to be linked in when it's otherwise unreferenced by the actual code) & so coming up with an unambiguous/consistent string to use in building the name would be a bit much. GDB doesn't seem to handle that situation. (says "UNKNOWN" or similar for the parameter, thus creating ambiguity when matching against others, etc)<br><br>The other area I'd be unsure about would be indexes - gdb index and DWARFv5 debug_names. We'll be indexing the linkage/mangled name (hmm, we don't do the linkage name for types - only for functions), and the simple name - but, as you point out - we were skipping namespaces already, so it's not like looking up "foo<int>" was unambiguous anyway - so they'll be a bit more ambiguous after this change. Some consumer performance impact - they'd have to search through more duplicates (take std::vector - now a consumer will have to go look at every CU that has any vector instantiation, whereas previously they were probably able to only look at the vector<int> instantiating CUs (& any nonstd::vector<int> out there as well) for instance).<br><br>- Dave<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_6304228892295333854WordSection1"><p class="MsoNormal"><u></u></p>
<p class="MsoNormal">--paulr<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0in 0in 0in 4pt">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> <br>
<b>Sent:</b> Friday, June 4, 2021 9:33 PM<br>
<b>To:</b> llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>; Robinson, Paul <<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>>; Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>>; Jonas Devlieghere <<a href="mailto:jdevlieghere@apple.com" target="_blank">jdevlieghere@apple.com</a>>; Henderson, James <<a href="mailto:James.Henderson@sony.com" target="_blank">James.Henderson@sony.com</a>>; Caroline Tice <<a href="mailto:cmtice@google.com" target="_blank">cmtice@google.com</a>>; Eric Christopher
 <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>><br>
<b>Subject:</b> [DWARF] using simplified template names<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">tl;dr: What if we used only the base name of templates in the DW_AT_name field for function and class templates (eg: "vector" instead of "vector<int, std::allocator<int>>")?<br>
<br>
<span style="font-size:13.5pt">Context:</span><br>
We (at Google) have been seeing some significant DWARF growth in binaries lately due to increased use of libraries like Eigen and TensorFlow that use expression templates.<br>
<br>
This includes some cases where the debug_str.dwo section has exceeded the DWARF32 limit (& the binutils dwp tool silently wrote overflowed indexes into the debug_str_offsets.dwo section, unfortunately - leading to corrupted/garbled names in backtraces) & most
 of the growth is from the demangled names of complicated/large expression templates.<br>
<br>
<span style="font-size:13.5pt">Options:</span><br>
One solution would be to move to DWARF64 - though that does make DWARF overall larger, which is an unfortunate cost that would be nice to avoid.<br>
<br>
Another might be to rely solely on linkage names (add linkage names to types), since mangled names generally reduce a lot of the duplication - though in some cases it's not a matter of duplication within a single name, but possibly many distinct types used
 as template parameters - though those types may also be used in other names (& mangled names have no sharing across names).<br>
<br>
Compression doesn't help, since the offsets are into the uncompressed data.<br>
<br>
<span style="font-size:13.5pt">Main idea:<br>
</span>What if templates instead only encoded the base name, such as "vector" (rather than "vector<int, std::allocator<int>>")? The full name could still be reconstructed from the DW_TAG_template_type_parameters (non-type template parameters would be more difficult,
 and we'd need to add template parameters to template declarations - functionality we have, but is only enabled for SCE today)).<br>
<br>
This could significantly reduce debug info size (in some worst-cases I've seen this lead to a 50% reduction in the uncompressed size of .debug_str.dwo in a dwp file, for instance - probably less exciting if the data was compressed - but gives a sense of the
 headroom available before this limit will be reached again).<br>
<br>
Also has the nice property that it's not a new format or encoding that might break existing consumers immediately (DWARF64, for instance isn't widely implemented to my knowledge, so many consumers would need to be fixed before they could parse any of it) -
 if a consumer doesn't know, it'll still see a name, just not the most fully descriptive/specific name it could be. For a symbolizer this is probably fairly low cost - users would find it more difficult, but not totally useless to get a simple template function
 name.<br>
<br>
As it happens, it seems GDB is already built to cope with this situation - it can print the real name of the type and can even correctly match up two distinct type declarations between translation units by correctly matching their template parameters.<br>
<br>
GDB Example:<br>
a.h:<u></u><u></u></p>
<blockquote style="margin-left:30pt;margin-right:0in">
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">template<typename T></span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">struct t1 { T t = sizeof(T); };</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">void f(t1<int> &p1, t1<short> *&p2);</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</blockquote>
<p class="MsoNormal">a.cpp:<u></u><u></u></p>
<blockquote style="margin-left:30pt;margin-right:0in">
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">#include "a.h"</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">int main() {</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">t1<int> v1;</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">t1<short> *v2 = nullptr;</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">t1<bool> *v3 = nullptr;</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">f(v1, v2);</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">}</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</blockquote>
<p class="MsoNormal">b.cpp:<u></u><u></u></p>
<blockquote style="margin-left:30pt;margin-right:0in">
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">#include "a.h"</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">void f(t1<int> &p1, t1<short> *&p2) {</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">static t1<short> v2;</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">p2 = &v2;</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">}</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><br>
// using a clang modified to produce simple template names, and <br>
// to include template parameters on declarations <br>
// (-Xclang -debug-forward-template-params)<br>
$ clang++ a.cpp b.cpp -g<br>
$ llvm-dwarfdump a.out (glossing over some details)<br>
<br>
<u></u><u></u></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG</span></span><span class="gmail-m_6304228892295333854gmail-s2"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">_compile_unit</span></span><span style="font-size:8.5pt;font-family:Menlo,serif"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s2"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("a.cpp")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_structure_type</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("t1")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_template_type_parameter</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_type</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(0x00000098 "int")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("T")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_member</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("t")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">      </span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_type</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
       </span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(0x00000098 "int")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_structure_type</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("t1")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_declaration
</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(true)</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_template_type_parameter</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_type</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(0x000000e2 "short")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("T")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_structure_type</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("t1")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_declaration
</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(true)</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_template_type_parameter</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_type</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(0x000000fd "bool")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin-right:0in;margin-bottom:12pt;margin-left:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("T")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_compile_unit</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("b.cpp")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_structure_type</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("t1")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_template_type_parameter</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_type</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(0x0000019e "short")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("T")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_member</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in"><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("t")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">      </span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_type</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
       </span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(0x0000019e "short")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_structure_type</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("t1")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_declaration
</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"> 
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(true)</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_TAG_template_type_parameter</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_type</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(0x000001b9 "int")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">     
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">DW_AT_name</span></span><span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">       
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">("T")</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><br>
<span class="gmail-m_6304228892295333854gmail-s1">$ gdb ./a.out</span><u></u><u></u></span></p>
</div>
<blockquote style="margin-left:30pt;margin-right:0in">
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(gdb) start</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(gdb) ptype v1</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">type = struct t1<int> [with T = int] {</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">T t;</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">}</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(gdb) ptype v2</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">type = struct t1<short> [with T = short] {</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">T t;</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">} *</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(gdb) ptype v3</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">type = struct t1<bool> {</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p2" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-apple-converted-space"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">   
</span></span><span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(116,116,116)"><incomplete type></span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:rgb(116,116,116)"><u></u><u></u></span></p>
</div>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">} *</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(gdb) ptype v1.t</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">type = int</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(gdb) ptype v2->t</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">type = short</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">(gdb) ptype v3->t</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span class="gmail-m_6304228892295333854gmail-s1"><span style="font-size:8.5pt;font-family:Menlo,serif;color:black">There is no member named t.</span></span><span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u><u></u></span></p>
</div>
</blockquote>
<div>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p class="gmail-m_6304228892295333854gmail-p1" style="margin:0in;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal">
<span style="font-size:8.5pt;font-family:Menlo,serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-bottom:12pt">So in this example we have one instantiation (t1<int>) declared in the first CU and defined in the second, one instantation (t1<short>) declared in the first and defined in the second, and a third instantiation
 (t1<bool>) declared in the first and not defined anywhere.<br>
<br>
GDB has correctly rendered the type names, despite lacking the template parameter lists being in the DW_AT_name - and has correctly associated the definitions with the declarations despite the DW_AT_name being ambiguous, by using the DW_TAG_template_type_parameters.<br>
<br>
lldb doesn't cope with this sort of DWARF currently - it has a bunch of assumptions about the names of template instantiations that'll need to be fixed before it can consume this sort of thing.<br>
<br>
I haven't tested a wide number of symbolizers, but I assume they'll generally need some work too.<br>
<br>
So... how's this sound to everyone? An idea worth pursuing? Concerns/questions/etc.<br>
<br>
I don't expect this to become the default for LLVM in the short term at least - but under a flag for those whose consumers can handle it (/maybe/ we do it under debugger tuning for gdb, since it seems OK with it - but that might be a bit stronger than we want
 to do under the default tuning, since it's really broken for lldb, not just a little bit broken).<br>
<br>
- Dave<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>

</blockquote></div></div>