Improve C++ function name handling and step-in avoid regerxp handling
If the function is a template then the return type is part of the
function name. This CL fixes the parsing of these function names in
the case when the return type contains ':'.
The name of free functions in C++ don't have context part. Fix the
logic geting the function name without arguments out from a full
function name to handle this case.
Change the handling of step-in-avoid-regexp to match the value against
the function name without it's arguments and return value. This is
required because the default regex ("^std::") would match any template
function returning an std object.
Fifferential revision: http://reviews.llvm.org/D11461
llvm-svn: 243099
diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp
index a1916fe..e1b0738 100644
--- a/lldb/source/Core/Mangled.cpp
+++ b/lldb/source/Core/Mangled.cpp
@@ -95,10 +95,11 @@
mangled_name_cstr[2] != 'Z')) // named local entities (if we eventually handle eSymbolTypeData, we will want this back)
{
CPPLanguageRuntime::MethodName cxx_method (demangled);
- if (!cxx_method.GetBasename().empty() && !cxx_method.GetContext().empty())
+ if (!cxx_method.GetBasename().empty())
{
- std::string shortname = cxx_method.GetContext().str();
- shortname += "::";
+ std::string shortname;
+ if (!cxx_method.GetContext().empty())
+ shortname = cxx_method.GetContext().str() + "::";
shortname += cxx_method.GetBasename().str();
ConstString result(shortname.c_str());
g_most_recent_mangled_to_name_sans_args.first = mangled;