Modified the symbolication.Image object to store its uuid as a uuid.UUID object and made an accessor for getting a normalized UUID value out of the image object.

Modified the crashlog darwin module to always create a uuid.UUID object when making the symbolication.Image objects. Also modified it to handle some more types of crash log files and improved the register reading for thread registers of crashed threads.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156596 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/examples/python/symbolication.py b/examples/python/symbolication.py
index aa5a404..2872d96 100755
--- a/examples/python/symbolication.py
+++ b/examples/python/symbolication.py
@@ -283,12 +283,13 @@
         '''Add the Image described in this object to "target" and load the sections if "load" is True.'''
         if target:
             # Try and find using UUID only first so that paths need not match up
-            if self.uuid:
-                self.module = target.AddModule (None, None, str(self.uuid))
+            uuid_str = self.get_normalized_uuid_string()
+            if uuid_str:
+                self.module = target.AddModule (None, None, uuid_str)
             if not self.module:
                 self.locate_module_and_debug_symbols ()
                 resolved_path = self.get_resolved_path()
-                self.module = target.AddModule (resolved_path, self.arch, self.uuid)#, self.symfile)
+                self.module = target.AddModule (resolved_path, self.arch, uuid_str, self.symfile)
             if not self.module:
                 return 'error: unable to get module for (%s) "%s"' % (self.arch, self.get_resolved_path())
             if self.has_section_load_info():
@@ -308,10 +309,15 @@
         return True
     
     def get_uuid(self):
-        if not self.uuid:
+        if not self.uuid and self.module:
             self.uuid = uuid.UUID(self.module.GetUUIDString())
         return self.uuid
 
+    def get_normalized_uuid_string(self):
+        if self.uuid:
+            return str(self.uuid).upper()
+        return None
+
     def create_target(self):
         '''Create a target using the information in this Image object.'''
         if self.locate_module_and_debug_symbols ():