mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 17:45:07 +08:00
<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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user