<rdar://problem/13502196>

Functions in "(anonymous namespace)" was causing LLDB to crash when trying to complete a type and it would also cause functions arguments to appear in wrong place in frame display when showing function arguments.

llvm-svn: 177965
This commit is contained in:
Greg Clayton 2013-03-26 01:45:43 +00:00
parent 08f5fa7a6e
commit 855958caef
2 changed files with 14 additions and 2 deletions

View File

@ -2242,7 +2242,16 @@ Debugger::FormatPrompt
const char *open_paren = strchr (cstr, '(');
const char *close_paren = NULL;
if (open_paren)
close_paren = strchr (open_paren, ')');
{
if (strncmp(open_paren, "(anonymous namespace)", strlen("(anonymous namespace)")) == 0)
{
open_paren = strchr (open_paren + strlen("(anonymous namespace)"), '(');
if (open_paren)
close_paren = strchr (open_paren, ')');
}
else
close_paren = strchr (open_paren, ')');
}
if (open_paren)
s.Write(cstr, open_paren - cstr + 1);

View File

@ -39,7 +39,10 @@ DWARFDeclContext::GetQualifiedName () const
{
if (pos != begin)
m_qualified_name.append("::");
m_qualified_name.append(pos->name);
if (pos->name == NULL)
m_qualified_name.append ("(anonymous namespace)");
else
m_qualified_name.append(pos->name);
}
}
}