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/Interpreter/OptionGroupValueObjectDisplay.cpp b/source/Interpreter/OptionGroupValueObjectDisplay.cpp
index edc5dbb..b8a767c 100644
--- a/source/Interpreter/OptionGroupValueObjectDisplay.cpp
+++ b/source/Interpreter/OptionGroupValueObjectDisplay.cpp
@@ -38,7 +38,7 @@
     { LLDB_OPT_SET_1, false, "objc",            'O', no_argument,       NULL, 0, eArgTypeNone,      "Print as an Objective-C object."},
     { LLDB_OPT_SET_1, false, "ptr-depth",       'P', required_argument, NULL, 0, eArgTypeCount,     "The number of pointers to be traversed when dumping values (default is zero)."},
     { LLDB_OPT_SET_1, false, "show-types",      'T', no_argument,       NULL, 0, eArgTypeNone,      "Show variable types when dumping values."},
-    { LLDB_OPT_SET_1, false, "no-summary",      'Y', no_argument,       NULL, 0, eArgTypeNone,      "Omit summary information."},
+    { LLDB_OPT_SET_1, false, "no-summary-depth",'Y', optional_argument, NULL, 0, eArgTypeCount,     "Set a depth for omitting summary information (default is 1)."},
     { 0, false, NULL, 0, 0, NULL, NULL, eArgTypeNone, NULL }
 };
 
@@ -80,7 +80,6 @@
             }
             break;
         case 'T':   show_types   = true;  break;
-        case 'Y':   show_summary = false; break;
         case 'L':   show_location= true;  break;
         case 'F':   flat_output  = true;  break;
         case 'O':   use_objc = true;      break;
@@ -96,6 +95,17 @@
                 error.SetErrorStringWithFormat("Invalid pointer depth '%s'.\n", option_arg);
             break;
             
+        case 'Y':
+            if (option_arg)
+            {
+                no_summary_depth = Args::StringToUInt32 (option_arg, 0, 0, &success);
+                if (!success)
+                    error.SetErrorStringWithFormat("Invalid pointer depth '%s'.\n", option_arg);
+            }
+            else
+                no_summary_depth = 1;
+            break;
+
         default:
             error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
             break;
@@ -107,13 +117,13 @@
 void
 OptionGroupValueObjectDisplay::OptionParsingStarting (CommandInterpreter &interpreter)
 {
-    show_types    = false;
-    show_summary  = true;
-    show_location = false;
-    flat_output   = false;
-    use_objc      = false;
-    max_depth     = UINT32_MAX;
-    ptr_depth     = 0;
+    show_types        = false;
+    no_summary_depth  = 0;
+    show_location     = false;
+    flat_output       = false;
+    use_objc          = false;
+    max_depth         = UINT32_MAX;
+    ptr_depth         = 0;
     
     Target *target = interpreter.GetExecutionContext().target;
     if (target != NULL)