Added a new lldb command that can parse all struct and class types for one or more shared libraries.

llvm-svn: 199937
This commit is contained in:
Greg Clayton 2014-01-23 21:26:30 +00:00
parent 1e9d9b20fa
commit 09effdacda
1 changed files with 14 additions and 1 deletions

View File

@ -178,7 +178,20 @@ def check_padding_command (debugger, command, result, dict):
result.SetStatus (lldb.eReturnStatusFailed)
return "option parsing failed" # returning a string is the same as returning an error whose description is the string
verify_types(options, debugger.GetSelectedTarget(), command_args)
@lldb.command("parse_all_struct_class_types")
def parse_all_struct_class_types (debugger, command, result, dict):
command_args = shlex.split(command)
for f in command_args:
error = lldb.SBError()
target = debugger.CreateTarget (f, None, None, False, error)
module = target.GetModuleAtIndex(0)
print "Parsing all types in '%s'" % (module)
types = module.GetTypes(lldb.eTypeClassClass | lldb.eTypeClassStruct)
for t in types:
print t
print ""
def verify_types (target, options):