Change the new breakpoint creation output (primarily from "break set") to something more useful.

<rdar://problem/11333623>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164432 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Breakpoint/Breakpoint.cpp b/source/Breakpoint/Breakpoint.cpp
index e158258..e90a827 100644
--- a/source/Breakpoint/Breakpoint.cpp
+++ b/source/Breakpoint/Breakpoint.cpp
@@ -511,14 +511,22 @@
 void
 Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_locations)
 {
-    assert (s != NULL);
-    s->Printf("%i: ", GetID());
-    GetResolverDescription (s);
-    GetFilterDescription (s);
-
     const size_t num_locations = GetNumLocations ();
     const size_t num_resolved_locations = GetNumResolvedLocations ();
 
+    assert (s != NULL);
+    
+
+    
+    // They just made the breakpoint, they don't need to be told HOW they made it...
+    // Also, we'll print the breakpoint number differently depending on whether there is 1 or more locations.
+    if (level != eDescriptionLevelInitial)
+    {
+        s->Printf("%i: ", GetID());
+        GetResolverDescription (s);
+        GetFilterDescription (s);
+    }
+    
     switch (level)
     {
     case lldb::eDescriptionLevelBrief:
@@ -545,7 +553,32 @@
             s->EOL();
         }
         break;
-
+        
+    case lldb::eDescriptionLevelInitial:
+        s->Printf ("Breakpoint %i: ", GetID());
+        if (num_locations == 0)
+        {
+            s->Printf ("no locations (pending).");
+        }
+        else if (num_locations == 1)
+        {
+            // If there is one location only, we'll just print that location information.  But don't do this if
+            // show locations is true, then that will be handled below.
+            if (show_locations == false)
+            {
+                GetLocationAtIndex(0)->GetDescription(s, level);
+            }
+            else
+            {
+                s->Printf ("%zd locations.", num_locations);
+            }
+        }
+        else
+        {
+            s->Printf ("%zd locations.", num_locations);
+        }
+        s->EOL();
+        break;
     case lldb::eDescriptionLevelVerbose:
         // Verbose mode does a debug dump of the breakpoint
         Dump (s);