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.

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.

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
On Mon, Nov 12, 2018 at 6:34 PM Greg Clayton via Phabricator <
revi...@reviews.llvm.org> wrote:

> clayborg added a comment.
>
> In https://reviews.llvm.org/D54454#1296392, @zturner wrote:
>
> > 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.
> >
> > 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?).
>
>
> 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.
>
>
> https://reviews.llvm.org/D54454
>
>
>
>
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to