[lldb] Add a "diagnostics dump" command
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 31 Oct 2022 17:11:12 +0000 (10:11 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 31 Oct 2022 21:40:41 +0000 (14:40 -0700)
commit0d01300aacf6029b6d63f7dcede3ca8e15229d34
tree5e875921b63c8331636e388f5f6aa40296bda46e
parent84ea6b6f78df789db6724ef8d774cf04d94d2313
[lldb] Add a "diagnostics dump" command

Add a "diagnostics dump" command to, as the name implies, dump the
diagnostics to disk. The goal of this command is to let the user
generate the diagnostics in case of an issue that doesn't cause the
debugger to crash.

This command is also critical for testing, where we don't want to cause
a crash to emit the diagnostics.

Differential revision: https://reviews.llvm.org/D135622
lldb/include/lldb/Utility/Diagnostics.h
lldb/source/Commands/CMakeLists.txt
lldb/source/Commands/CommandObjectDiagnostics.cpp [new file with mode: 0644]
lldb/source/Commands/CommandObjectDiagnostics.h [new file with mode: 0644]
lldb/source/Commands/Options.td
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Utility/Diagnostics.cpp
lldb/test/Shell/Diagnostics/TestDump.test [new file with mode: 0644]