================ @@ -427,8 +427,17 @@ class CommandObjectTargetCreate : public CommandObjectParsed { core_file_dir.SetDirectory(core_file.GetDirectory()); target_sp->AppendExecutableSearchPaths(core_file_dir); + auto file = FileSystem::Instance().Open( + core_file, lldb_private::File::eOpenOptionReadOnly); + if (!file) { + result.AppendErrorWithFormatv( + "Failed to open the core file '{0}': '{1}.'\n", + core_file.GetPath(), llvm::toString(file.takeError())); + } + ProcessSP process_sp(target_sp->CreateProcess( - GetDebugger().GetListener(), llvm::StringRef(), &core_file, false)); + GetDebugger().GetListener(), llvm::StringRef(), + std::move(file.get()), false)); ---------------- clayborg wrote:
All of this goes away if we leave the original Target::CreateProcess overload as mentioned above. https://github.com/llvm/llvm-project/pull/71769 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits