[lldb] Add minidump save-core functionality to ELF object files

This change adds save-core functionality into the ObjectFileELF that enables
saving minidump of a stopped process. This change is mainly targeting Linux
running on x86_64 machines. Minidump should contain basic information needed
to examine state of threads, local variables and stack traces. Full support
for other platforms is not so far implemented. API tests are using LLDB's
MinidumpParser.

This relands commit aafa05e, reverted in 1f986f6.
Failed tests were fixed.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D108233
This commit is contained in:
Andrej Korman
2021-09-01 15:13:56 +02:00
committed by Andy Yankovsky
parent 42ae7eb581
commit eee687a66d
14 changed files with 1206 additions and 10 deletions

View File

@@ -1228,7 +1228,8 @@ lldb::SBError SBProcess::SaveCore(const char *file_name) {
FileSpec core_file(file_name);
SaveCoreStyle core_style = SaveCoreStyle::eSaveCoreFull;
error.ref() = PluginManager::SaveCore(process_sp, core_file, core_style);
error.ref() =
PluginManager::SaveCore(process_sp, core_file, core_style, ConstString());
return LLDB_RECORD_RESULT(error);
}