Added function name types to allow us to set breakpoints by name more
intelligently. The four name types we currently have are:
eFunctionNameTypeFull       = (1 << 1), // The function name.
                                        // For C this is the same as just the name of the function
                                        // For C++ this is the demangled version of the mangled name.
                                        // For ObjC this is the full function signature with the + or
                                        // - and the square brackets and the class and selector
eFunctionNameTypeBase       = (1 << 2), // The function name only, no namespaces or arguments and no class 
                                        // methods or selectors will be searched.
eFunctionNameTypeMethod     = (1 << 3), // Find function by method name (C++) with no namespace or arguments
eFunctionNameTypeSelector   = (1 << 4)  // Find function by selector name (ObjC) names
this allows much more flexibility when setting breakoints:
(lldb) breakpoint set --name main --basename
(lldb) breakpoint set --name main --fullname
(lldb) breakpoint set --name main --method
(lldb) breakpoint set --name main --selector
The default:
(lldb) breakpoint set --name main
will inspect the name "main" and look for any parens, or if the name starts
with "-[" or "+[" and if any are found then a full name search will happen.
Else a basename search will be the default.
Fixed some command option structures so not all options are required when they
shouldn't be.
Cleaned up the breakpoint output summary.
Made the "image lookup --address <addr>" output much more verbose so it shows
all the important symbol context results. Added a GetDescription method to 
many of the SymbolContext objects for the more verbose output.
llvm-svn: 107075
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index fb277b2..12dceac 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -349,17 +349,9 @@
 Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_locations)
 {
     assert (s != NULL);
-    StreamString filter_strm;
-
-
-    s->Printf("%i ", GetID());
+    s->Printf("%i: ", GetID());
     GetResolverDescription (s);
-    GetFilterDescription (&filter_strm);
-    if (filter_strm.GetString().compare ("No Filter") != 0)
-    {
-        s->Printf (", ");
-        GetFilterDescription (s);
-    }
+    GetFilterDescription (s);
 
     const uint32_t num_locations = GetNumLocations ();
     const uint32_t num_resolved_locations = GetNumResolvedLocations ();
@@ -370,14 +362,13 @@
     case lldb::eDescriptionLevelFull:
         if (num_locations > 0)
         {
-            s->Printf(" with %u location%s", num_locations, num_locations > 1 ? "s" : "");
+            s->Printf(", locations = %u", num_locations);
             if (num_resolved_locations > 0)
-                s->Printf(" (%u resolved)", num_resolved_locations);
-            s->PutChar(';');
+                s->Printf(", resolved = %u", num_resolved_locations);
         }
         else
         {
-            s->Printf(" with 0 locations (Pending Breakpoint).");
+            s->Printf(", locations = 0 (pending)");
         }
 
         GetOptions()->GetDescription(s, level);
@@ -400,7 +391,6 @@
 
     if (show_locations)
     {
-        s->EOL();
         s->IndentMore();
         for (int i = 0; i < GetNumLocations(); ++i)
         {
@@ -409,7 +399,6 @@
             s->EOL();
         }
         s->IndentLess();
-
     }
 }
 
diff --git a/lldb/source/Breakpoint/BreakpointOptions.cpp b/lldb/source/Breakpoint/BreakpointOptions.cpp
index fae9a7b..aa89c44 100644
--- a/lldb/source/Breakpoint/BreakpointOptions.cpp
+++ b/lldb/source/Breakpoint/BreakpointOptions.cpp
@@ -234,10 +234,7 @@
         if (level != eDescriptionLevelBrief)
             s->EOL();
         m_callback_baton_sp->GetDescription (s, level);
-    }
-    else if (level == eDescriptionLevelBrief)
-        s->PutCString ("commands: no ");
-    
+    }    
 }
 
 void
@@ -247,10 +244,7 @@
 
     if (level == eDescriptionLevelBrief)
     {
-        if (data && data->user_source.GetSize() > 0)
-            s->PutCString("commands: yes ");
-        else
-            s->PutCString("commands: no ");
+        s->Printf (", commands = %s", (data && data->user_source.GetSize() > 0) ? "yes" : "no");
         return;
     }
     
diff --git a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
index 034ef60..3e462d0 100644
--- a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
@@ -100,7 +100,7 @@
 void
 BreakpointResolverAddress::GetDescription (Stream *s)
 {
-    s->PutCString ("Address breakpoint: ");
+    s->PutCString ("address = ");
     m_addr.Dump(s, m_breakpoint->GetTarget().GetProcessSP().get(), Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
 }
 
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
index 86e0596..da015dc 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
@@ -111,7 +111,7 @@
 void
 BreakpointResolverFileLine::GetDescription (Stream *s)
 {
-    s->Printf ("File and line breakpoint - file: \"%s\" line: %u", m_file_spec.GetFilename().AsCString(), m_line_number);
+    s->Printf ("file ='%s', line = %u", m_file_spec.GetFilename().AsCString(), m_line_number);
 }
 
 void
diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp
index b04bb8a..f25910d 100644
--- a/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -25,11 +25,13 @@
 (
     Breakpoint *bkpt,
     const char *func_name,
+    uint32_t func_name_type_mask,
     Breakpoint::MatchType type
 ) :
     BreakpointResolver (bkpt),
     m_func_name (func_name),
-    m_class_name (NULL),
+    m_func_name_type_mask (func_name_type_mask),
+    m_class_name (),
     m_regex (),
     m_match_type (type)
 {
@@ -94,45 +96,47 @@
 {
     SymbolContextList func_list;
     SymbolContextList sym_list;
-
+    
     bool skip_prologue = true;
     uint32_t i;
     bool new_location;
     SymbolContext sc;
     Address break_addr;
     assert (m_breakpoint != NULL);
-
+    
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
-
+    
     if (m_class_name)
     {
         if (log)
             log->Warning ("Class/method function specification not supported yet.\n");
         return Searcher::eCallbackReturnStop;
     }
-
+    
     switch (m_match_type)
     {
-      case Breakpoint::Exact:
-        if (context.module_sp)
-        {
-            context.module_sp->FindSymbolsWithNameAndType (m_func_name, eSymbolTypeCode, sym_list);
-            context.module_sp->FindFunctions (m_func_name, false, func_list);
-        }
-        break;
-      case Breakpoint::Regexp:
-        if (context.module_sp)
-        {
-            context.module_sp->FindSymbolsMatchingRegExAndType (m_regex, eSymbolTypeCode, sym_list);
-            context.module_sp->FindFunctions (m_regex, true, func_list);
-        }
-        break;
-      case Breakpoint::Glob:
-        if (log)
-            log->Warning ("glob is not supported yet.");
-        break;
+        case Breakpoint::Exact:
+            if (context.module_sp)
+            {
+                if (m_func_name_type_mask & (eFunctionNameTypeBase | eFunctionNameTypeFull))
+                    context.module_sp->FindSymbolsWithNameAndType (m_func_name, eSymbolTypeCode, sym_list);
+                context.module_sp->FindFunctions (m_func_name, m_func_name_type_mask, false, func_list);
+            }
+            break;
+        case Breakpoint::Regexp:
+            if (context.module_sp)
+            {
+                if (m_func_name_type_mask & (eFunctionNameTypeBase | eFunctionNameTypeFull))
+                    context.module_sp->FindSymbolsMatchingRegExAndType (m_regex, eSymbolTypeCode, sym_list);
+                context.module_sp->FindFunctions (m_regex, true, func_list);
+            }
+            break;
+        case Breakpoint::Glob:
+            if (log)
+                log->Warning ("glob is not supported yet.");
+            break;
     }
-
+    
     // Remove any duplicates between the funcion list and the symbol list
     if (func_list.GetSize())
     {
@@ -140,7 +144,7 @@
         {
             if (func_list.GetContextAtIndex(i, sc) == false)
                 continue;
-
+            
             if (sc.function == NULL)
                 continue;
             uint32_t j = 0;
@@ -158,11 +162,11 @@
                         }
                     }
                 }
-
+                
                 j++;
             }
         }
-
+        
         for (i = 0; i < func_list.GetSize(); i++)
         {
             if (func_list.GetContextAtIndex(i, sc))
@@ -176,7 +180,7 @@
                         if (prologue_byte_size)
                             break_addr.SetOffset(break_addr.GetOffset() + prologue_byte_size);
                     }
-
+                    
                     if (filter.AddressPasses(break_addr))
                     {
                         BreakpointLocationSP bp_loc_sp (m_breakpoint->AddLocation(break_addr, &new_location));
@@ -194,7 +198,7 @@
             }
         }
     }
-
+    
     for (i = 0; i < sym_list.GetSize(); i++)
     {
         if (sym_list.GetContextAtIndex(i, sc))
@@ -202,14 +206,14 @@
             if (sc.symbol && sc.symbol->GetAddressRangePtr())
             {
                 break_addr = sc.symbol->GetAddressRangePtr()->GetBaseAddress();
-
+                
                 if (skip_prologue)
                 {
                     const uint32_t prologue_byte_size = sc.symbol->GetPrologueByteSize();
                     if (prologue_byte_size)
                         break_addr.SetOffset(break_addr.GetOffset() + prologue_byte_size);
                 }
-
+                
                 if (filter.AddressPasses(break_addr))
                 {
                     BreakpointLocationSP bp_loc_sp (m_breakpoint->AddLocation(break_addr, &new_location));
@@ -236,12 +240,10 @@
 void
 BreakpointResolverName::GetDescription (Stream *s)
 {
-    s->PutCString("Breakpoint by name: ");
-
     if (m_match_type == Breakpoint::Regexp)
-        s->Printf("'%s' (regular expression)", m_regex.GetText());
+        s->Printf("regex = '%s'", m_regex.GetText());
     else
-        s->Printf("'%s'", m_func_name.AsCString());
+        s->Printf("name = '%s'", m_func_name.AsCString());
 }
 
 void