I know when I stepped through it with the Pi example, it was returning all matches, but not filtering down the results based on the template parameter first, so you’d get back every instantiation but the template parameter would be treated as a subexpression.<br><br>I think the SymbolFile plugin should just get the whole string though and do this filtering itself.  Might be hard for complicated template arguments.  But if it’s too hard the plugin can always just give up and do what it currently does.<br><br>For PDB it’s the other way around, without this information lookup is actually impossible, because you have to hash the record name, and the template parameters are part of the hash<br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 12, 2018 at 6:34 PM Greg Clayton via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">clayborg added a comment.<br>
<br>
In <a href="https://reviews.llvm.org/D54454#1296392" rel="noreferrer" target="_blank">https://reviews.llvm.org/D54454#1296392</a>, @zturner wrote:<br>
<br>
> BTW, I will have to see if it's possible to write a test for this.  Even when I compiled and built a program with DWARF on Linux, the `target variable Pi<double>` example didn't "just work" for me, because `FindGlobalVariables` wasn't returning the variable.  So I think this part actually needs to be fixed in the DWARF plugin, which I'm not equipped to fix.  I can try something that is not a variable template, such as the `Foo<int>::StaticMember` example, but if that also doesn't work, then there might not be a good way to write a general purpose test for this until this is fixed in the DWARF plugin.<br>
><br>
> I can definitely add a test in the native pdb plugin though, and technically that runs everywhere (although it would only test `target variable` and not `frame variable`, maybe that's ok though?).<br>
<br>
<br>
It is the template stuff that throws things off. Can't remember if there is an accelerator table entry for those. Global variables in general work. It would be good to figure out what this doesn't work for DWARF. I will take a look.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D54454" rel="noreferrer" target="_blank">https://reviews.llvm.org/D54454</a><br>
<br>
<br>
<br>
</blockquote></div>