aboutsummaryrefslogtreecommitdiff
path: root/lldb/examples/python/crashlog.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2021-04-19 10:20:13 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2021-04-19 10:27:11 -0700
commit2cbd3b04feaaaff7fab4c6500476839a23180886 (patch)
tree6e34cfa7d4fb8d6ae83f71d475e1f40e25783e59 /lldb/examples/python/crashlog.py
parent9d43f6d7cee8887cb2a7a2442dffa4ef21ef4446 (diff)
downloadllvm-2cbd3b04feaaaff7fab4c6500476839a23180886.zip
llvm-2cbd3b04feaaaff7fab4c6500476839a23180886.tar.gz
llvm-2cbd3b04feaaaff7fab4c6500476839a23180886.tar.bz2
[lldb] Support "absolute memory address" images in crashlog.py
The binary image list contains the following entry when a frame is not found in any know binary image: { "size" : 0, "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" } Note that this object is missing the name and path keys. This patch makes the JSON parser resilient against their absence.
Diffstat (limited to 'lldb/examples/python/crashlog.py')
-rwxr-xr-xlldb/examples/python/crashlog.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index afae31f..1f26739 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -452,9 +452,9 @@ class JSONCrashLogParser:
img_uuid = uuid.UUID(json_image['uuid'])
low = int(json_image['base'])
high = int(0)
- name = json_image['name']
- path = json_image['path']
- version = ""
+ name = json_image['name'] if 'name' in json_image else ''
+ path = json_image['path'] if 'path' in json_image else ''
+ version = ''
darwin_image = self.crashlog.DarwinImage(low, high, name, version,
img_uuid, path,
self.verbose)