diff --git a/src/debug.cc b/src/debug.cc index a7c453b..51bbd59 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1,5 +1,6 @@ #include "debug.h" #include +#include #include #include "terminal.h" @@ -22,7 +23,11 @@ void log(const char *msg, void *) { cout << "debugger log: " << msg << endl; } -Debug::Debug(): listener("juCi++ lldb listener"), state(lldb::StateType::eStateInvalid), buffer_size(131072) {} +Debug::Debug(): listener("juCi++ lldb listener"), state(lldb::StateType::eStateInvalid), buffer_size(131072) { +#ifdef __APPLE__ + setenv("LLDB_DEBUGSERVER_PATH", "/usr/local/opt/llvm/bin/debugserver", 0); +#endif +} void Debug::start(std::shared_ptr > > breakpoints, const boost::filesystem::path &executable, const boost::filesystem::path &path, std::function callback,