================
@@ -965,6 +965,16 @@ Status PluginManager::SaveCore(const lldb::ProcessSP 
&process_sp,
     return error;
   }
 
+  if (!options.GetProcess())
+    options.SetProcess(process_sp);
+
+  // Make sure the process sp is the same as the one we are using.
+  if (options.GetProcess() != process_sp) {
+    error = Status::FromErrorString(
+        "Save Core Options configured for a different process.");
+    return error;
+  }
----------------
clayborg wrote:

move this to the code that calls it.

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

Reply via email to