diff options
author | Greg Clayton <gclayton@apple.com> | 2013-03-26 01:45:43 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-03-26 01:45:43 +0000 |
commit | 855958caef9b5e6253f0feffa8b58427e87c7ac6 (patch) | |
tree | 7724eb6c50942f23b931ed7bfdbcf5d510dd79f7 | |
parent | 08f5fa7a6e3ce8c5368393099968959c3f427b22 (diff) | |
download | bcm5719-llvm-855958caef9b5e6253f0feffa8b58427e87c7ac6.tar.gz bcm5719-llvm-855958caef9b5e6253f0feffa8b58427e87c7ac6.zip |
<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
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 11 | ||||
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 4662d0b0949..e2323ae03d9 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 2c1c59be1d2..27047fb2290 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); } } } |