[Lldb-commits] [lldb] b67b7bb - [lldb] Parse image high address from JSON crashlogs

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 11 14:46:55 PDT 2023


Author: Jonas Devlieghere
Date: 2023-04-11T14:46:49-07:00
New Revision: b67b7bb2f73568efac077de189f86e86d9e010d6

URL: https://github.com/llvm/llvm-project/commit/b67b7bb2f73568efac077de189f86e86d9e010d6
DIFF: https://github.com/llvm/llvm-project/commit/b67b7bb2f73568efac077de189f86e86d9e010d6.diff

LOG: [lldb] Parse image high address from JSON crashlogs

Use the base + size to correctly populate the image high address when
parsing JSON crashlogs.

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

Added: 
    

Modified: 
    lldb/examples/python/crashlog.py

Removed: 
    


################################################################################
diff  --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index 6a5c560238eeb..b09c03a50bb75 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -510,7 +510,8 @@ def parse_images(self, json_images):
         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 = ''


        


More information about the lldb-commits mailing list