Modified "image lookup -t <typename>" to expand typedefs.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156845 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index 6bb2da3..c7b644f 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -1573,7 +1573,7 @@
 }
 
 static uint32_t
-LookupTypeInModule (CommandInterpreter &interpreter, 
+LookupTypeInModule (CommandInterpreter &interpreter,
                     Stream &strm, 
                     Module *module, 
                     const char *name_cstr, 
@@ -1606,6 +1606,18 @@
                     // to types that haven't yet been parsed will get parsed.
                     type_sp->GetClangFullType ();
                     type_sp->GetDescription (&strm, eDescriptionLevelFull, true);
+                    // Print all typedef chains
+                    TypeSP typedef_type_sp (type_sp);
+                    TypeSP typedefed_type_sp (typedef_type_sp->GetTypedefType());
+                    while (typedefed_type_sp)
+                    {
+                        strm.EOL();
+                        strm.Printf("     typedef '%s': ", typedef_type_sp->GetName().GetCString());
+                        typedefed_type_sp->GetClangFullType ();
+                        typedefed_type_sp->GetDescription (&strm, eDescriptionLevelFull, true);
+                        typedef_type_sp = typedefed_type_sp;
+                        typedefed_type_sp = typedef_type_sp->GetTypedefType();
+                    }
                 }
                 strm.EOL();
             }