[Lldb-commits] [PATCH] D131085: [lldb/crashlog] Refactor the CrashLogParser logic

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 3 11:23:12 PDT 2022


JDevlieghere added inline comments.


================
Comment at: lldb/examples/python/crashlog.py:417
+class CrashLogParser(object):
+    "Base class and factory."
+    def __new__(cls, debugger, path, verbose, *args, **kwargs):
----------------



================
Comment at: lldb/examples/python/crashlog.py:428
         self.crashlog = CrashLog(debugger, self.path, self.verbose)
+        self.data = None
+
----------------
Can this stay in the JSONCrashLogParser?


================
Comment at: lldb/examples/python/crashlog.py:630
     def __init__(self, debugger, path, verbose):
-        self.path = os.path.expanduser(path)
-        self.verbose = verbose
+        super().__init__(debugger,path,verbose)
         self.thread = None
----------------



================
Comment at: lldb/examples/python/scripted_process/crashlog_scripted_process.py:15
+            crashlog_parser = CrashLogParser(self.dbg, self.crashlog_path, False)
+            crashlog = crashlog_parser.parse()
         except Exception as e:
----------------
Given that the module itself is called `crashlog`, I would keep the underscore to avoid potential naming collisions. 


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

https://reviews.llvm.org/D131085



More information about the lldb-commits mailing list