[LLDB][SaveCore] Add SBSaveCoreOptions Object, and SBProcess::SaveCore() overload (#98403)

This PR adds `SBSaveCoreOptions`, which is a container class for options
when LLDB is taking coredumps. For this first iteration this container
just keeps parity with the extant API of `file, style, plugin`. In the
future this options object can be extended to allow users to take a
subset of their core dumps.
This commit is contained in:
Jacob Lalonde
2024-07-18 17:10:15 -07:00
committed by GitHub
parent 996d31c7ba
commit 4120570dc4
30 changed files with 412 additions and 62 deletions

View File

@@ -355,11 +355,12 @@ size_t ObjectFilePECOFF::GetModuleSpecifications(
}
bool ObjectFilePECOFF::SaveCore(const lldb::ProcessSP &process_sp,
const lldb_private::FileSpec &outfile,
lldb::SaveCoreStyle &core_style,
const lldb_private::SaveCoreOptions &options,
lldb_private::Status &error) {
core_style = eSaveCoreFull;
return SaveMiniDump(process_sp, outfile, error);
// Outfile and process_sp are validated by PluginManager::SaveCore
assert(options.GetOutputFile().has_value());
assert(process_sp);
return SaveMiniDump(process_sp, options, error);
}
bool ObjectFilePECOFF::MagicBytesMatch(DataBufferSP data_sp) {