Fixed a missing newline when dumping mixed disassembly.

Added a "bool show_fullpaths" to many more objects that were
previously always dumping full paths.

Fixed a few places where the DWARF was not indexed when we
we needed it to be when making queries. Also fixed an issue
where the DWARF in .o files wasn't searching all .o files
for the types.

Fixed an issue with the output from "image lookup --type <TYPENAME>"
where the name and byte size might not be resolved and might not
display. We now call the accessors so we end up seeing all of the
type info.

llvm-svn: 113951
diff --git a/lldb/source/Commands/CommandObjectDisassemble.cpp b/lldb/source/Commands/CommandObjectDisassemble.cpp
index 49a5677..a5fc7f6 100644
--- a/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -196,7 +196,7 @@
     ExecutionContext exe_ctx(interpreter.GetDebugger().GetExecutionContext());
 
     if (m_options.show_mixed && m_options.num_lines_context == 0)
-        m_options.num_lines_context = 3;
+        m_options.num_lines_context = 1;
 
     if (!m_options.m_func_name.empty())
     {
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index 40d8d30..c2d36ef 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -107,7 +107,10 @@
     if (module)
     {
         if (!module->FindFunctions (name, 
-                                    eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, 
+                                    eFunctionNameTypeBase | 
+                                    eFunctionNameTypeFull | 
+                                    eFunctionNameTypeMethod | 
+                                    eFunctionNameTypeSelector, 
                                     true,
                                     sc_list))
             return false;
@@ -115,7 +118,10 @@
     else 
     {
         if (exe_ctx.target->GetImages().FindFunctions (name, 
-                                                       eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
+                                                       eFunctionNameTypeBase | 
+                                                       eFunctionNameTypeFull | 
+                                                       eFunctionNameTypeMethod | 
+                                                       eFunctionNameTypeSelector,
                                                        false,
                                                        sc_list))
         {
@@ -240,7 +246,8 @@
                                         if (offset != 0)
                                             strm.EOL();
 
-                                        sc.DumpStopContext(&strm, process, addr, true, true, false);
+                                        sc.DumpStopContext(&strm, process, addr, false, true, false);
+                                        strm.EOL();
 
                                         if (sc.comp_unit && sc.line_entry.IsValid())
                                         {
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index bcae13c..d388d54 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1834,6 +1834,10 @@
     if (!append)
         types.Clear();
 
+    // Index if we already haven't to make sure the compile units
+    // get indexed and make their global DIE index list
+    if (!m_indexed)
+        Index ();
 
     const uint32_t initial_types_size = types.GetSize();
     DWARFCompileUnit* cu = NULL;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index b99a30c..d216ef5 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -878,14 +878,35 @@
 
 
 uint32_t
-SymbolFileDWARFDebugMap::FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, TypeList& types)
+SymbolFileDWARFDebugMap::FindTypes 
+(
+    const SymbolContext& sc, 
+    const ConstString &name, 
+    bool append, 
+    uint32_t max_matches, 
+    TypeList& types
+)
 {
-    SymbolFileDWARF *oso_dwarf = GetSymbolFile (sc);
-    if (oso_dwarf)
-        return oso_dwarf->FindTypes (sc, name, append, max_matches, types);
     if (!append)
         types.Clear();
-    return 0;
+
+    const uint32_t initial_types_size = types.GetSize();
+    SymbolFileDWARF *oso_dwarf;
+
+    if (sc.comp_unit)
+    {
+        oso_dwarf = GetSymbolFile (sc);
+        if (oso_dwarf)
+            return oso_dwarf->FindTypes (sc, name, append, max_matches, types);
+    }
+    else
+    {
+        uint32_t oso_idx = 0;
+        while ((oso_dwarf = GetSymbolFileByOSOIndex (oso_idx++)) != NULL)
+            oso_dwarf->FindTypes (sc, name, append, max_matches, types);
+    }
+
+    return types.GetSize() - initial_types_size;
 }
 
 //
diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp
index 0096c53..a219389 100644
--- a/lldb/source/Symbol/Block.cpp
+++ b/lldb/source/Symbol/Block.cpp
@@ -57,7 +57,10 @@
     }
 
     if (m_inlineInfoSP.get() != NULL)
-        m_inlineInfoSP->Dump(s);
+    {
+        bool show_fullpaths = (level == eDescriptionLevelVerbose);
+        m_inlineInfoSP->Dump(s, show_fullpaths);
+    }
 }
 
 void
@@ -83,7 +86,10 @@
         s->Printf(", parent = {0x%8.8x}", parent_block->GetID());
     }
     if (m_inlineInfoSP.get() != NULL)
-        m_inlineInfoSP->Dump(s);
+    {
+        bool show_fullpaths = false;
+        m_inlineInfoSP->Dump(s, show_fullpaths);
+    }
 
     if (!m_ranges.empty())
     {
diff --git a/lldb/source/Symbol/Declaration.cpp b/lldb/source/Symbol/Declaration.cpp
index 2f312d4..8685d8d 100644
--- a/lldb/source/Symbol/Declaration.cpp
+++ b/lldb/source/Symbol/Declaration.cpp
@@ -57,11 +57,15 @@
 }
 
 void
-Declaration::Dump(Stream *s) const
+Declaration::Dump(Stream *s, bool show_fullpaths) const
 {
     if (m_file)
     {
-        *s << ", decl = " << m_file;
+        *s << ", decl = ";
+        if (show_fullpaths)
+            *s << m_file;
+        else
+            *s << m_file.GetFilename();
         if (m_line > 0)
             s->Printf(":%u", m_line);
         if (m_column > 0)
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp
index 8989f2e..3c108d7 100644
--- a/lldb/source/Symbol/Function.cpp
+++ b/lldb/source/Symbol/Function.cpp
@@ -45,11 +45,11 @@
 }
 
 void
-FunctionInfo::Dump(Stream *s) const
+FunctionInfo::Dump(Stream *s, bool show_fullpaths) const
 {
     if (m_name)
         *s << ", name = \"" << m_name << "\"";
-    m_declaration.Dump(s);
+    m_declaration.Dump(s, show_fullpaths);
 }
 
 
@@ -131,9 +131,9 @@
 }
 
 void
-InlineFunctionInfo::Dump(Stream *s) const
+InlineFunctionInfo::Dump(Stream *s, bool show_fullpaths) const
 {
-    FunctionInfo::Dump(s);
+    FunctionInfo::Dump(s, show_fullpaths);
     if (m_mangled)
         m_mangled.Dump(s);
 }
diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp
index 886367f..4a5e4e1 100644
--- a/lldb/source/Symbol/Type.cpp
+++ b/lldb/source/Symbol/Type.cpp
@@ -87,13 +87,15 @@
 {
     *s << "id = " << (const UserID&)*this;
 
-    if (show_name && m_name)
+    // Call the name accessor to make sure we resolve the type name
+    if (show_name && GetName())
         *s << ", name = \"" << m_name << '"';
 
-    if (m_byte_size != 0)
+    // Call the get byte size accesor so we resolve our byte size
+    if (GetByteSize())
         s->Printf(", byte-size = %zu", m_byte_size);
-
-    m_decl.Dump(s);
+    bool show_fullpaths = (level == lldb::eDescriptionLevelVerbose);
+    m_decl.Dump(s, show_fullpaths);
 
     if (m_clang_qual_type)
     {
@@ -138,7 +140,8 @@
         s->PutCString(" )");
     }
 
-    m_decl.Dump(s);
+    bool show_fullpaths = false;
+    m_decl.Dump (s,show_fullpaths);
 
     if (m_clang_qual_type)
     {
diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp
index 27af65f..7a4e12c 100644
--- a/lldb/source/Symbol/Variable.cpp
+++ b/lldb/source/Symbol/Variable.cpp
@@ -91,7 +91,8 @@
         s->PutCString(" )");
     }
 
-    m_declaration.Dump(s);
+    bool show_fullpaths = false;
+    m_declaration.Dump(s, show_fullpaths);
 
     if (m_location.IsValid())
     {