[Lldb-commits] [PATCH] D148053: [lldb] Parse image high address from JSON crashlogs

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 11 14:29:04 PDT 2023


JDevlieghere created this revision.
JDevlieghere added a reviewer: mib.
Herald added a project: All.
JDevlieghere requested review of this revision.

Correctly parse the image high address from JSON crashlogs.

This is invisible in the output but necessary for a follow up patch that will test the new behavior.


https://reviews.llvm.org/D148053

Files:
  lldb/examples/python/crashlog.py


Index: lldb/examples/python/crashlog.py
===================================================================
--- lldb/examples/python/crashlog.py
+++ lldb/examples/python/crashlog.py
@@ -510,7 +510,8 @@
         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 = ''


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148053.512584.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230411/a3c740fc/attachment.bin>


More information about the lldb-commits mailing list