Author: gclayton
Date: Thu Jan 23 15:26:30 2014
New Revision: 199937

URL: http://llvm.org/viewvc/llvm-project?rev=199937&view=rev
Log:
Added a new lldb command that can parse all struct and class types for one or 
more shared libraries.


Modified:
    lldb/trunk/examples/python/types.py

Modified: lldb/trunk/examples/python/types.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/types.py?rev=199937&r1=199936&r2=199937&view=diff
==============================================================================
--- lldb/trunk/examples/python/types.py (original)
+++ lldb/trunk/examples/python/types.py Thu Jan 23 15:26:30 2014
@@ -178,7 +178,20 @@ def check_padding_command (debugger, com
         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)
-    
+
[email protected]("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):
 


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to