<div dir="ltr">I tried to run this command:<div><br></div><div>(lldb) target variable "std::numeric_limits<long double>::max_exponent"</div><div><br></div><div>In Variable.cpp:386 we run a regex against the input string which results in the above string being cut down to just `std::numeric_limits`.  So then I search my debug info and don't find anything.</div><div><br></div><div>What I need is for this string to be passed precisely as is to SymbolFile::FindGlobalVariables.</div><div><br></div><div>My question is: is this just a limitation of `target variables` that is by design, or can this be fixed?</div><div><br></div><div>Note that I think even C++14 variable templates are broken because of this, so if someone writes:</div><div><br></div><div>template<typename T></div><div>constexpr T Pi = T(<span style="background-color:rgb(249,249,249);font-size:12.8px">3.1415926535897932385L</span>);<br></div><div><br></div><div>And inside of LLDB they write `target variable Pi<double>` it won't work.</div><div><br></div><div>I think the DWARF and PDB are fundamentally different here in that in DWARF you've got a DW_TAG_variable whose name is Pi and it will have  DW_TAG_template_type_parameter of type long double.  However, in PDB the only way to find this is by actually searching for the string Pi<int> (or whatever instantiation you want).  If you just search for Pi it will be impossible to find.  </div><div><br></div><div>So, I think there are two problems to fix:</div><div><br></div><div>1) We need to search for the exact thing the user types, and if that fails, then try using the Regex expression.  That will fix the problem for PDB.</div><div><br></div><div>2) It doesn't even work for DWARF currently because the regex filter throws away the <int>.  So it does find all of the DW_TAG_variables whose name is Pi, but then it tries to evaluate <int> as a sub-expression, which obviously isn't correct.  </div><div><br></div><div>Thoughts?</div></div>