[crashlog] Implement parser for JSON encoded crashlogs
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 16 Nov 2020 21:46:44 +0000 (13:46 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 16 Nov 2020 21:50:37 +0000 (13:50 -0800)
commitc7cbf32f5770c5eec2a2dd6eb7cf3153e654ed08
treeaa3c1f362a3af99f54d74b8b65dc4c15c17ee9f5
parent5a4ca8b550afea96c0539083b470f87b40226688
[crashlog] Implement parser for JSON encoded crashlogs

Add a parser for JSON crashlogs. The CrashLogParser now defers to either
the JSONCrashLogParser or the TextCrashLogParser. It first tries to
interpret the input as JSON, and if that fails falling back to the
textual parser.

Differential revision: https://reviews.llvm.org/D91130
lldb/examples/python/crashlog.py
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/Assertion.check [new file with mode: 0644]
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.crash [new file with mode: 0644]
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/a.out.ips [new file with mode: 0644]
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/test.c [new file with mode: 0644]
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test [new file with mode: 0644]
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_json.test [new file with mode: 0644]
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/parser_text.test [moved from lldb/test/Shell/ScriptInterpreter/Python/Crashlog/crashlog.test with 98% similarity]
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/patch-crashlog.py [new file with mode: 0644]
lldb/test/Shell/ScriptInterpreter/Python/Crashlog/text.test [new file with mode: 0644]