[lldb/crashlog] Add CrashLogScriptedProcess & remove interactive mode

This patch introduces a new type of ScriptedProcess: CrashLogScriptedProcess.
It takes advantage of lldb's crashlog parsers and Scripted Processes to
reconstruct a static debugging session with symbolicated stackframes, instead
of just dumping out everything in the user's terminal.

The crashlog command also has an interactive mode that only provide a
very limited experience. This is why this patch removes all the logic
for this interactive mode and creates CrashLogScriptedProcess instead.

This will fetch and load all the libraries that were used by the crashed
thread and re-create all the frames artificially.

rdar://88721117

Differential Revision: https://reviews.llvm.org/D119501

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
Med Ismail Bennani
2022-02-16 11:43:44 -08:00
parent 7f3fc2eee8
commit 7c54ffdc6c
6 changed files with 296 additions and 137 deletions

View File

@@ -303,6 +303,9 @@ bool ScriptedProcess::DoUpdateThreadList(ThreadList &old_thread_list,
StructuredData::DictionarySP thread_info_sp = GetInterface().GetThreadsInfo();
// FIXME: Need to sort the dictionary otherwise the thread ids won't match the
// thread indices.
if (!thread_info_sp)
return ScriptedInterface::ErrorWithMessage<bool>(
LLVM_PRETTY_FUNCTION,