[Lldb-commits] [PATCH] D131033: [lldb/crashlog] Remove 'process_path' parsing logic

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 3 16:44:12 PDT 2022


mib updated this revision to Diff 449830.
mib retitled this revision from "[lldb/crashlog] Fix parsing issue with `procPath`" to "[lldb/crashlog] Remove 'process_path' parsing logic".
mib edited the summary of this revision.
mib added a comment.

Remove the `process_path` parsing logic


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

https://reviews.llvm.org/D131033

Files:
  lldb/examples/python/crashlog.py
  lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test


Index: lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test
===================================================================
--- lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test
+++ lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test
@@ -7,12 +7,11 @@
 
 parser = crashlog.JSONCrashLogParser("", "", False)
 
-process_info_json = json.loads('{"pid" : 287, "procName" : "mediaserverd", "procPath" : "\/usr\/sbin\/mediaserverd"}')
+process_info_json = json.loads('{"pid" : 287, "procName" : "mediaserverd"}')
 parser.parse_process_info(process_info_json)
 
 assert parser.crashlog.process_id == 287
 assert parser.crashlog.process_identifier == "mediaserverd"
-assert parser.crashlog.process_path == "/usr/sbin/mediaserverd"
 
 crash_reason_json = json.loads('{"type" : "EXC_BAD_ACCESS", "signal" : "SIGSEGV", "subtype" : "KERN_INVALID_ADDRESS"}')
 assert parser.parse_crash_reason(crash_reason_json) == "EXC_BAD_ACCESS (SIGSEGV) (KERN_INVALID_ADDRESS)"
Index: lldb/examples/python/crashlog.py
===================================================================
--- lldb/examples/python/crashlog.py
+++ lldb/examples/python/crashlog.py
@@ -471,7 +471,6 @@
     def parse_process_info(self, json_data):
         self.crashlog.process_id = json_data['pid']
         self.crashlog.process_identifier = json_data['procName']
-        self.crashlog.process_path = json_data['procPath']
 
     def parse_crash_reason(self, json_exception):
         exception_type = json_exception['type']
@@ -670,8 +669,6 @@
             (self.crashlog.process_name, pid_with_brackets) = line[
                 8:].strip().split(' [')
             self.crashlog.process_id = pid_with_brackets.strip('[]')
-        elif line.startswith('Path:'):
-            self.crashlog.process_path = line[5:].strip()
         elif line.startswith('Identifier:'):
             self.crashlog.process_identifier = line[11:].strip()
         elif line.startswith('Version:'):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131033.449830.patch
Type: text/x-patch
Size: 1985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220803/ae158c5c/attachment.bin>


More information about the lldb-commits mailing list