[Lldb-commits] [lldb] r177965 - <rdar://problem/13502196>
Greg Clayton
gclayton at apple.com
Mon Mar 25 18:45:43 PDT 2013
Author: gclayton
Date: Mon Mar 25 20:45:43 2013
New Revision: 177965
URL: http://llvm.org/viewvc/llvm-project?rev=177965&view=rev
Log:
<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.
Modified:
lldb/trunk/source/Core/Debugger.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=177965&r1=177964&r2=177965&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Mon Mar 25 20:45:43 2013
@@ -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);
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp?rev=177965&r1=177964&r2=177965&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.cpp Mon Mar 25 20:45:43 2013
@@ -39,7 +39,10 @@ DWARFDeclContext::GetQualifiedName () co
{
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);
}
}
}
More information about the lldb-commits
mailing list