================
@@ -1222,7 +1223,19 @@ lldb::SBError SBProcess::SaveCore(const char *file_name) 
{
 lldb::SBError SBProcess::SaveCore(const char *file_name,
                                   const char *flavor,
                                   SaveCoreStyle core_style) {
-  LLDB_INSTRUMENT_VA(this, file_name, flavor, core_style);
+  SBFileSpec fspec(file_name);
+  SBCoreDumpOptions options;
+  options.SetOutputFile(fspec);
+  options.SetCoreDumpPluginName(flavor);
+  options.SetCoreDumpStyle(core_style);
+  return SaveCore(options);
+}
+
+lldb::SBError SBProcess::SaveCore(SBCoreDumpOptions &options) {
+
+  LLDB_INSTRUMENT_VA(this, options.GetOutputFile(),
+                     options.GetCoreDumpPluginName(),
+                     options.GetCoreDumpStyle());
----------------
Jlalond wrote:

The original source code asked for each individual field, so I kept roughly the 
same behavior, if we have a way to decompose the object in `INSTUMENT_VA` I 
would prefer to pass the object as this API will implicitly expand as the 
options object gains members/options.

https://github.com/llvm/llvm-project/pull/98403
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to