diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 4662d0b09495..e2323ae03d9e 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -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); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp index 2c1c59be1d23..27047fb22905 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp @@ -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); } } }