MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / EnterDebugMode

Method EnterDebugMode

emmy_debugger/src/debugger/emmy_debugger.cpp:669–694  ·  view source on GitHub ↗

host thread

Source from the content-addressed store, hash-verified

667
668// host thread
669void Debugger::EnterDebugMode() {
670 std::unique_lock<std::mutex> lock(runMtx);
671
672 blocking = true;
673 while (true) {
674 std::unique_lock<std::mutex> lockEval(evalMtx);
675 if (evalQueue.empty() && blocking) {
676 lockEval.unlock();
677 cvRun.wait(lock, [this] { return !blocking || !evalQueue.empty(); });
678 lockEval.lock();
679 }
680 if (!evalQueue.empty()) {
681 const auto evalContext = evalQueue.front();
682 evalQueue.pop();
683 lockEval.unlock();
684 const bool skip = skipHook;
685 skipHook = true;
686 evalContext->success = DoEval(evalContext);
687 skipHook = skip;
688 EmmyFacade::Get().OnEvalResult(evalContext);
689 continue;
690 }
691 break;
692 }
693 ClearCache();
694}
695
696void Debugger::ExitDebugMode() {
697 blocking = false;

Callers

nothing calls this directly

Calls 2

OnEvalResultMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected