Print the error if dsymForUUID sometimes produces bad plists.
authorJim Ingham <jingham@apple.com>
Tue, 28 Mar 2017 23:25:34 +0000 (23:25 +0000)
committerJim Ingham <jingham@apple.com>
Tue, 28 Mar 2017 23:25:34 +0000 (23:25 +0000)
Not much we can do about it but at least we can print the bad
plist and the error.

llvm-svn: 298958

lldb/examples/python/crashlog.py

index abd6aaa..7270f60 100755 (executable)
@@ -259,7 +259,11 @@ class CrashLog(symbolication.Symbolicator):
                     self.dsymForUUIDBinary, uuid_str)
                 s = commands.getoutput(dsym_for_uuid_command)
                 if s:
-                    plist_root = plistlib.readPlistFromString(s)
+                    try:
+                        plist_root = plistlib.readPlistFromString(s)
+                    except:
+                        print("Got exception: ", sys.exc_value, " handling dsymForUUID output: \n", s) 
+                        raise
                     if plist_root:
                         plist = plist_root[uuid_str]
                         if plist: