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/BreakpointLocation.cpp b/source/Breakpoint/BreakpointLocation.cpp
index 96ccce3..202898c 100644
--- a/source/Breakpoint/BreakpointLocation.cpp
+++ b/source/Breakpoint/BreakpointLocation.cpp
@@ -410,13 +410,20 @@
 BreakpointLocation::GetDescription (Stream *s, lldb::DescriptionLevel level)
 {
     SymbolContext sc;
-    s->Indent();
-    BreakpointID::GetCanonicalReference(s, m_owner.GetID(), GetID());
-
+    
+    // If the description level is "initial" then the breakpoint is printing out our initial state,
+    // and we should let it decide how it wants to print our label.
+    if (level != eDescriptionLevelInitial)
+    {
+        s->Indent();
+        BreakpointID::GetCanonicalReference(s, m_owner.GetID(), GetID());
+    }
+    
     if (level == lldb::eDescriptionLevelBrief)
         return;
 
-    s->PutCString(": ");
+    if (level != eDescriptionLevelInitial)
+        s->PutCString(": ");
 
     if (level == lldb::eDescriptionLevelVerbose)
         s->IndentMore();
@@ -425,7 +432,7 @@
     {
         m_address.CalculateSymbolContext(&sc);
 
-        if (level == lldb::eDescriptionLevelFull)
+        if (level == lldb::eDescriptionLevelFull || level == eDescriptionLevelInitial)
         {
             s->PutCString("where = ");
             sc.DumpStopContext (s, m_owner.GetTarget().GetProcessSP().get(), m_address, false, true, false);
@@ -478,7 +485,11 @@
         s->EOL();
         s->Indent();
     }
-    s->Printf ("%saddress = ", (level == lldb::eDescriptionLevelFull && m_address.IsSectionOffset()) ? ", " : "");
+    
+    if (m_address.IsSectionOffset() && (level == eDescriptionLevelFull || level == eDescriptionLevelInitial))
+        s->Printf (", ");
+    s->Printf ("address = ");
+    
     ExecutionContextScope *exe_scope = NULL;
     Target *target = &m_owner.GetTarget();
     if (target)
@@ -486,7 +497,10 @@
     if (exe_scope == NULL)
         exe_scope = target;
 
-    m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
+    if (eDescriptionLevelInitial)
+        m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress, Address::DumpStyleFileAddress);
+    else
+        m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
 
     if (level == lldb::eDescriptionLevelVerbose)
     {
@@ -505,7 +519,7 @@
         }
         s->IndentLess();
     }
-    else
+    else if (level != eDescriptionLevelInitial)
     {
         s->Printf(", %sresolved, hit count = %u ",
                   (IsResolved() ? "" : "un"),