forked from OSchip/llvm-project
<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:
parent
08f5fa7a6e
commit
855958caef
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue