[Lldb-commits] [lldb] r107075 - in /lldb/trunk: include/lldb/ include/lldb/Breakpoint/ include/lldb/Core/ include/lldb/Symbol/ include/lldb/Target/ lldb.xcodeproj/ source/Breakpoint/ source/Commands/ source/Core/ source/Plugins/SymbolFile/DWARF/ source/Plugins/SymbolFile/Symtab/ source/Symbol/ source/Target/ tools/driver/

Greg Clayton gclayton at apple.com
Mon Jun 28 14:30:43 PDT 2010


Author: gclayton
Date: Mon Jun 28 16:30:43 2010
New Revision: 107075

URL: http://llvm.org/viewvc/llvm-project?rev=107075&view=rev
Log:
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.




Modified:
    lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h
    lldb/trunk/include/lldb/Core/Module.h
    lldb/trunk/include/lldb/Core/ModuleList.h
    lldb/trunk/include/lldb/Core/VMRange.h
    lldb/trunk/include/lldb/Symbol/Block.h
    lldb/trunk/include/lldb/Symbol/CompileUnit.h
    lldb/trunk/include/lldb/Symbol/Function.h
    lldb/trunk/include/lldb/Symbol/LineEntry.h
    lldb/trunk/include/lldb/Symbol/Symbol.h
    lldb/trunk/include/lldb/Symbol/SymbolContext.h
    lldb/trunk/include/lldb/Symbol/SymbolFile.h
    lldb/trunk/include/lldb/Symbol/SymbolVendor.h
    lldb/trunk/include/lldb/Symbol/Type.h
    lldb/trunk/include/lldb/Target/Target.h
    lldb/trunk/include/lldb/lldb-enumerations.h
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/source/Breakpoint/Breakpoint.cpp
    lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
    lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp
    lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
    lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.h
    lldb/trunk/source/Commands/CommandObjectCall.cpp
    lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
    lldb/trunk/source/Commands/CommandObjectExpression.cpp
    lldb/trunk/source/Commands/CommandObjectImage.cpp
    lldb/trunk/source/Commands/CommandObjectThread.cpp
    lldb/trunk/source/Core/Address.cpp
    lldb/trunk/source/Core/AddressResolverName.cpp
    lldb/trunk/source/Core/Module.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Core/SearchFilter.cpp
    lldb/trunk/source/Core/VMRange.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
    lldb/trunk/source/Symbol/Block.cpp
    lldb/trunk/source/Symbol/CompileUnit.cpp
    lldb/trunk/source/Symbol/Declaration.cpp
    lldb/trunk/source/Symbol/Function.cpp
    lldb/trunk/source/Symbol/LineEntry.cpp
    lldb/trunk/source/Symbol/LineTable.cpp
    lldb/trunk/source/Symbol/Symbol.cpp
    lldb/trunk/source/Symbol/SymbolContext.cpp
    lldb/trunk/source/Symbol/SymbolVendor.cpp
    lldb/trunk/source/Symbol/Type.cpp
    lldb/trunk/source/Target/Target.cpp
    lldb/trunk/tools/driver/Driver.cpp

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h Mon Jun 28 16:30:43 2010
@@ -30,17 +30,18 @@
 public:
 
     BreakpointResolverName (Breakpoint *bkpt,
-                        const char *func_name,
-                        Breakpoint::MatchType type = Breakpoint::Exact);
+                            const char *name,
+                            uint32_t name_type_mask,
+                            Breakpoint::MatchType type);
 
     // Creates a function breakpoint by regular expression.  Takes over control of the lifespan of func_regex.
     BreakpointResolverName (Breakpoint *bkpt,
-                        RegularExpression &func_regex);
+                            RegularExpression &func_regex);
 
     BreakpointResolverName (Breakpoint *bkpt,
-                        const char *class_name,
-                        const char *method,
-                        Breakpoint::MatchType type);
+                            const char *class_name,
+                            const char *method,
+                            Breakpoint::MatchType type);
 
     virtual
     ~BreakpointResolverName ();
@@ -62,6 +63,7 @@
 
 protected:
     ConstString m_func_name;
+    uint32_t m_func_name_type_mask;  // See FunctionNameType
     ConstString m_class_name;  // FIXME: Not used yet.  The idea would be to stop on methods of this class.
     RegularExpression m_regex;
     Breakpoint::MatchType m_match_type;

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Mon Jun 28 16:30:43 2010
@@ -157,6 +157,12 @@
     /// @param[in] name
     ///     The name of the function we are looking for.
     ///
+    /// @param[in] name_type_mask
+    ///     A bit mask of bits that indicate what kind of names should
+    ///     be used when doing the lookup. Bits include fully qualified
+    ///     names, base names, C++ methods, or ObjC selectors. 
+    ///     See FunctionNameType for more details.
+    ///
     /// @param[in] append
     ///     If \b true, any matches will be appended to \a
     ///     variable_list, else matches replace the contents of
@@ -170,7 +176,7 @@
     ///     The number of matches added to \a sc_list.
     //------------------------------------------------------------------
     uint32_t
-    FindFunctions (const ConstString &name, bool append, SymbolContextList& sc_list);
+    FindFunctions (const ConstString &name, uint32_t name_type_mask, bool append, SymbolContextList& sc_list);
 
     //------------------------------------------------------------------
     /// Find functions by name.

Modified: lldb/trunk/include/lldb/Core/ModuleList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleList.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleList.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleList.h Mon Jun 28 16:30:43 2010
@@ -144,6 +144,12 @@
     /// @param[in] name
     ///     The name of the function we are looking for.
     ///
+    /// @param[in] name_type_mask
+    ///     A bit mask of bits that indicate what kind of names should
+    ///     be used when doing the lookup. Bits include fully qualified
+    ///     names, base names, C++ methods, or ObjC selectors. 
+    ///     See FunctionNameType for more details.
+    ///
     /// @param[out] sc_list
     ///     A symbol context list that gets filled in with all of the
     ///     matches.
@@ -153,6 +159,7 @@
     //------------------------------------------------------------------
     size_t
     FindFunctions (const ConstString &name,
+                   uint32_t name_type_mask,
                    SymbolContextList &sc_list);
 
     //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/Core/VMRange.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/VMRange.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/VMRange.h (original)
+++ lldb/trunk/include/lldb/Core/VMRange.h Mon Jun 28 16:30:43 2010
@@ -112,7 +112,7 @@
     }
 
     void
-    Dump(Stream *s, lldb::addr_t base_addr = 0) const;
+    Dump (Stream *s, lldb::addr_t base_addr = 0, uint32_t addr_width = 8) const;
 
     class ValueInRangeUnaryPredicate
     {

Modified: lldb/trunk/include/lldb/Symbol/Block.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Block.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Block.h (original)
+++ lldb/trunk/include/lldb/Symbol/Block.h Mon Jun 28 16:30:43 2010
@@ -213,6 +213,11 @@
     virtual void
     DumpSymbolContext(Stream *s);
 
+    void
+    GetDescription (Stream *s, 
+                    lldb::DescriptionLevel level, 
+                    Process *process) const;
+    
     //------------------------------------------------------------------
     /// Get the parent block's UID.
     ///
@@ -243,6 +248,37 @@
     lldb::user_id_t
     GetFirstChildUID () const;
 
+
+    //------------------------------------------------------------------
+    /// Get the parent block.
+    ///
+    /// @return
+    ///     The parent block pointer, or NULL if this block has no 
+    ///     parent.
+    //------------------------------------------------------------------
+    Block *
+    GetParent () const;
+
+    //------------------------------------------------------------------
+    /// Get the sibling block.
+    ///
+    /// @return
+    ///     The sibling block pointer, or NULL if this block has no 
+    ///     sibling.
+    //------------------------------------------------------------------
+    Block *
+    GetSibling () const;
+
+    //------------------------------------------------------------------
+    /// Get the first child block.
+    ///
+    /// @return
+    ///     The first child block pointer, or NULL if this block has no 
+    ///     children.
+    //------------------------------------------------------------------
+    Block *
+    GetFirstChild () const;
+
     //------------------------------------------------------------------
     /// Get the variable list for this block and optionally all child
     /// blocks if \a get_child_variables is \b true.

Modified: lldb/trunk/include/lldb/Symbol/CompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompileUnit.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/CompileUnit.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompileUnit.h Mon Jun 28 16:30:43 2010
@@ -135,6 +135,10 @@
     virtual void
     DumpSymbolContext(Stream *s);
 
+
+    void
+    GetDescription(Stream *s, lldb::DescriptionLevel level) const;
+
     //------------------------------------------------------------------
     /// Get a shared pointer to a function in this compile unit by
     /// index.

Modified: lldb/trunk/include/lldb/Symbol/Function.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Function.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Function.h (original)
+++ lldb/trunk/include/lldb/Symbol/Function.h Mon Jun 28 16:30:43 2010
@@ -451,6 +451,9 @@
     const CompileUnit*
     GetCompileUnit() const;
 
+    void
+    GetDescription(Stream *s, lldb::DescriptionLevel level, Process *process);
+
     //------------------------------------------------------------------
     /// Get accessor for the frame base location.
     ///

Modified: lldb/trunk/include/lldb/Symbol/LineEntry.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/LineEntry.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/LineEntry.h (original)
+++ lldb/trunk/include/lldb/Symbol/LineEntry.h Mon Jun 28 16:30:43 2010
@@ -87,8 +87,12 @@
     Dump (Stream *s, Process *process, bool show_file, Address::DumpStyle style, Address::DumpStyle fallback_style, bool show_range) const;
 
     bool
-    GetDescription (Stream *s, lldb::DescriptionLevel level, CompileUnit* cu, Process *process) const;
-
+    GetDescription (Stream *s, 
+                    lldb::DescriptionLevel level, 
+                    CompileUnit* cu, 
+                    Process *process, 
+                    bool show_address_only) const;
+    
     //------------------------------------------------------------------
     /// Dumps information specific to a process that stops at this
     /// line entry to the supplied stream \a s.

Modified: lldb/trunk/include/lldb/Symbol/Symbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symbol.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symbol.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symbol.h Mon Jun 28 16:30:43 2010
@@ -106,6 +106,9 @@
     void
     SetFlags (uint32_t flags) { m_flags = flags; }
 
+    void
+    GetDescription (Stream *s, lldb::DescriptionLevel level, Process *process) const;
+
     Function *
     GetFunction ();
 

Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Mon Jun 28 16:30:43 2010
@@ -184,6 +184,12 @@
     bool
     GetAddressRange (uint32_t scope, AddressRange &range) const;
 
+
+    void
+    GetDescription(Stream *s, 
+                   lldb::DescriptionLevel level, 
+                   Process *process) const;
+    
     //------------------------------------------------------------------
     /// Find a function matching the given name, working out from this
     /// symbol context.

Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolFile.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolFile.h Mon Jun 28 16:30:43 2010
@@ -75,7 +75,7 @@
     virtual uint32_t        ResolveSymbolContext (const FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list) = 0;
     virtual uint32_t        FindGlobalVariables (const ConstString &name, bool append, uint32_t max_matches, VariableList& variables) = 0;
     virtual uint32_t        FindGlobalVariables (const RegularExpression& regex, bool append, uint32_t max_matches, VariableList& variables) = 0;
-    virtual uint32_t        FindFunctions (const ConstString &name, bool append, SymbolContextList& sc_list) = 0;
+    virtual uint32_t        FindFunctions (const ConstString &name, uint32_t name_type_mask, bool append, SymbolContextList& sc_list) = 0;
     virtual uint32_t        FindFunctions (const RegularExpression& regex, bool append, SymbolContextList& sc_list) = 0;
 //  virtual uint32_t        FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, Type::Encoding encoding, lldb::user_id_t udt_uid, TypeList& types) = 0;
 //  virtual uint32_t        FindTypes (const SymbolContext& sc, const RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding encoding, lldb::user_id_t udt_uid, TypeList& types) = 0;

Modified: lldb/trunk/include/lldb/Symbol/SymbolVendor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolVendor.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolVendor.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolVendor.h Mon Jun 28 16:30:43 2010
@@ -110,6 +110,7 @@
 
     virtual uint32_t
     FindFunctions(const ConstString &name,
+                  uint32_t name_type_mask, 
                   bool append,
                   SymbolContextList& sc_list);
 

Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Mon Jun 28 16:30:43 2010
@@ -58,6 +58,10 @@
     void
     DumpTypeName(Stream *s);
 
+
+    void
+    GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_name);
+
     SymbolFile *
     GetSymbolFile()
     {

Modified: lldb/trunk/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Mon Jun 28 16:30:43 2010
@@ -138,6 +138,7 @@
     lldb::BreakpointSP
     CreateBreakpoint (FileSpec *containingModule,
                       const char *func_name,
+                      uint32_t func_name_type_mask, 
                       bool internal = false);
 
     // Use this to create a general breakpoint:

Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Mon Jun 28 16:30:43 2010
@@ -390,6 +390,20 @@
     kNumArchTypes
 } ArchitectureType;
 
+typedef enum FunctionNameType 
+{
+    eFunctionNameTypeNone       = 0,
+    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
+} FunctionNameType;
+
 } // namespace lldb
 
 

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Jun 28 16:30:43 2010
@@ -1621,6 +1621,8 @@
 				26BC7E9310F1B85900F91463 /* StreamString.cpp */,
 				9A35765E116E76A700E8ED2F /* StringList.h */,
 				9A35765F116E76B900E8ED2F /* StringList.cpp */,
+				26B167A41123BF5500DC7B4F /* ThreadSafeValue.h */,
+				263FEDA5112CC1DA00E4C208 /* ThreadSafeSTLMap.h */,
 				26BC7D7E10F1B77400F91463 /* Timer.h */,
 				26BC7E9610F1B85900F91463 /* Timer.cpp */,
 				26BC7D7F10F1B77400F91463 /* TTYState.h */,
@@ -1628,6 +1630,8 @@
 				268A813F115B19D000F645B0 /* UniqueCStringMap.h */,
 				26BC7D8010F1B77400F91463 /* UserID.h */,
 				26BC7E9810F1B85900F91463 /* UserID.cpp */,
+				26C81CA411335651004BDC5A /* UUID.h */,
+				26C81CA511335651004BDC5A /* UUID.cpp */,
 				26BC7D8110F1B77400F91463 /* Value.h */,
 				26BC7E9910F1B85900F91463 /* Value.cpp */,
 				26BC7D8210F1B77400F91463 /* ValueObject.h */,
@@ -1642,10 +1646,6 @@
 				26BC7E9D10F1B85900F91463 /* ValueObjectVariable.cpp */,
 				26BC7D8610F1B77400F91463 /* VMRange.h */,
 				26BC7E9E10F1B85900F91463 /* VMRange.cpp */,
-				26B167A41123BF5500DC7B4F /* ThreadSafeValue.h */,
-				263FEDA5112CC1DA00E4C208 /* ThreadSafeSTLMap.h */,
-				26C81CA411335651004BDC5A /* UUID.h */,
-				26C81CA511335651004BDC5A /* UUID.cpp */,
 			);
 			name = Core;
 			sourceTree = "<group>";

Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Mon Jun 28 16:30:43 2010
@@ -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();
-
     }
 }
 

Modified: lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointOptions.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointOptions.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointOptions.cpp Mon Jun 28 16:30:43 2010
@@ -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;
     }
     

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp Mon Jun 28 16:30:43 2010
@@ -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);
 }
 

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp Mon Jun 28 16:30:43 2010
@@ -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

Modified: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp Mon Jun 28 16:30:43 2010
@@ -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

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Mon Jun 28 16:30:43 2010
@@ -52,6 +52,7 @@
     m_column (0),
     m_ignore_inlines (false),
     m_func_name (),
+    m_func_name_type_mask (0),
     m_func_regexp (),
     m_modules (),
     m_load_addr(),
@@ -70,31 +71,28 @@
 lldb::OptionDefinition
 CommandObjectBreakpointSet::CommandOptions::g_option_table[] =
 {
-    { LLDB_OPT_SET_ALL, false, "shlib",       's', required_argument, NULL, CommandCompletions::eModuleCompletion, "<shlib-name>",
+    { LLDB_OPT_SET_ALL, false, "shlib", 's', required_argument, NULL, CommandCompletions::eModuleCompletion, "<shlib-name>",
         "Set the breakpoint only in this shared library (can use this option multiple times for multiple shlibs)."},
 
-    { LLDB_OPT_SET_ALL, false, "ignore_inlines", 'i', no_argument,   NULL, 0, NULL,
-        "Ignore inlined subroutines when setting the breakppoint." },
-
-    { LLDB_OPT_SET_ALL, false, "ignore_count", 'k', required_argument,   NULL, 0, NULL,
+    { LLDB_OPT_SET_ALL, false, "ignore_count", 'k', required_argument,   NULL, 0, "<n>",
         "Set the number of times this breakpoint is sKipped before stopping." },
 
-    { LLDB_OPT_SET_ALL, false, "thread_index",       'x', required_argument, NULL, NULL, "<thread_index>",
+    { LLDB_OPT_SET_ALL, false, "thread_index", 'x', required_argument, NULL, NULL, "<thread_index>",
         "The breakpoint stops only for the thread whose indeX matches this argument."},
 
-    { LLDB_OPT_SET_ALL, false, "thread_id",       't', required_argument, NULL, NULL, "<thread_id>",
+    { LLDB_OPT_SET_ALL, false, "thread_id", 't', required_argument, NULL, NULL, "<thread_id>",
         "The breakpoint stops only for the thread whose TID matches this argument."},
 
-    { LLDB_OPT_SET_ALL, false, "thread_name",       'T', required_argument, NULL, NULL, "<thread_name>",
+    { LLDB_OPT_SET_ALL, false, "thread_name", 'T', required_argument, NULL, NULL, "<thread_name>",
         "The breakpoint stops only for the thread whose thread name matches this argument."},
 
-    { LLDB_OPT_SET_ALL, false, "queue_name",       'q', required_argument, NULL, NULL, "<queue_name>",
+    { LLDB_OPT_SET_ALL, false, "queue_name", 'q', required_argument, NULL, NULL, "<queue_name>",
         "The breakpoint stops only for threads in the queue whose name is given by this argument."},
 
-    { LLDB_OPT_SET_1, false, "file",       'f', required_argument, NULL, CommandCompletions::eSourceFileCompletion, "<filename>",
+    { LLDB_OPT_SET_1, false, "file", 'f', required_argument, NULL, CommandCompletions::eSourceFileCompletion, "<filename>",
         "Set the breakpoint by source location in this particular file."},
 
-    { LLDB_OPT_SET_1, true, "line",       'l', required_argument, NULL, 0, "<linenum>",
+    { LLDB_OPT_SET_1, true, "line", 'l', required_argument, NULL, 0, "<linenum>",
         "Set the breakpoint by source location at this particular line."},
 
     // Comment out this option for the moment, as we don't actually use it, but will in the future.
@@ -102,12 +100,24 @@
     //    { 0, false, "column",     'c', required_argument, NULL, "<column>",
     //    "Set the breakpoint by source location at this particular column."},
 
-    { LLDB_OPT_SET_2, true, "address",    'a', required_argument, NULL, 0, "<address>",
+    { LLDB_OPT_SET_2, true, "address", 'a', required_argument, NULL, 0, "<address>",
         "Set the breakpoint by address, at the specified address."},
 
-    { LLDB_OPT_SET_3, true, "name",       'n', required_argument, NULL, CommandCompletions::eSymbolCompletion, "<function-name>",
+    { LLDB_OPT_SET_3, true, "name", 'n', required_argument, NULL, CommandCompletions::eSymbolCompletion, "<name>",
         "Set the breakpoint by function name." },
 
+    { LLDB_OPT_SET_3, false, "basename", 'b', no_argument, NULL, 0, NULL,
+        "Used in conjuction with --name <name> to search function basenames." },
+
+    { LLDB_OPT_SET_3, false, "fullname", 'F', no_argument, NULL, 0, NULL,
+        "Used in conjuction with --name <name> to search fully qualified function names. For C++ this means namespaces and all arguemnts, and for Objective C this means a full function prototype with class and selector." },
+
+    { LLDB_OPT_SET_3, false, "selector", 'S', no_argument, NULL, 0, NULL,
+        "Used in conjuction with --name <name> to search objective C selector names." },
+
+    { LLDB_OPT_SET_3, false, "method", 'm', no_argument, NULL, 0, NULL,
+        "Used in conjuction with --name <name> to search objective C selector C++ method names." },
+
     { LLDB_OPT_SET_4, true, "func_regex", 'r', required_argument, NULL, 0, "<regular-expression>",
         "Set the breakpoint by function name, evaluating a regular-expression to find the function name(s)." },
 
@@ -140,21 +150,39 @@
         case 'c':
             m_column = Args::StringToUInt32 (option_arg, 0);
             break;
+
         case 'f':
             m_filename = option_arg;
             break;
-        case 'i':
-            m_ignore_inlines = true;
-            break;
+
         case 'l':
             m_line_num = Args::StringToUInt32 (option_arg, 0);
             break;
+
         case 'n':
             m_func_name = option_arg;
             break;
+
+        case 'b':
+            m_func_name_type_mask |= eFunctionNameTypeBase;
+            break;
+
+        case 'F':
+            m_func_name_type_mask |= eFunctionNameTypeFull;
+            break;
+
+        case 'S':
+            m_func_name_type_mask |= eFunctionNameTypeSelector;
+            break;
+
+        case 'm':
+            m_func_name_type_mask |= eFunctionNameTypeMethod;
+            break;
+
         case 'r':
             m_func_regexp = option_arg;
             break;
+
         case 's':
             {
                 m_modules.push_back (std::string (option_arg));
@@ -204,8 +232,8 @@
     m_filename.clear();
     m_line_num = 0;
     m_column = 0;
-    m_ignore_inlines = false;
     m_func_name.clear();
+    m_func_name_type_mask = 0;
     m_func_regexp.clear();
     m_load_addr = LLDB_INVALID_ADDRESS;
     m_modules.clear();
@@ -357,32 +385,50 @@
         case eSetTypeAddress: // Breakpoint by address
             bp = target->CreateBreakpoint (m_options.m_load_addr, false).get();
             break;
+
         case eSetTypeFunctionName: // Breakpoint by function name
-            if (use_module)
             {
-                for (int i = 0; i < num_modules; ++i)
+                uint32_t name_type_mask = m_options.m_func_name_type_mask;
+                
+                if (name_type_mask == 0)
                 {
-                    module.SetFile(m_options.m_modules[i].c_str());
-                    bp = target->CreateBreakpoint (&module, m_options.m_func_name.c_str()).get();
-                    if (bp)
-                    {
-                        StreamString &output_stream = result.GetOutputStream();
-                        output_stream.Printf ("Breakpoint created: ");
-                        bp->GetDescription(&output_stream, lldb::eDescriptionLevelBrief);
-                        output_stream.EOL();
-                        result.SetStatus (eReturnStatusSuccessFinishResult);
-                    }
+                
+                    if (m_options.m_func_name.find('(') != std::string::npos ||
+                        m_options.m_func_name.find("-[") == 0 ||
+                        m_options.m_func_name.find("+[") == 0)
+                        name_type_mask |= eFunctionNameTypeFull;
                     else
+                        name_type_mask |= eFunctionNameTypeBase;
+                }
+                    
+                
+                if (use_module)
+                {
+                    for (int i = 0; i < num_modules; ++i)
                     {
-                        result.AppendErrorWithFormat("Breakpoint creation failed: No breakpoint created in module '%s'.\n",
-                                                    m_options.m_modules[i].c_str());
-                        result.SetStatus (eReturnStatusFailed);
+                        module.SetFile(m_options.m_modules[i].c_str());
+                        bp = target->CreateBreakpoint (&module, m_options.m_func_name.c_str(), name_type_mask, Breakpoint::Exact).get();
+                        if (bp)
+                        {
+                            StreamString &output_stream = result.GetOutputStream();
+                            output_stream.Printf ("Breakpoint created: ");
+                            bp->GetDescription(&output_stream, lldb::eDescriptionLevelBrief);
+                            output_stream.EOL();
+                            result.SetStatus (eReturnStatusSuccessFinishResult);
+                        }
+                        else
+                        {
+                            result.AppendErrorWithFormat("Breakpoint creation failed: No breakpoint created in module '%s'.\n",
+                                                        m_options.m_modules[i].c_str());
+                            result.SetStatus (eReturnStatusFailed);
+                        }
                     }
                 }
+                else
+                    bp = target->CreateBreakpoint (NULL, m_options.m_func_name.c_str(), name_type_mask, Breakpoint::Exact).get();
             }
-            else
-                bp = target->CreateBreakpoint (NULL, m_options.m_func_name.c_str()).get();
             break;
+
         case eSetTypeFunctionRegexp: // Breakpoint by regular expression function name
             {
                 RegularExpression regexp(m_options.m_func_regexp.c_str());
@@ -412,6 +458,7 @@
                     bp = target->CreateBreakpoint (NULL, regexp).get();
             }
             break;
+
         default:
             break;
     }

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.h (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.h Mon Jun 28 16:30:43 2010
@@ -98,10 +98,11 @@
         // Instance variables to hold the values for command options.
 
         std::string m_filename;
-        unsigned int m_line_num;
-        unsigned int m_column;
+        uint32_t m_line_num;
+        uint32_t m_column;
         bool m_ignore_inlines;
         std::string m_func_name;
+        uint32_t m_func_name_type_mask;
         std::string m_func_regexp;
         lldb::addr_t m_load_addr;
         STLStringArray m_modules;

Modified: lldb/trunk/source/Commands/CommandObjectCall.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCall.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCall.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCall.cpp Mon Jun 28 16:30:43 2010
@@ -295,7 +295,7 @@
 lldb::OptionDefinition
 CommandObjectCall::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_1, true,  "language",   'l', required_argument, NULL, 0, "[c|c++|objc|objc++]",          "Sets the language to use when parsing the expression."},
+{ LLDB_OPT_SET_1, false, "language",   'l', required_argument, NULL, 0, "[c|c++|objc|objc++]",          "Sets the language to use when parsing the expression."},
 { LLDB_OPT_SET_1, false, "format",     'f', required_argument, NULL, 0, "[ [bool|b] | [bin] | [char|c] | [oct|o] | [dec|i|d|u] | [hex|x] | [float|f] | [cstr|s] ]",  "Specify the format that the expression output should use."},
 { LLDB_OPT_SET_1, false, "debug",      'g', no_argument,       NULL, 0, NULL,                           "Enable verbose debug logging of the expression parsing and evaluation."},
 { LLDB_OPT_SET_1, false, "noexecute",  'n', no_argument,       NULL, 0, "no execute",                   "Only JIT and copy the wrapper & arguments, but don't execute."},

Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Mon Jun 28 16:30:43 2010
@@ -389,7 +389,9 @@
     {
         SymbolContextList sc_list;
 
-        if (target->GetImages().FindFunctions(name, sc_list))
+        if (target->GetImages().FindFunctions(name, 
+                                              eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, 
+                                              sc_list))
         {
             Disassemble (interpreter, result, disassembler, sc_list);
         }

Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Mon Jun 28 16:30:43 2010
@@ -456,7 +456,7 @@
 lldb::OptionDefinition
 CommandObjectExpression::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_ALL, true,  "language",   'l', required_argument, NULL, 0, "[c|c++|objc|objc++]",          "Sets the language to use when parsing the expression."},
+{ LLDB_OPT_SET_ALL, false, "language",   'l', required_argument, NULL, 0, "[c|c++|objc|objc++]",          "Sets the language to use when parsing the expression."},
 { LLDB_OPT_SET_ALL, false, "format",     'f', required_argument, NULL, 0, "[ [bool|b] | [bin] | [char|c] | [oct|o] | [dec|i|d|u] | [hex|x] | [float|f] | [cstr|s] ]",  "Specify the format that the expression output should use."},
 { LLDB_OPT_SET_ALL, false, "debug",      'g', no_argument,       NULL, 0, NULL,                           "Enable verbose debug logging of the expression parsing and evaluation."},
 { LLDB_OPT_SET_ALL, false, "use-ir",     'i', no_argument,       NULL, 0, NULL,                           "[Temporary] Instructs the expression evaluator to use IR instead of ASTs."},

Modified: lldb/trunk/source/Commands/CommandObjectImage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectImage.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectImage.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectImage.cpp Mon Jun 28 16:30:43 2010
@@ -227,9 +227,12 @@
             strm.Printf("0x%llx: ", addr);
 
         ExecutionContextScope *exe_scope = interpreter.GetDebugger().GetExecutionContext().GetBestExecutionContextScope();
-        if (so_addr.Dump (&strm, exe_scope, Address::DumpStyleSectionNameOffset))
-            strm.PutCString(": ");
+        strm.IndentMore();
+        strm.Indent ("    Address: ");
+        so_addr.Dump (&strm, exe_scope, Address::DumpStyleSectionNameOffset);
+        strm.EOL();
         so_addr.Dump (&strm, exe_scope, Address::DumpStyleResolvedDescription);
+        strm.IndentLess();
         return true;
     }
 
@@ -347,7 +350,7 @@
             else
             {
                 ConstString function_name(name);
-                num_matches = symbol_vendor->FindFunctions(function_name, true, sc_list);
+                num_matches = symbol_vendor->FindFunctions(function_name, eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, true, sc_list);
             }
 
             if (num_matches)

Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Mon Jun 28 16:30:43 2010
@@ -619,8 +619,8 @@
 lldb::OptionDefinition
 CommandObjectThreadStepWithTypeAndScope::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_1, true, "avoid_no_debug", 'a', required_argument,       NULL, 0, "<avoid_no_debug>",        "Should step-in step over functions with no debug information"},
-{ LLDB_OPT_SET_1, true, "run_mode", 'm', required_argument,       g_tri_running_mode, 0, "<run_mode>",        "Determine how to run other threads while stepping this one"},
+{ LLDB_OPT_SET_1, false, "avoid_no_debug", 'a', required_argument, NULL,               0, "<avoid_no_debug>", "Should step-in step over functions with no debug information"},
+{ LLDB_OPT_SET_1, false, "run_mode",       'm', required_argument, g_tri_running_mode, 0, "<run_mode>",       "Determine how to run other threads while stepping this one"},
 { 0, false, NULL, 0, 0, NULL, 0, NULL, NULL }
 };
 
@@ -1060,9 +1060,9 @@
 lldb::OptionDefinition
 CommandObjectThreadUntil::CommandOptions::g_option_table[] =
 {
-{ LLDB_OPT_SET_1, true, "frame", 'f', required_argument,       NULL, 0, "<frame>",        "Frame index for until operation - defaults to 0"},
-{ LLDB_OPT_SET_1, true, "thread", 't', required_argument,       NULL, 0, "<thread>",      "Thread index for the thread for until operation"},
-{ LLDB_OPT_SET_1, true, "run_mode", 'm', required_argument,       g_duo_running_mode, 0, "<run_mode>",        "Determine how to run other threads while stepping this one"},
+{ LLDB_OPT_SET_1, false, "frame",   'f', required_argument, NULL,               0, "<frame>",   "Frame index for until operation - defaults to 0"},
+{ LLDB_OPT_SET_1, false, "thread",  't', required_argument, NULL,               0, "<thread>",  "Thread index for the thread for until operation"},
+{ LLDB_OPT_SET_1, false, "run_mode",'m', required_argument, g_duo_running_mode, 0, "<run_mode>","Determine how to run other threads while stepping this one"},
 { 0, false, NULL, 0, 0, NULL, 0, NULL, NULL }
 };
 

Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Mon Jun 28 16:30:43 2010
@@ -629,7 +629,10 @@
                         {
                             // We have a function or a symbol from the same
                             // sections as this address.
+                            s->Indent("    Summary: ");
                             sc.DumpStopContext(s, process, *this, false);
+                            s->EOL();
+                            sc.GetDescription(s, eDescriptionLevelBrief, process);
                         }
                         else
                         {

Modified: lldb/trunk/source/Core/AddressResolverName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressResolverName.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressResolverName.cpp (original)
+++ lldb/trunk/source/Core/AddressResolverName.cpp Mon Jun 28 16:30:43 2010
@@ -107,15 +107,24 @@
       case AddressResolver::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);
+            context.module_sp->FindSymbolsWithNameAndType (m_func_name, 
+                                                           eSymbolTypeCode, 
+                                                           sym_list);
+            context.module_sp->FindFunctions (m_func_name, 
+                                              eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
+                                              false, 
+                                              func_list);
         }
         break;
       case AddressResolver::Regexp:
         if (context.module_sp)
         {
-            context.module_sp->FindSymbolsMatchingRegExAndType (m_regex, eSymbolTypeCode, sym_list);
-            context.module_sp->FindFunctions (m_regex, true, func_list);
+            context.module_sp->FindSymbolsMatchingRegExAndType (m_regex, 
+                                                                eSymbolTypeCode, 
+                                                                sym_list);
+            context.module_sp->FindFunctions (m_regex, 
+                                              true, 
+                                              func_list);
         }
         break;
       case AddressResolver::Glob:

Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Mon Jun 28 16:30:43 2010
@@ -286,11 +286,11 @@
 }
 
 uint32_t
-Module::FindFunctions(const ConstString &name, bool append, SymbolContextList& sc_list)
+Module::FindFunctions(const ConstString &name, uint32_t name_type_mask, bool append, SymbolContextList& sc_list)
 {
     SymbolVendor *symbols = GetSymbolVendor ();
     if (symbols)
-        return symbols->FindFunctions(name, append, sc_list);
+        return symbols->FindFunctions(name, name_type_mask, append, sc_list);
     return 0;
 }
 

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Mon Jun 28 16:30:43 2010
@@ -126,14 +126,14 @@
 }
 
 size_t
-ModuleList::FindFunctions (const ConstString &name, SymbolContextList &sc_list)
+ModuleList::FindFunctions (const ConstString &name, uint32_t name_type_mask, SymbolContextList &sc_list)
 {
     sc_list.Clear();
     Mutex::Locker locker(m_modules_mutex);
     collection::const_iterator pos, end = m_modules.end();
     for (pos = m_modules.begin(); pos != end; ++pos)
     {
-        (*pos)->FindFunctions (name, true, sc_list);
+        (*pos)->FindFunctions (name, name_type_mask, true, sc_list);
     }
     return sc_list.GetSize();
 }

Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Mon Jun 28 16:30:43 2010
@@ -113,7 +113,6 @@
 void
 SearchFilter::GetDescription (Stream *s)
 {
-    s->PutCString("No Filter");
 }
 
 void
@@ -415,7 +414,7 @@
 void
 SearchFilterByModule::GetDescription (Stream *s)
 {
-    s->PutCString("In module ");
+    s->PutCString(", module = ");
     if (s->GetVerbose())
     {
         char buffer[2048];

Modified: lldb/trunk/source/Core/VMRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/VMRange.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Core/VMRange.cpp (original)
+++ lldb/trunk/source/Core/VMRange.cpp Mon Jun 28 16:30:43 2010
@@ -42,9 +42,9 @@
 
 
 void
-VMRange::Dump(Stream *s, lldb::addr_t offset) const
+VMRange::Dump(Stream *s, lldb::addr_t offset, uint32_t addr_width) const
 {
-    s->AddressRange(offset + GetBaseAddress(), offset + GetEndAddress(), sizeof (addr_t));
+    s->AddressRange(offset + GetBaseAddress(), offset + GetEndAddress(), addr_width);
 }
 
 bool

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Mon Jun 28 16:30:43 2010
@@ -14,6 +14,7 @@
 
 #include "DWARFDebugAbbrev.h"
 #include "DWARFDebugAranges.h"
+#include "DWARFDebugInfo.h"
 #include "DWARFDIECollection.h"
 #include "DWARFFormValue.h"
 #include "LogChannelDWARF.h"
@@ -549,13 +550,14 @@
 void
 DWARFCompileUnit::Index 
 (
-    lldb_private::UniqueCStringMap<dw_offset_t>& name_to_function_die,
-    lldb_private::UniqueCStringMap<dw_offset_t>& name_to_inlined_die,
-    lldb_private::UniqueCStringMap<dw_offset_t>& name_to_global_die,
-    lldb_private::UniqueCStringMap<dw_offset_t>& name_to_type_die
+    lldb_private::UniqueCStringMap<dw_offset_t>& base_name_to_function_die,
+    lldb_private::UniqueCStringMap<dw_offset_t>& full_name_to_function_die,
+    lldb_private::UniqueCStringMap<dw_offset_t>& method_name_to_function_die,
+    lldb_private::UniqueCStringMap<dw_offset_t>& selector_name_to_function_die,
+    lldb_private::UniqueCStringMap<dw_offset_t>& name_to_type_die,
+    lldb_private::UniqueCStringMap<dw_offset_t>& name_to_global_die
 )
 {
-
     const DataExtractor* debug_str = &m_dwarf2Data->get_debug_str_data();
 
     DWARFDebugInfoEntry::const_iterator pos;
@@ -597,6 +599,7 @@
         bool has_address = false;
         bool has_location = false;
         bool is_global_or_static_variable = false;
+        dw_offset_t specification_die_offset = DW_INVALID_OFFSET;
         const size_t num_attributes = die.GetAttributes(m_dwarf2Data, this, attributes);
         if (num_attributes > 0)
         {
@@ -685,6 +688,11 @@
                         }
                     }
                     break;
+                    
+                case DW_AT_specification:
+                    if (attributes.ExtractFormValueAtIndex(m_dwarf2Data, i, form_value))
+                        specification_die_offset = form_value.Reference(this);
+                    break;
                 }
             }
         }
@@ -694,7 +702,7 @@
         case DW_TAG_subprogram:
             if (has_address)
             {
-                if (name && name[0])
+                if (name)
                 {
                     if ((name[0] == '-' || name[0] == '+') && name[1] == '[')
                     {
@@ -716,24 +724,58 @@
                                 // accelerator tables
                                 size_t method_name_len = name_len - (method_name - name) - 1;
                                 ConstString method_const_str (method_name, method_name_len);
-                                name_to_function_die.Append(method_const_str.AsCString(), die.GetOffset());
+                                selector_name_to_function_die.Append(method_const_str.AsCString(), die.GetOffset());
+                            }
+                        }
+                    }
+                    // If we have a mangled name, then the DW_AT_name attribute
+                    // is usually the method name without the class or any parameters
+                    const DWARFDebugInfoEntry *parent = die.GetParent();
+                    bool is_method = false;
+                    if (parent)
+                    {
+                        dw_tag_t tag = parent->Tag();
+                        if (tag == DW_TAG_class_type || tag == DW_TAG_structure_type)
+                        {
+                            is_method = true;
+                        }
+                        else
+                        {
+                            if (mangled && specification_die_offset != DW_INVALID_OFFSET)
+                            {
+                                const DWARFDebugInfoEntry *specification_die = m_dwarf2Data->DebugInfo()->GetDIEPtr (specification_die_offset, NULL);
+                                if (specification_die)
+                                {
+                                    parent = specification_die->GetParent();
+                                    if (parent)
+                                    {
+                                        tag = parent->Tag();
+                                    
+                                        if (tag == DW_TAG_class_type || tag == DW_TAG_structure_type)
+                                            is_method = true;
+                                    }
+                                }
                             }
                         }
                     }
-                    name_to_function_die.Append(ConstString(name).AsCString(), die.GetOffset());
+
+                    if (is_method)
+                        method_name_to_function_die.Append(ConstString(name).AsCString(), die.GetOffset());
+                    else
+                        base_name_to_function_die.Append(ConstString(name).AsCString(), die.GetOffset());
                 }
-                if (mangled && mangled[0])
-                    name_to_function_die.Append(ConstString(mangled).AsCString(), die.GetOffset());
+                if (mangled)
+                    full_name_to_function_die.Append(ConstString(mangled).AsCString(), die.GetOffset());
             }
             break;
 
         case DW_TAG_inlined_subroutine:
             if (has_address)
             {
-                if (name && name[0])
-                    name_to_inlined_die.Append(ConstString(name).AsCString(), die.GetOffset());
-                if (mangled && mangled[0])
-                    name_to_inlined_die.Append(ConstString(mangled).AsCString(), die.GetOffset());
+                if (name)
+                    base_name_to_function_die.Append(ConstString(name).AsCString(), die.GetOffset());
+                if (mangled)
+                    full_name_to_function_die.Append(ConstString(mangled).AsCString(), die.GetOffset());
             }
             break;
         

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h Mon Jun 28 16:30:43 2010
@@ -142,10 +142,13 @@
     }
 
     void
-    Index (lldb_private::UniqueCStringMap<dw_offset_t>& name_to_function_die,
-           lldb_private::UniqueCStringMap<dw_offset_t>& name_to_inlined_die,
-           lldb_private::UniqueCStringMap<dw_offset_t>& name_to_global_die,
-           lldb_private::UniqueCStringMap<dw_offset_t>& name_to_type_die);
+    Index (lldb_private::UniqueCStringMap<dw_offset_t>& base_name_to_function_die,
+           lldb_private::UniqueCStringMap<dw_offset_t>& full_name_to_function_die,
+           lldb_private::UniqueCStringMap<dw_offset_t>& method_name_to_function_die,
+           lldb_private::UniqueCStringMap<dw_offset_t>& selector_name_to_function_die,
+           lldb_private::UniqueCStringMap<dw_offset_t>& name_to_type_die,
+           lldb_private::UniqueCStringMap<dw_offset_t>& name_to_global_die);
+
 
 protected:
     SymbolFileDWARF*    m_dwarf2Data;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Jun 28 16:30:43 2010
@@ -229,8 +229,10 @@
     m_aranges(),
     m_info(),
     m_line(),
-    m_name_to_function_die(),
-    m_name_to_inlined_die(),
+    m_base_name_to_function_die(),
+    m_full_name_to_function_die(),
+    m_method_name_to_function_die(),
+    m_selector_name_to_function_die(),
     m_name_to_global_die(),
     m_name_to_type_die(),
     m_indexed(false),
@@ -1778,8 +1780,10 @@
 
             bool clear_dies = cu->ExtractDIEsIfNeeded (false) > 1;
 
-            cu->Index (m_name_to_function_die,
-                       m_name_to_inlined_die,
+            cu->Index (m_base_name_to_function_die,
+                       m_full_name_to_function_die,
+                       m_method_name_to_function_die,
+                       m_selector_name_to_function_die,
                        m_name_to_global_die, 
                        m_name_to_type_die);  
             
@@ -1789,8 +1793,10 @@
                 cu->ClearDIEs (true);
         }
         
-        m_name_to_function_die.Sort();
-        m_name_to_inlined_die.Sort();
+        m_base_name_to_function_die.Sort();
+        m_full_name_to_function_die.Sort();
+        m_method_name_to_function_die.Sort();
+        m_selector_name_to_function_die.Sort();
         m_name_to_global_die.Sort(); 
         m_name_to_type_die.Sort();
     }
@@ -1893,33 +1899,20 @@
 }
 
 
-uint32_t
-SymbolFileDWARF::FindFunctions(const ConstString &name, bool append, SymbolContextList& sc_list)
+void
+SymbolFileDWARF::FindFunctions
+(
+    const ConstString &name, 
+    UniqueCStringMap<dw_offset_t> &name_to_die,
+    SymbolContextList& sc_list
+)
 {
-    Timer scoped_timer (__PRETTY_FUNCTION__,
-                        "SymbolFileDWARF::FindFunctions (name = '%s')",
-                        name.AsCString());
-
-    std::vector<dw_offset_t> die_offsets;
-
-    // If we aren't appending the results to this list, then clear the list
-    if (!append)
-        sc_list.Clear();
-
-    // Remember how many sc_list are in the list before we search in case
-    // we are appending the results to a variable list.
-    uint32_t original_size = sc_list.GetSize();
-
-    // Index the DWARF if we haven't already
-    if (!m_indexed)
-        Index ();
-
     const UniqueCStringMap<dw_offset_t>::Entry *entry;
     
     SymbolContext sc;
-    for (entry = m_name_to_function_die.FindFirstValueForName (name.AsCString());
+    for (entry = name_to_die.FindFirstValueForName (name.AsCString());
          entry != NULL;
-         entry = m_name_to_function_die.FindNextValueForName (name.AsCString(), entry))
+         entry = name_to_die.FindNextValueForName (name.AsCString(), entry))
     {
         DWARFCompileUnitSP cu_sp;
         const DWARFDebugInfoEntry* die = DebugInfo()->GetDIEPtr (entry->value, &cu_sp);
@@ -1943,6 +1936,47 @@
         }
     }
 
+}
+
+uint32_t
+SymbolFileDWARF::FindFunctions
+(
+    const ConstString &name, 
+    uint32_t name_type_mask, 
+    bool append, 
+    SymbolContextList& sc_list
+)
+{
+    Timer scoped_timer (__PRETTY_FUNCTION__,
+                        "SymbolFileDWARF::FindFunctions (name = '%s')",
+                        name.AsCString());
+
+    std::vector<dw_offset_t> die_offsets;
+
+    // If we aren't appending the results to this list, then clear the list
+    if (!append)
+        sc_list.Clear();
+
+    // Remember how many sc_list are in the list before we search in case
+    // we are appending the results to a variable list.
+    uint32_t original_size = sc_list.GetSize();
+
+    // Index the DWARF if we haven't already
+    if (!m_indexed)
+        Index ();
+
+    if (name_type_mask & eFunctionNameTypeBase)
+        FindFunctions (name, m_base_name_to_function_die, sc_list);
+
+    if (name_type_mask & eFunctionNameTypeFull)
+        FindFunctions (name, m_full_name_to_function_die, sc_list);
+
+    if (name_type_mask & eFunctionNameTypeMethod)
+        FindFunctions (name, m_method_name_to_function_die, sc_list);
+
+    if (name_type_mask & eFunctionNameTypeSelector)
+        FindFunctions (name, m_selector_name_to_function_die, sc_list);
+
     // Return the number of variable that were appended to the list
     return sc_list.GetSize() - original_size;
 }
@@ -1971,14 +2005,14 @@
 
     // Create the pubnames information so we can quickly lookup external symbols by name
     // Create the pubnames information so we can quickly lookup external symbols by name
-    const size_t num_entries = m_name_to_function_die.GetSize();
+    const size_t num_entries = m_full_name_to_function_die.GetSize();
     SymbolContext sc;
     for (size_t i=0; i<num_entries; i++)
     {
-        if (!regex.Execute(m_name_to_function_die.GetCStringAtIndex (i)))
+        if (!regex.Execute(m_full_name_to_function_die.GetCStringAtIndex (i)))
             continue;
 
-        const dw_offset_t die_offset = *m_name_to_function_die.GetValueAtIndex (i);
+        const dw_offset_t die_offset = *m_full_name_to_function_die.GetValueAtIndex (i);
 
         DWARFCompileUnitSP cu_sp;
         const DWARFDebugInfoEntry* die = DebugInfo()->GetDIEPtr (die_offset, &cu_sp);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Mon Jun 28 16:30:43 2010
@@ -97,7 +97,7 @@
     virtual uint32_t        ResolveSymbolContext (const lldb_private::FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, lldb_private::SymbolContextList& sc_list);
     virtual uint32_t        FindGlobalVariables(const lldb_private::ConstString &name, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
     virtual uint32_t        FindGlobalVariables(const lldb_private::RegularExpression& regex, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
-    virtual uint32_t        FindFunctions(const lldb_private::ConstString &name, bool append, lldb_private::SymbolContextList& sc_list);
+    virtual uint32_t        FindFunctions(const lldb_private::ConstString &name, uint32_t name_type_mask, bool append, lldb_private::SymbolContextList& sc_list);
     virtual uint32_t        FindFunctions(const lldb_private::RegularExpression& regex, bool append, lldb_private::SymbolContextList& sc_list);
 //  virtual uint32_t        FindTypes(const lldb_private::SymbolContext& sc, const lldb_private::ConstString &name, bool append, uint32_t max_matches, lldb::Type::Encoding encoding, lldb::user_id_t udt_uid, lldb_private::TypeList& types);
 //  virtual uint32_t        FindTypes(const lldb_private::SymbolContext& sc, const lldb_private::RegularExpression& regex, bool append, uint32_t max_matches, lldb::Type::Encoding encoding, lldb::user_id_t udt_uid, lldb_private::TypeList& types);
@@ -277,6 +277,11 @@
                                 uint32_t& byte_stride,
                                 uint32_t& bit_stride);
 
+    void                    FindFunctions(
+                                const lldb_private::ConstString &name, 
+                                lldb_private::UniqueCStringMap<dw_offset_t> &name_to_die,
+                                lldb_private::SymbolContextList& sc_list);
+
     lldb_private::Type*     GetUniquedTypeForDIEOffset(dw_offset_t type_die_offset, lldb::TypeSP& owning_type_sp, int32_t child_type, uint32_t idx, bool safe);
     lldb::TypeSP            GetTypeForDIE(DWARFCompileUnit *cu, const DWARFDebugInfoEntry* die, lldb::TypeSP& owning_type_sp, int32_t child_type, uint32_t idx);
 //  uint32_t                FindTypes(std::vector<dw_offset_t> die_offsets, uint32_t max_matches, Type::Encoding encoding, lldb::user_id_t udt_uid, TypeList& types);
@@ -303,8 +308,10 @@
     std::auto_ptr<DWARFDebugAranges>    m_aranges;
     std::auto_ptr<DWARFDebugInfo>       m_info;
     std::auto_ptr<DWARFDebugLine>       m_line;
-    lldb_private::UniqueCStringMap<dw_offset_t> m_name_to_function_die; // All concrete functions
-    lldb_private::UniqueCStringMap<dw_offset_t> m_name_to_inlined_die;  // All inlined functions
+    lldb_private::UniqueCStringMap<dw_offset_t> m_base_name_to_function_die; // All concrete functions
+    lldb_private::UniqueCStringMap<dw_offset_t> m_full_name_to_function_die; // All concrete functions
+    lldb_private::UniqueCStringMap<dw_offset_t> m_method_name_to_function_die;  // All inlined functions
+    lldb_private::UniqueCStringMap<dw_offset_t> m_selector_name_to_function_die;   // All method names for functions of classes
     lldb_private::UniqueCStringMap<dw_offset_t> m_name_to_global_die;   // Global and static variables
     lldb_private::UniqueCStringMap<dw_offset_t> m_name_to_type_die;     // All type DIE offsets
     bool m_indexed;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Mon Jun 28 16:30:43 2010
@@ -763,7 +763,7 @@
 }
 
 uint32_t
-SymbolFileDWARFDebugMap::FindFunctions(const ConstString &name, bool append, SymbolContextList& sc_list)
+SymbolFileDWARFDebugMap::FindFunctions(const ConstString &name, uint32_t name_type_mask, bool append, SymbolContextList& sc_list)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
                         "SymbolFileDWARFDebugMap::FindFunctions (name = %s)",
@@ -788,7 +788,7 @@
             {
                 SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex (oso_idx);
                 if (oso_dwarf)
-                    oso_dwarf->FindFunctions(name, true, sc_list);
+                    oso_dwarf->FindFunctions(name, name_type_mask, true, sc_list);
             }
         }
 //      Stream s(stdout);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h Mon Jun 28 16:30:43 2010
@@ -64,7 +64,7 @@
     virtual uint32_t        ResolveSymbolContext (const lldb_private::FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, lldb_private::SymbolContextList& sc_list);
     virtual uint32_t        FindGlobalVariables (const lldb_private::ConstString &name, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
     virtual uint32_t        FindGlobalVariables (const lldb_private::RegularExpression& regex, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
-    virtual uint32_t        FindFunctions (const lldb_private::ConstString &name, bool append, lldb_private::SymbolContextList& sc_list);
+    virtual uint32_t        FindFunctions (const lldb_private::ConstString &name, uint32_t name_type_mask, bool append, lldb_private::SymbolContextList& sc_list);
     virtual uint32_t        FindFunctions (const lldb_private::RegularExpression& regex, bool append, lldb_private::SymbolContextList& sc_list);
 //  virtual uint32_t        FindTypes (const lldb_private::SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, Type::Encoding encoding, lldb::user_id_t udt_uid, TypeList& types);
 //  virtual uint32_t        FindTypes (const lldb_private::SymbolContext& sc, const RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding encoding, lldb::user_id_t udt_uid, TypeList& types);

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp Mon Jun 28 16:30:43 2010
@@ -308,7 +308,7 @@
 }
 
 uint32_t
-SymbolFileSymtab::FindFunctions(const ConstString &name, bool append, SymbolContextList& sc_list)
+SymbolFileSymtab::FindFunctions(const ConstString &name, uint32_t name_type_mask, bool append, SymbolContextList& sc_list)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
                         "SymbolFileSymtab::FindFunctions (name = '%s')",

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h Mon Jun 28 16:30:43 2010
@@ -87,7 +87,7 @@
     FindGlobalVariables(const lldb_private::RegularExpression& regex, bool append, uint32_t max_matches, lldb_private::VariableList& variables);
 
     virtual uint32_t
-    FindFunctions(const lldb_private::ConstString &name, bool append, lldb_private::SymbolContextList& sc_list);
+    FindFunctions(const lldb_private::ConstString &name, uint32_t name_type_mask, bool append, lldb_private::SymbolContextList& sc_list);
 
     virtual uint32_t
     FindFunctions(const lldb_private::RegularExpression& regex, bool append, lldb_private::SymbolContextList& sc_list);

Modified: lldb/trunk/source/Symbol/Block.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Block.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Block.cpp (original)
+++ lldb/trunk/source/Symbol/Block.cpp Mon Jun 28 16:30:43 2010
@@ -57,6 +57,30 @@
 }
 
 void
+Block::GetDescription(Stream *s, lldb::DescriptionLevel level, Process *process) const
+{
+    size_t num_ranges = m_ranges.size();
+    if (num_ranges)
+    {
+        
+        addr_t base_addr = LLDB_INVALID_ADDRESS;
+        if (process)
+            base_addr = m_block_list->GetAddressRange().GetBaseAddress().GetLoadAddress(process);
+        if (base_addr == LLDB_INVALID_ADDRESS)
+            base_addr = m_block_list->GetAddressRange().GetBaseAddress().GetFileAddress();
+
+        s->Printf("range%s = ", num_ranges > 1 ? "s" : "");
+        std::vector<VMRange>::const_iterator pos, end = m_ranges.end();
+        for (pos = m_ranges.begin(); pos != end; ++pos)
+            pos->Dump(s, base_addr, 4);
+    }
+    *s << ", id = " << ((const UserID&)*this);
+
+    if (m_inlineInfoSP.get() != NULL)
+        m_inlineInfoSP->Dump(s);
+}
+
+void
 Block::Dump(Stream *s, addr_t base_addr, int32_t depth, bool show_context) const
 {
     if (depth < 0)
@@ -69,12 +93,10 @@
     s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
     s->Indent();
     *s << "Block" << ((const UserID&)*this);
-    user_id_t parentID = GetParentUID();
-    const Block* parent_block = NULL;
-    if (parentID != Block::InvalidID)
+    const Block* parent_block = GetParent();
+    if (parent_block)
     {
-        parent_block = m_block_list->GetBlockByID(parentID);
-        s->Printf(", parent = {0x%8.8x}", parentID);
+        s->Printf(", parent = {0x%8.8x}", parent_block->GetID());
     }
     if (m_inlineInfoSP.get() != NULL)
         m_inlineInfoSP->Dump(s);
@@ -128,10 +150,7 @@
 void
 Block::DumpStopContext (Stream *s, const SymbolContext *sc)
 {
-    user_id_t parentID = GetParentUID();
-    Block* parent_block = NULL;
-    if (parentID != Block::InvalidID)
-        parent_block = m_block_list->GetBlockByID(parentID);
+    Block* parent_block = GetParent();
 
     InlineFunctionInfo* inline_info = InlinedFunctionInfo ();
     if (inline_info)
@@ -256,6 +275,24 @@
 
 }
 
+Block *
+Block::GetParent () const
+{
+    return m_block_list->GetBlockByID (m_block_list->GetParent(GetID()));
+}
+
+Block *
+Block::GetSibling () const
+{
+    return m_block_list->GetBlockByID (m_block_list->GetSibling(GetID()));
+}
+
+Block *
+Block::GetFirstChild () const
+{
+    return m_block_list->GetBlockByID (m_block_list->GetFirstChild(GetID()));
+}
+
 user_id_t
 Block::GetParentUID() const
 {
@@ -455,7 +492,7 @@
 const Block *
 BlockList::GetBlockByID(user_id_t blockID) const
 {
-    if (m_blocks.empty())
+    if (m_blocks.empty() || blockID == Block::InvalidID)
         return NULL;
 
     if (blockID == Block::RootID)
@@ -471,7 +508,7 @@
 Block *
 BlockList::GetBlockByID(user_id_t blockID)
 {
-    if (m_blocks.empty())
+    if (m_blocks.empty() || blockID == Block::InvalidID)
         return NULL;
 
     if (blockID == Block::RootID)
@@ -584,16 +621,13 @@
 
         if (get_child_variables)
         {
-            user_id_t block_id = GetFirstChildUID();
-            while (block_id != Block::InvalidID)
+            Block *child_block = GetFirstChild();
+            while (child_block)
             {
-                Block *child_block = m_block_list->GetBlockByID(block_id);
-                assert(child_block);
                 VariableListSP child_block_variable_list(child_block->GetVariableList(get_child_variables, can_create));
                 if (child_block_variable_list.get())
                     variable_list_sp->AddVariables(child_block_variable_list.get());
-
-                block_id = child_block->GetSiblingUID();
+                child_block = child_block->GetSibling();
             }
         }
     }
@@ -615,13 +649,9 @@
 
     if (get_parent_variables)
     {
-        user_id_t parentID = GetParentUID();
-        if (parentID != Block::InvalidID)
-        {
-            Block* parent_block = m_block_list->GetBlockByID(parentID);
-            if (parent_block)
-                num_variables_added += parent_block->AppendVariables (can_create, get_parent_variables, variable_list);
-        }
+        Block* parent_block = GetParent();
+        if (parent_block)
+            num_variables_added += parent_block->AppendVariables (can_create, get_parent_variables, variable_list);
     }
     return num_variables_added;
 }

Modified: lldb/trunk/source/Symbol/CompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompileUnit.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompileUnit.cpp (original)
+++ lldb/trunk/source/Symbol/CompileUnit.cpp Mon Jun 28 16:30:43 2010
@@ -65,6 +65,13 @@
 }
 
 
+void
+CompileUnit::GetDescription(Stream *s, lldb::DescriptionLevel level) const
+{
+    *s << '"' << (const FileSpec&)*this << "\", id = " << (const UserID&)*this
+        << ", language = " << (const Language&)*this;
+}
+
 
 //----------------------------------------------------------------------
 // Dump the current contents of this object. No functions that cause on

Modified: lldb/trunk/source/Symbol/Declaration.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Declaration.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Declaration.cpp (original)
+++ lldb/trunk/source/Symbol/Declaration.cpp Mon Jun 28 16:30:43 2010
@@ -61,12 +61,11 @@
 {
     if (m_file)
     {
-        *s << ", decl = '" << m_file;
+        *s << ", decl = " << m_file;
         if (m_line > 0)
             s->Printf(":%u", m_line);
         if (m_column > 0)
             s->Printf(":%u", m_column);
-        s->PutChar('\'');
     }
     else
     {

Modified: lldb/trunk/source/Symbol/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Function.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Function.cpp (original)
+++ lldb/trunk/source/Symbol/Function.cpp Mon Jun 28 16:30:43 2010
@@ -261,6 +261,16 @@
     return m_comp_unit;
 }
 
+
+void
+Function::GetDescription(Stream *s, lldb::DescriptionLevel level, Process *process)
+{
+    Type* func_type = GetType();
+    *s << '"' << func_type->GetName() << "\", id = " << (const UserID&)*this;
+    *s << ", range = ";
+    GetAddressRange().Dump(s, process, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
+}
+
 void
 Function::Dump(Stream *s, bool show_context) const
 {

Modified: lldb/trunk/source/Symbol/LineEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/LineEntry.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/LineEntry.cpp (original)
+++ lldb/trunk/source/Symbol/LineEntry.cpp Mon Jun 28 16:30:43 2010
@@ -118,14 +118,12 @@
                                          fallback_style))
             return false;
     }
+    if (show_file)
+        *s << ", file = " << file;
     if (line)
         s->Printf(", line = %u", line);
     if (column)
         s->Printf(", column = %u", column);
-    if (show_file)
-    {
-        *s << ", file = " << file;
-    }
     if (is_start_of_statement)
         *s << ", is_start_of_statement = TRUE";
 
@@ -144,13 +142,22 @@
 }
 
 bool
-LineEntry::GetDescription (Stream *s, lldb::DescriptionLevel level, CompileUnit* cu, Process *process) const
+LineEntry::GetDescription (Stream *s, lldb::DescriptionLevel level, CompileUnit* cu, Process *process, bool show_address_only) const
 {
 
     if (level == lldb::eDescriptionLevelBrief || level == lldb::eDescriptionLevelFull)
     {
         // Show address only
-        range.GetBaseAddress().Dump(s, process, Address::DumpStyleLoadAddress, Address::DumpStyleFileAddress);
+        if (show_address_only)
+        {
+            s->PutCString ("address = ");
+            range.GetBaseAddress().Dump(s, process, Address::DumpStyleLoadAddress, Address::DumpStyleFileAddress);
+        }
+        else
+        {
+            s->PutCString ("range = ");
+            range.Dump(s, process, Address::DumpStyleLoadAddress, Address::DumpStyleFileAddress);
+        }
 
         if (file)
             *s << ' ' << file;

Modified: lldb/trunk/source/Symbol/LineTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/LineTable.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/LineTable.cpp (original)
+++ lldb/trunk/source/Symbol/LineTable.cpp Mon Jun 28 16:30:43 2010
@@ -324,7 +324,7 @@
     for (size_t idx = 0; idx < count; ++idx)
     {
         ConvertEntryAtIndexToLineEntry (idx, line_entry);
-        line_entry.GetDescription (s, level, m_comp_unit, process);
+        line_entry.GetDescription (s, level, m_comp_unit, process, true);
         s->EOL();
     }
 }

Modified: lldb/trunk/source/Symbol/Symbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symbol.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symbol.cpp (original)
+++ lldb/trunk/source/Symbol/Symbol.cpp Mon Jun 28 16:30:43 2010
@@ -168,6 +168,26 @@
 }
 
 void
+Symbol::GetDescription (Stream *s, lldb::DescriptionLevel level, Process *process) const
+{
+    *s << '"' << m_mangled.GetName() << "\", id = " << (const UserID&)*this;
+    const Section *section = m_addr_range.GetBaseAddress().GetSection();
+    if (section != NULL)
+    {
+        if (m_addr_range.GetByteSize() > 0)
+        {
+            s->PutCString(", range = ");
+            m_addr_range.Dump(s, process, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
+        }
+        else
+        {
+            s->PutCString(", address = ");
+            m_addr_range.GetBaseAddress().Dump(s, process, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
+        }
+    }
+}
+
+void
 Symbol::Dump(Stream *s, Process *process, uint32_t index) const
 {
 //  s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Mon Jun 28 16:30:43 2010
@@ -8,12 +8,13 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/CompileUnit.h"
+
 #include "lldb/Core/Module.h"
+#include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/Symbol.h"
-#include "lldb/Target/Target.h"
 #include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Target/Target.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -169,6 +170,81 @@
 }
 
 void
+SymbolContext::GetDescription(Stream *s, lldb::DescriptionLevel level, Process *process) const
+{
+    if (module_sp)
+    {
+        s->Indent("     Module: \"");
+        module_sp->GetFileSpec().Dump(s);
+        s->PutChar('"');
+        s->EOL();
+    }
+
+    if (comp_unit != NULL)
+    {
+        s->Indent("CompileUnit: ");
+        comp_unit->GetDescription (s, level);
+        s->EOL();
+    }
+
+    if (function != NULL)
+    {
+        s->Indent("   Function: ");
+        function->GetDescription (s, level, process);
+        s->EOL();
+
+        Type *func_type = function->GetType();
+        if (func_type)
+        {
+            s->Indent("   FuncType: ");
+            func_type->GetDescription (s, level, false);
+            s->EOL();
+        }
+    }
+
+    if (block != NULL)
+    {
+        std::vector<Block *> blocks;
+        blocks.push_back (block);
+        Block *parent_block = block->GetParent();
+        
+        while (parent_block)
+        {
+            blocks.push_back (parent_block);
+            parent_block = parent_block->GetParent();
+        }
+        std::vector<Block *>::reverse_iterator pos;        
+        std::vector<Block *>::reverse_iterator begin = blocks.rbegin();
+        std::vector<Block *>::reverse_iterator end = blocks.rend();
+        for (pos = begin; pos != end; ++pos)
+        {
+            if (pos == begin)
+                s->Indent("     Blocks: ");
+            else
+                s->Indent("             ");
+            (*pos)->GetDescription(s, level, process);
+            s->EOL();
+        }
+    }
+
+    if (line_entry.IsValid())
+    {
+        s->Indent("  LineEntry: ");
+        line_entry.GetDescription (s, level, comp_unit, process, false);
+        s->EOL();
+    }
+
+    if (symbol != NULL)
+    {
+        s->Indent("     Symbol: ");
+        symbol->GetDescription(s, level, process);
+        s->EOL();
+    }
+}
+
+
+
+void
 SymbolContext::Dump(Stream *s, Process *process) const
 {
     *s << (void *)this << ": ";
@@ -178,48 +254,45 @@
     s->EOL();
     s->IndentMore();
     s->Indent();
-    *s << "Module    = " << (void *)module_sp.get() << ' ';
+    *s << "Module       = " << (void *)module_sp.get() << ' ';
     if (module_sp)
         module_sp->GetFileSpec().Dump(s);
     s->EOL();
     s->Indent();
     *s << "CompileUnit  = " << (void *)comp_unit;
     if (comp_unit != NULL)
-        *s << " {" << comp_unit->GetID() << "} " << *(dynamic_cast<FileSpec*> (comp_unit));
+        *s << " {0x" << comp_unit->GetID() << "} " << *(dynamic_cast<FileSpec*> (comp_unit));
     s->EOL();
     s->Indent();
-    *s << "Function  = " << (void *)function;
+    *s << "Function     = " << (void *)function;
     if (function != NULL)
     {
-        *s << " {" << function->GetID() << "} ";/// << function->GetType()->GetName();
-//      Type* func_type = function->Type();
-//      if (func_type)
-//      {
-//          s->EOL();
-//          const UserDefType* func_udt = func_type->GetUserDefinedType().get();
-//          if (func_udt)
-//          {
-//              s->IndentMore();
-//              func_udt->Dump(s, func_type);
-//              s->IndentLess();
-//          }
-//      }
+        *s << " {0x" << function->GetID() << "} " << function->GetType()->GetName() << ", address-range = ";
+        function->GetAddressRange().Dump(s, process, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
+        s->EOL();
+        s->Indent();
+        Type* func_type = function->GetType();
+        if (func_type)
+        {
+            *s << "        Type = ";
+            func_type->Dump (s, false);
+        }
     }
     s->EOL();
     s->Indent();
-    *s << "Block     = " << (void *)block;
+    *s << "Block        = " << (void *)block;
     if (block != NULL)
-        *s << " {" << block->GetID() << '}';
+        *s << " {0x" << block->GetID() << '}';
     // Dump the block and pass it a negative depth to we print all the parent blocks
     //if (block != NULL)
     //  block->Dump(s, function->GetFileAddress(), INT_MIN);
     s->EOL();
     s->Indent();
-    *s << "LineEntry = ";
+    *s << "LineEntry    = ";
     line_entry.Dump (s, process, true, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress, true);
     s->EOL();
     s->Indent();
-    *s << "Symbol    = " << (void *)symbol;
+    *s << "Symbol       = " << (void *)symbol;
     if (symbol != NULL && symbol->GetMangled())
         *s << ' ' << symbol->GetMangled().GetName().AsCString();
     s->EOL();
@@ -313,7 +386,7 @@
     if (module_sp != NULL)
     {
         SymbolContextList sc_matches;
-        if (module_sp->FindFunctions (name_const_str, false, sc_matches) > 0)
+        if (module_sp->FindFunctions (name_const_str, eFunctionNameTypeBase | eFunctionNameTypeFull, false, sc_matches) > 0)
         {
             SymbolContext sc;
             sc_matches.GetContextAtIndex (0, sc);
@@ -324,7 +397,7 @@
     if (target_sp)
     {
         SymbolContextList sc_matches;
-        if (target_sp->GetImages().FindFunctions (name_const_str, sc_matches) > 0)
+        if (target_sp->GetImages().FindFunctions (name_const_str, eFunctionNameTypeBase | eFunctionNameTypeFull, sc_matches) > 0)
         {
             SymbolContext sc;
             sc_matches.GetContextAtIndex (0, sc);

Modified: lldb/trunk/source/Symbol/SymbolVendor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolVendor.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolVendor.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolVendor.cpp Mon Jun 28 16:30:43 2010
@@ -234,11 +234,11 @@
 }
 
 uint32_t
-SymbolVendor::FindFunctions(const ConstString &name, bool append, SymbolContextList& sc_list)
+SymbolVendor::FindFunctions(const ConstString &name, uint32_t name_type_mask, bool append, SymbolContextList& sc_list)
 {
     Mutex::Locker locker(m_mutex);
     if (m_sym_file_ap.get())
-        return m_sym_file_ap->FindFunctions(name, append, sc_list);
+        return m_sym_file_ap->FindFunctions(name, name_type_mask, append, sc_list);
     return 0;
 }
 

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Mon Jun 28 16:30:43 2010
@@ -97,6 +97,81 @@
 
 
 void
+lldb_private::Type::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_name)
+{
+    if (show_name)
+    {
+        if (m_name)
+            *s << '\"' << m_name << "\", ";
+    }
+
+    *s << "id = " << (const UserID&)*this;
+
+    if (m_byte_size != 0)
+        s->Printf(", byte-size = %zu", m_byte_size);
+
+    m_decl.Dump(s);
+
+    clang::QualType qual_type(clang::QualType::getFromOpaquePtr(m_clang_qual_type));
+
+    if (qual_type.getTypePtr())
+    {
+        *s << ", type = ";
+
+        clang::TagType *tag_type = dyn_cast<clang::TagType>(qual_type.getTypePtr());
+        clang::TagDecl *tag_decl = NULL;
+        if (tag_type)
+            tag_decl = tag_type->getDecl();
+
+        if (tag_decl)
+        {
+            s->EOL();
+            s->EOL();
+            tag_decl->print(llvm::fouts(), 0);
+            s->EOL();
+        }
+        else
+        {
+            const clang::TypedefType *typedef_type = qual_type->getAs<clang::TypedefType>();
+            if (typedef_type)
+            {
+                const clang::TypedefDecl *typedef_decl = typedef_type->getDecl();
+                std::string clang_typedef_name (typedef_decl->getQualifiedNameAsString());
+                if (!clang_typedef_name.empty())
+                    *s << ' ' << clang_typedef_name.c_str();
+            }
+            else
+            {
+                // We have a clang type, lets show it
+                clang::ASTContext *ast_context = GetClangAST();
+                if (ast_context)
+                {
+                    std::string clang_type_name(qual_type.getAsString());
+                    if (!clang_type_name.empty())
+                        *s << ' ' << clang_type_name.c_str();
+                }
+            }
+        }
+    }
+    else if (m_encoding_uid != LLDB_INVALID_UID)
+    {
+        *s << ", type_uid = " << m_encoding_uid;
+        switch (m_encoding_uid_type)
+        {
+        case eIsTypeWithUID: s->PutCString(" (unresolved type)"); break;
+        case eIsConstTypeWithUID: s->PutCString(" (unresolved const type)"); break;
+        case eIsRestrictTypeWithUID: s->PutCString(" (unresolved restrict type)"); break;
+        case eIsVolatileTypeWithUID: s->PutCString(" (unresolved volatile type)"); break;
+        case eTypedefToTypeWithUID: s->PutCString(" (unresolved typedef)"); break;
+        case ePointerToTypeWithUID: s->PutCString(" (unresolved pointer)"); break;
+        case eLValueReferenceToTypeWithUID: s->PutCString(" (unresolved L value reference)"); break;
+        case eRValueReferenceToTypeWithUID: s->PutCString(" (unresolved R value reference)"); break;
+        }
+    }
+}
+
+
+void
 lldb_private::Type::Dump (Stream *s, bool show_context)
 {
     s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
@@ -148,16 +223,12 @@
             else
             {
                 // We have a clang type, lets show it
-                TypeList *type_list = GetTypeList();
-                if (type_list)
+                clang::ASTContext *ast_context = GetClangAST();
+                if (ast_context)
                 {
-                    clang::ASTContext *ast_context = GetClangAST();
-                    if (ast_context)
-                    {
-                        std::string clang_type_name(qual_type.getAsString());
-                        if (!clang_type_name.empty())
-                            *s << " (" << clang_type_name.c_str() << ')';
-                    }
+                    std::string clang_type_name(qual_type.getAsString());
+                    if (!clang_type_name.empty())
+                        *s << " (" << clang_type_name.c_str() << ')';
                 }
             }
         }

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon Jun 28 16:30:43 2010
@@ -179,11 +179,16 @@
 }
 
 BreakpointSP
-Target::CreateBreakpoint (FileSpec *containingModule, const char *func_name, bool internal)
+Target::CreateBreakpoint (FileSpec *containingModule, const char *func_name, uint32_t func_name_type_mask, bool internal)
 {
-    SearchFilterSP filter_sp(GetSearchFilterForModule (containingModule));
-    BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, func_name));
-    return CreateBreakpoint (filter_sp, resolver_sp, internal);
+    BreakpointSP bp_sp;
+    if (func_name)
+    {
+        SearchFilterSP filter_sp(GetSearchFilterForModule (containingModule));
+        BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, func_name, func_name_type_mask, Breakpoint::Exact));
+        bp_sp = CreateBreakpoint (filter_sp, resolver_sp, internal);
+    }
+    return bp_sp;
 }
 
 

Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=107075&r1=107074&r2=107075&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Mon Jun 28 16:30:43 2010
@@ -49,13 +49,13 @@
 
 static lldb::OptionDefinition g_options[] =
 {
-    { LLDB_OPT_SET_1,  true,  "help",            'h',  no_argument,        NULL,  NULL,  NULL,
+    { LLDB_OPT_SET_1,  true, "help", 'h',  no_argument,        NULL,  NULL,  NULL,
         "Prints out the usage information for the LLDB debugger." },
 
-    { LLDB_OPT_SET_2,  true,  "version",         'v',  no_argument,        NULL,  NULL,  NULL,
+    { LLDB_OPT_SET_2,  true, "version", 'v',  no_argument,        NULL,  NULL,  NULL,
         "Prints out the current version number of the LLDB debugger." },
 
-    { LLDB_OPT_SET_3,  false,  "arch",           'a',  required_argument,  NULL,  NULL,  "<architecture>",
+    { LLDB_OPT_SET_3,  true, "arch", 'a',  required_argument,  NULL,  NULL,  "<architecture>",
         "Tells the debugger to use the specified architecture when starting and running the program.  <architecture> must be one of the architectures for which the program was compiled." },
 
     { LLDB_OPT_SET_3 | LLDB_OPT_SET_4,  false,  "script-language",'l',  required_argument,  NULL,  NULL,  "<scripting-language>",
@@ -67,11 +67,11 @@
     { LLDB_OPT_SET_3 | LLDB_OPT_SET_4,  false,  "source",         's',  required_argument,  NULL,  NULL,  "<file>",
         "Tells the debugger to read in and execute the file <file>, which should contain lldb commands." },
 
-    { LLDB_OPT_SET_3,  false,  "file",           'f',  required_argument,  NULL,  NULL,  "<filename>",
+    { LLDB_OPT_SET_3,  true,  "file",           'f',  required_argument,  NULL,  NULL,  "<filename>",
         "Tells the debugger to use the file <filename> as the program to be debugged." },
 
-    { LLDB_OPT_SET_4,  false,  "crash-log",      'c',  required_argument,  NULL,  NULL,  "<file>",
-        "Load executable images from a crash log for symbolication." },
+//    { LLDB_OPT_SET_4,  true,  "crash-log",      'c',  required_argument,  NULL,  NULL,  "<file>",
+//        "Load executable images from a crash log for symbolication." },
 
     { 0, false, NULL, 0, 0, NULL, NULL,  NULL, NULL }
 };





More information about the lldb-commits mailing list