From a787e1422c9ac90daf9f3752868e53871ab95d8f Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 9 Jun 2016 13:45:15 +0200 Subject: [PATCH] Remote debugging working with lldb-gdbserver at least. Fixes #238 --- src/debug_clang.cc | 3 +++ 1 file changed, 3 insertions(+) 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)));