[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 10 22:57:53 PDT 2024


================
@@ -56,18 +56,18 @@ size_t ObjectFileMinidump::GetModuleSpecifications(
 }
 
 bool ObjectFileMinidump::SaveCore(const lldb::ProcessSP &process_sp,
-                                  const lldb_private::FileSpec &outfile,
-                                  lldb::SaveCoreStyle &core_style,
+                                  lldb_private::CoreDumpOptions &core_options,
                                   lldb_private::Status &error) {
   // Set default core style if it isn't set.
-  if (core_style == SaveCoreStyle::eSaveCoreUnspecified)
-    core_style = SaveCoreStyle::eSaveCoreStackOnly;
+  if (core_options.GetCoreDumpStyle() == SaveCoreStyle::eSaveCoreUnspecified)
+    core_options.SetCoreDumpStyle(SaveCoreStyle::eSaveCoreStackOnly);
----------------
clayborg wrote:

We should move this code into the `PluginManager::SaveCore` function and set this correctly prior to call each instance.save_core, that way each plug-in won't do things differently.

https://github.com/llvm/llvm-project/pull/98403


More information about the lldb-commits mailing list