diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp index 0fecefe23b88e..870a0511b7926 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -79,8 +79,10 @@ namespace lldb_private { ProcessSP ProcessWindows::CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, - const FileSpec *, + const FileSpec *crash_file_path, bool can_connect) { + if (crash_file_path) + return nullptr; // Cannot create a Windows process from a crash_file return ProcessSP(new ProcessWindows(target_sp, listener_sp)); } diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 3c4d9a1f1ad37..83e358677467b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -210,11 +210,9 @@ void ProcessGDBRemote::Terminate() { lldb::ProcessSP ProcessGDBRemote::CreateInstance( lldb::TargetSP target_sp, ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect) { - lldb::ProcessSP process_sp; - if (crash_file_path == nullptr) - process_sp = std::shared_ptr( - new ProcessGDBRemote(target_sp, listener_sp)); - return process_sp; + if (crash_file_path) + return nullptr; // Cannot create a GDBRemote process from a crash_file + return lldb::ProcessSP(new ProcessGDBRemote(target_sp, listener_sp)); } void ProcessGDBRemote::DumpPluginHistory(Stream &s) {