[Lldb-commits] [lldb] 05cdd29 - [lldb] Adjust parse_frames for unnamed images

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 3 13:24:32 PDT 2021


Author: Jonas Devlieghere
Date: 2021-09-03T13:23:24-07:00
New Revision: 05cdd294ab020b42329413ae7ab52d0c5aaf8151

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

LOG: [lldb] Adjust parse_frames for unnamed images

Follow up to 2cbd3b04feaaaff7fab4c6500476839a23180886 which added
support for unnamed images but missed the use case in parse_frames.

Added: 
    

Modified: 
    lldb/examples/python/crashlog.py

Removed: 
    


################################################################################
diff  --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index a7b2d3b52b562..79b290ceba8a2 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -473,7 +473,8 @@ def parse_frames(self, thread, json_frames):
         idx = 0
         for json_frame in json_frames:
             image_id = int(json_frame['imageIndex'])
-            ident = self.get_used_image(image_id)['name']
+            json_image = self.get_used_image(image_id)
+            ident = json_image['name'] if 'name' in json_image else ''
             thread.add_ident(ident)
             if ident not in self.crashlog.idents:
                 self.crashlog.idents.append(ident)


        


More information about the lldb-commits mailing list