MCPcopy Create free account
hub / github.com/Norbyte/bg3se / BreakpointInServerThread

Method BreakpointInServerThread

BG3Extender/Osiris/Debugger/Debugger.cpp:720–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718 }
719
720 void Debugger::BreakpointInServerThread()
721 {
722 if (callStack_.empty()) {
723 Fail("Tried to trigger breakpoint with empty callstack");
724 }
725
726 auto const & lastFrame = *callStack_.rbegin();
727 DEBUG("Debugger::BreakpointInServerThread(): type %d", lastFrame.frameType);
728 {
729 std::unique_lock<std::mutex> lk(breakpointMutex_);
730 isPaused_ = true;
731 }
732
733 QueryResultInfo * queryResults = nullptr;
734 if (hasLastQueryInfo_
735 && callStack_.size() == lastQueryDepth_ - 1)
736 {
737 queryResults = &lastQueryResults_;
738 }
739
740 messageHandler_.SendBreakpointTriggered(callStack_, queryResults);
741
742 {
743 std::unique_lock<std::mutex> lk(breakpointMutex_);
744 breakpointCv_.wait(lk, [this]() { this->ServerThreadReentry(); return !this->isPaused_; });
745 }
746
747 DEBUG("Continuing from breakpoint.");
748 }
749
750 void Debugger::GlobalBreakpointInServerThread(GlobalBreakpointReason reason)
751 {

Callers

nothing calls this directly

Calls 5

ServerThreadReentryMethod · 0.95
FailFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected