summaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectTarget.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-05-15 19:26:12 +0000
committerGreg Clayton <gclayton@apple.com>2012-05-15 19:26:12 +0000
commitaafa5c9ecd09e24e49eca9d2cf672cc29ed4b342 (patch)
tree5a2b813694127d804e9dc33712c196c7e9b54b9d /lldb/source/Commands/CommandObjectTarget.cpp
parent491e4aed31c044c9dd06012703701c2261a8d4c2 (diff)
Modified "image lookup -t <typename>" to expand typedefs.
llvm-svn: 156845
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 6bb2da3389fc..c7b644f9087d 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -1573,7 +1573,7 @@ LookupFunctionInModule (CommandInterpreter &interpreter,
}
static uint32_t
-LookupTypeInModule (CommandInterpreter &interpreter,
+LookupTypeInModule (CommandInterpreter &interpreter,
Stream &strm,
Module *module,
const char *name_cstr,
@@ -1606,6 +1606,18 @@ LookupTypeInModule (CommandInterpreter &interpreter,
// 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();
}