diff --git a/src/debug_clang.cc b/src/debug_clang.cc index e02e935..5677aaf 100644 --- a/src/debug_clang.cc +++ b/src/debug_clang.cc @@ -114,12 +114,15 @@ void Debug::Clang::start(const std::string &command, const boost::filesystem::pa if(listener->GetNextEvent(event)) { if((event.GetType() & lldb::SBProcess::eBroadcastBitStateChanged)>0) { auto state=process->GetStateFromEvent(event); + this->state=state; if(state==lldb::StateType::eStateConnected) break; } } } process->RemoteLaunch(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, lldb::eLaunchFlagNone, false, error); + if(!error.Fail()) + process->Continue(); } else process = std::unique_ptr(new lldb::SBProcess(target.Launch(*listener, argv, const_cast(environ), nullptr, nullptr, nullptr, path.string().c_str(), lldb::eLaunchFlagNone, false, error)));