summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatManager.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-10-29 21:18:03 +0000
committerEnrico Granata <egranata@apple.com>2012-10-29 21:18:03 +0000
commitb588726ec976f38ceacb8ae2aff97c2631073142 (patch)
tree8d310ea112804f62135cfd68090e48a030abc5b2 /lldb/source/Core/FormatManager.cpp
parent8f4d7eb518d7dd6309de9f0f1211b04265e8b1fd (diff)
downloadbcm5719-llvm-b588726ec976f38ceacb8ae2aff97c2631073142.tar.gz
bcm5719-llvm-b588726ec976f38ceacb8ae2aff97c2631073142.zip
<rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it does not automatically initialize the script interpreter in order to transfer its output file handle to it
This should delay initialization of Python until strictly necessary and speed-up debugger startup Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes llvm-svn: 166967
Diffstat (limited to 'lldb/source/Core/FormatManager.cpp')
-rw-r--r--lldb/source/Core/FormatManager.cpp31
1 files changed, 12 insertions, 19 deletions
diff --git a/lldb/source/Core/FormatManager.cpp b/lldb/source/Core/FormatManager.cpp
index d80b46cba98..e28c0d46e38 100644
--- a/lldb/source/Core/FormatManager.cpp
+++ b/lldb/source/Core/FormatManager.cpp
@@ -947,35 +947,28 @@ FormatManager::LoadObjCFormatters()
TypeCategoryImpl::SharedPointer objc_category_sp = GetCategory(m_objc_category_name);
-#ifndef LLDB_DISABLE_PYTHON
- lldb::TypeSummaryImplSP ObjC_BOOL_summary(new ScriptSummaryFormat(objc_flags,
- "lldb.formatters.objc.objc.BOOL_SummaryProvider",
- ""));
+ lldb::TypeSummaryImplSP ObjC_BOOL_summary(new CXXFunctionSummaryFormat(objc_flags, lldb_private::formatters::ObjCBOOLSummaryProvider,""));
objc_category_sp->GetSummaryNavigator()->Add(ConstString("BOOL"),
ObjC_BOOL_summary);
-
- lldb::TypeSummaryImplSP ObjC_BOOLRef_summary(new ScriptSummaryFormat(objc_flags,
- "lldb.formatters.objc.objc.BOOLRef_SummaryProvider",
- ""));
objc_category_sp->GetSummaryNavigator()->Add(ConstString("BOOL &"),
- ObjC_BOOLRef_summary);
- lldb::TypeSummaryImplSP ObjC_BOOLPtr_summary(new ScriptSummaryFormat(objc_flags,
- "lldb.formatters.objc.objc.BOOLPtr_SummaryProvider",
- ""));
+ ObjC_BOOL_summary);
objc_category_sp->GetSummaryNavigator()->Add(ConstString("BOOL *"),
- ObjC_BOOLPtr_summary);
+ ObjC_BOOL_summary);
+
-
// we need to skip pointers here since we are special casing a SEL* when retrieving its value
objc_flags.SetSkipPointers(true);
- AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Selector.SEL_Summary", ConstString("SEL"), objc_flags);
- AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Selector.SEL_Summary", ConstString("struct objc_selector"), objc_flags);
- AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Selector.SEL_Summary", ConstString("objc_selector"), objc_flags);
- AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Selector.SELPointer_Summary", ConstString("objc_selector *"), objc_flags);
+ AddCXXSummary(objc_category_sp, lldb_private::formatters::ObjCSELSummaryProvider<false>, "SEL summary", ConstString("SEL"), objc_flags);
+ AddCXXSummary(objc_category_sp, lldb_private::formatters::ObjCSELSummaryProvider<false>, "SEL summary", ConstString("struct objc_selector"), objc_flags);
+ AddCXXSummary(objc_category_sp, lldb_private::formatters::ObjCSELSummaryProvider<false>, "SEL summary", ConstString("objc_selector"), objc_flags);
+ AddCXXSummary(objc_category_sp, lldb_private::formatters::ObjCSELSummaryProvider<true>, "SEL summary", ConstString("objc_selector *"), objc_flags);
+
+#ifndef LLDB_DISABLE_PYTHON
AddScriptSummary(objc_category_sp, "lldb.formatters.objc.Class.Class_Summary", ConstString("Class"), objc_flags);
- objc_flags.SetSkipPointers(false);
#endif // LLDB_DISABLE_PYTHON
+ objc_flags.SetSkipPointers(false);
+
TypeCategoryImpl::SharedPointer corefoundation_category_sp = GetCategory(m_corefoundation_category_name);
AddSummary(corefoundation_category_sp,
OpenPOWER on IntegriCloud