
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>
11 lines
687 B
Plaintext
11 lines
687 B
Plaintext
# RUN: %clang_host -g %S/Inputs/test.c -o %t.out
|
|
|
|
# RUN: cp %S/Inputs/scripted_crashlog.ips %t.crash
|
|
# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash --offsets '{"main":20, "bar":9, "foo":16}' --json
|
|
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog -i %t.crash' -o 'process status' 2>&1 | FileCheck %s
|
|
|
|
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
|
|
# CHECK: Process 92190 stopped
|
|
# CHECK: * thread #1, name = 'CrashLogScriptedThread.thread-0', stop reason = EXC_BAD_ACCESS
|
|
# CHECK: frame #0: 0x0000000104a23f68 scripted_crashlog_json.test.tmp.out`foo at test.c:3:6 [artificial]
|