Some descriptive text for the Python script feature:
 - help type summary add now gives some hints on how to use it
frame variable and target variable now have a --no-summary-depth (-Y) option:
 - simply using -Y without an argument will skip one level of summaries, i.e.
   your aggregate types will expand their children and display no summary, even
   if they have one. children will behave normally
 - using -Y<int>, as in -Y4, -Y7, ..., will skip as many levels of summaries as
   given by the <int> parameter (obviously, -Y and -Y1 are the same thing). children
   beneath the given depth level will behave normally
 -Y0 is the same as omitting the --no-summary-depth parameter entirely
 This option replaces the defined-but-unimplemented --no-summary

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135336 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectExpression.cpp b/source/Commands/CommandObjectExpression.cpp
index 57dd7c7..4a25477 100644
--- a/source/Commands/CommandObjectExpression.cpp
+++ b/source/Commands/CommandObjectExpression.cpp
@@ -329,7 +329,8 @@
                                               m_options.print_object,   // Print the objective C object?
                                               use_dynamic,
                                               true,                     // Scope is already checked. Const results are always in scope.
-                                              false);                   // Don't flatten output
+                                              false,                    // Don't flatten output
+                                              0);                       // Always use summaries (you might want an option --no-summary like there is for frame variable)
                 if (result)
                     result->SetStatus (eReturnStatusSuccessFinishResult);
             }
diff --git a/source/Commands/CommandObjectFrame.cpp b/source/Commands/CommandObjectFrame.cpp
index 9d8f429..e99c1e0 100644
--- a/source/Commands/CommandObjectFrame.cpp
+++ b/source/Commands/CommandObjectFrame.cpp
@@ -501,7 +501,8 @@
                                                                               m_varobj_options.use_objc,
                                                                               m_varobj_options.use_dynamic, 
                                                                               false,
-                                                                              m_varobj_options.flat_output);                                        
+                                                                              m_varobj_options.flat_output,
+                                                                              m_varobj_options.no_summary_depth);                                        
                                             }
                                         }
                                     }
@@ -552,7 +553,8 @@
                                                               m_varobj_options.use_objc,
                                                               m_varobj_options.use_dynamic,
                                                               false,
-                                                              m_varobj_options.flat_output);
+                                                              m_varobj_options.flat_output,
+                                                              m_varobj_options.no_summary_depth);
                             }
                             else
                             {
@@ -642,7 +644,8 @@
                                                                       m_varobj_options.use_objc,
                                                                       m_varobj_options.use_dynamic, 
                                                                       false,
-                                                                      m_varobj_options.flat_output);                                        
+                                                                      m_varobj_options.flat_output,
+                                                                      m_varobj_options.no_summary_depth);                                        
                                     }
                                 }
                             }
diff --git a/source/Commands/CommandObjectMemory.cpp b/source/Commands/CommandObjectMemory.cpp
index 98b1df5..e91490c 100644
--- a/source/Commands/CommandObjectMemory.cpp
+++ b/source/Commands/CommandObjectMemory.cpp
@@ -658,7 +658,8 @@
                                                   m_varobj_options.use_objc,
                                                   m_varobj_options.use_dynamic,
                                                   scope_already_checked,
-                                                  m_varobj_options.flat_output);
+                                                  m_varobj_options.flat_output,
+                                                  0);
                 }
                 else
                 {
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index c450046..1af50f0 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -489,7 +489,8 @@
                                       m_varobj_options.use_objc,
                                       m_varobj_options.use_dynamic,
                                       false,
-                                      m_varobj_options.flat_output);                                        
+                                      m_varobj_options.flat_output,
+                                      m_varobj_options.no_summary_depth);                                        
 
     }
     
diff --git a/source/Commands/CommandObjectType.cpp b/source/Commands/CommandObjectType.cpp
index 770d61f..d408a60 100644
--- a/source/Commands/CommandObjectType.cpp
+++ b/source/Commands/CommandObjectType.cpp
@@ -1009,6 +1009,18 @@
                 "\n"
                 "A command you may definitely want to try if you're doing C++ debugging is:\n"
                 "type summary add -f \"${var._M_dataplus._M_p}\" std::string\n"
+                "\n"
+                "You can also add Python summaries, in which case you will use lldb public API to gather information from your variables"
+                "and elaborate them to a meaningful summary inside a script written in Python. The variable object will be passed to your"
+                "script as an SBValue object. The following example might help you when starting to use the Python summaries feature:\n"
+                "type summary add JustADemo -s \"value = valobj.GetChildMemberWithName('value'); return 'My value is ' + value.GetValue();\"\n"
+                "If you prefer to type your scripts on multiple lines, you will use the -P option and then type your script, ending it with "
+                "the word DONE on a line by itself to mark you're finished editing your code:\n"
+                "(lldb)type summary add JustADemo -P\n"
+                "     value = valobj.GetChildMemberWithName('value');\n"
+                "     return 'My value is ' + value.GetValue();\n"
+                "DONE\n"
+                "(lldb)"
                 );
 }