diff options
author | Enrico Granata <egranata@apple.com> | 2012-03-01 19:32:33 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2012-03-01 19:32:33 +0000 |
commit | 896cd1d3e675b1c7be05be9975b09df1bafca9eb (patch) | |
tree | 611167d97b5f252bc9b80677d08ed7a34398257a /lldb/source | |
parent | 34085df4e852438dd156fcd87bfd650be9243d2c (diff) | |
download | bcm5719-llvm-896cd1d3e675b1c7be05be9975b09df1bafca9eb.tar.gz bcm5719-llvm-896cd1d3e675b1c7be05be9975b09df1bafca9eb.zip |
(a) adding an introspection formatter for NS(Mutable)IndexSet
(b) fixes and improvements to the formatters for NSDate and NSString
(c) adding an introspection formatter for NSCountedSet
(d) making the Objective-C formatters test cases pass on both 64 and 32 bit
one of the test cases is marked as expected failure on i386 - support needs to be added to the LLDB core for it to pass
llvm-svn: 151826
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Core/FormatManager.cpp | 13 | ||||
-rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lldb/source/Core/FormatManager.cpp b/lldb/source/Core/FormatManager.cpp index af0ef7954c6..4e12903cdcb 100644 --- a/lldb/source/Core/FormatManager.cpp +++ b/lldb/source/Core/FormatManager.cpp @@ -738,7 +738,7 @@ FormatManager::LoadObjCFormatters() ConstString("CFRange"), objc_flags); AddSummary(corefoundation_category_sp, - "x=${var.x}, y=${var.y}", + "(x=${var.x}, y=${var.y})", ConstString("NSPoint"), objc_flags); AddSummary(corefoundation_category_sp, @@ -754,7 +754,7 @@ FormatManager::LoadObjCFormatters() ConstString("NSRectArray"), objc_flags); AddSummary(objc_category_sp, - "width=${var.width}, height=${var.height}", + "(width=${var.width}, height=${var.height})", ConstString("NSSize"), objc_flags); @@ -856,6 +856,15 @@ FormatManager::LoadObjCFormatters() AddScriptSummary(appkit_category_sp, "NSDate.NSDate_SummaryProvider", ConstString("NSDate"), appkit_flags); + // CFAbsoluteTime is actually a double rather than a pointer to an object + // we do not care about the numeric value, since it is probably meaningless to users + appkit_flags.SetDontShowValue(true); + AddScriptSummary(appkit_category_sp, "NSDate.CFAbsoluteTime_SummaryProvider", ConstString("CFAbsoluteTime"), appkit_flags); + appkit_flags.SetDontShowValue(false); + + AddScriptSummary(appkit_category_sp, "NSIndexSet.NSIndexSet_SummaryProvider", ConstString("NSIndexSet"), appkit_flags); + AddScriptSummary(appkit_category_sp, "NSIndexSet.NSIndexSet_SummaryProvider", ConstString("NSMutableIndexSet"), appkit_flags); + TypeCategoryImpl::SharedPointer vectors_category_sp = GetCategory(m_vectortypes_category_name); TypeSummaryImpl::Flags vector_flags; diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 246e3bd7b9a..9d0d96983fd 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -282,7 +282,7 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete // WARNING: temporary code that loads Cocoa formatters - this should be done on a per-platform basis rather than loading the whole set // and letting the individual formatter classes exploit APIs to check whether they can/cannot do their task run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import CFString, CFArray, CFDictionary, NSData, NSMachPort, NSSet, NSNotification, NSException, CFBag, CFBinaryHeap, NSURL, NSBundle, NSNumber, NSDate')", m_dictionary_name.c_str()); + run_string.Printf ("run_one_line (%s, 'import CFString, CFArray, CFDictionary, NSData, NSMachPort, NSSet, NSNotification, NSException, CFBag, CFBinaryHeap, NSURL, NSBundle, NSNumber, NSDate, NSIndexSet')", m_dictionary_name.c_str()); PyRun_SimpleString (run_string.GetData()); int new_count = Debugger::TestDebuggerRefCount(); |