[lldb] Parse image high address from JSON crashlogs
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 11 Apr 2023 21:45:34 +0000 (14:45 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 11 Apr 2023 21:46:49 +0000 (14:46 -0700)
Use the base + size to correctly populate the image high address when
parsing JSON crashlogs.

Differential revision: https://reviews.llvm.org/D148053

lldb/examples/python/crashlog.py

index 6a5c560..b09c03a 100755 (executable)
@@ -510,7 +510,8 @@ class JSONCrashLogParser(CrashLogParser):
         for json_image in json_images:
             img_uuid = uuid.UUID(json_image['uuid'])
             low = int(json_image['base'])
-            high = int(0)
+            high = low + int(
+                json_image['size']) if 'size' in json_image else low
             name = json_image['name'] if 'name' in json_image else ''
             path = json_image['path'] if 'path' in json_image else ''
             version = ''