[Lldb-commits] [PATCH] D119504: [lldb/crashlog] Fix exception signal parsing

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 16 11:45:29 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG21658b77a596: [lldb/crashlog] Fix exception signal parsing (authored by mib).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119504/new/

https://reviews.llvm.org/D119504

Files:
  lldb/examples/python/crashlog.py


Index: lldb/examples/python/crashlog.py
===================================================================
--- lldb/examples/python/crashlog.py
+++ lldb/examples/python/crashlog.py
@@ -466,14 +466,17 @@
 
     def parse_crash_reason(self, json_exception):
         exception_type = json_exception['type']
-        exception_signal = json_exception['signal']
+        exception_signal = " "
+        if 'signal' in json_exception:
+            exception_signal += "({})".format(json_exception['signal'])
+
         if 'codes' in json_exception:
             exception_extra = " ({})".format(json_exception['codes'])
         elif 'subtype' in json_exception:
             exception_extra = " ({})".format(json_exception['subtype'])
         else:
             exception_extra = ""
-        return "{} ({}){}".format(exception_type, exception_signal,
+        return "{}{}{}".format(exception_type, exception_signal,
                                   exception_extra)
 
     def parse_images(self, json_images):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119504.409355.patch
Type: text/x-patch
Size: 1012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220216/bfe5d704/attachment.bin>


More information about the lldb-commits mailing list