Author: Med Ismail Bennani Date: 2022-08-09T21:01:37-07:00 New Revision: 13aa780f37e193d8c23a6c5ff98cc4c7febc1f95
URL: https://github.com/llvm/llvm-project/commit/13aa780f37e193d8c23a6c5ff98cc4c7febc1f95 DIFF: https://github.com/llvm/llvm-project/commit/13aa780f37e193d8c23a6c5ff98cc4c7febc1f95.diff LOG: [lldb/crashlog] Remove 'process_path' parsing logic In can happen when creating stackshot crash report that that key is missing. Moreover, we try to parse that key but don't use it, or need it, since we fetch images and symbolicate the stackframes using the binaries UUIDs. This is why this patch removes everything that is related to the `process_path`/`procPath` parsing. rdar://95054188 Differential Revision: https://reviews.llvm.org/D131033 Signed-off-by: Med Ismail Bennani <medismail.benn...@gmail.com> Added: Modified: lldb/examples/python/crashlog.py lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test Removed: ################################################################################ diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py index 1d1f8ba06f377..60e375893eb56 100755 --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -471,7 +471,6 @@ def get_used_image(self, idx): 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 @@ def parse_normal(self, line): (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:'): diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test index 50da725547fbd..946b706305cb8 100644 --- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test +++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test @@ -7,12 +7,11 @@ import json 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)" _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits