[Lldb-commits] [lldb] [LLDB][SaveCore] Add SBCoreDumpOptions Object, and SBProcess::SaveCore() overload (PR #98403)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 17 14:51:01 PDT 2024
================
@@ -6519,14 +6519,15 @@ struct page_object {
};
bool ObjectFileMachO::SaveCore(const lldb::ProcessSP &process_sp,
- const FileSpec &outfile,
- lldb::SaveCoreStyle &core_style, Status &error) {
- if (!process_sp)
- return false;
-
- // Default on macOS is to create a dirty-memory-only corefile.
+ const lldb_private::CoreDumpOptions &options,
+ Status &error) {
+ auto core_style = options.GetStyle();
if (core_style == SaveCoreStyle::eSaveCoreUnspecified)
core_style = SaveCoreStyle::eSaveCoreDirtyOnly;
+ // The FileSpec and Process are already checked in PluginManager::SaveCore.
+ assert(options.GetOutputFile().has_value());
+ const FileSpec outfile = options.GetOutputFile().value();
+ assert(process_sp);
----------------
clayborg wrote:
move this up a line so the comment makes more sense.
https://github.com/llvm/llvm-project/pull/98403
More information about the lldb-commits
mailing list