================ @@ -964,6 +964,18 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp, return error; } + // Set the process sp if not already set. + ProcessSP options_sp = options.GetProcess(); ---------------- dmpots wrote:
The name `options_sp` is a bit confusing to me because it is not a shared_ptr to Options but a shared_ptr to a Process. I think we could actually just get rid of this variable and then it would simplify the check below because we can always validate that the process matches. ``` 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) { ... } ``` 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