| 828 | } |
| 829 | |
| 830 | void Debugger::BreakpointInServerThread() |
| 831 | { |
| 832 | if (callStack_.empty()) { |
| 833 | Fail("Tried to trigger breakpoint with empty callstack"); |
| 834 | } |
| 835 | |
| 836 | auto const & lastFrame = *callStack_.rbegin(); |
| 837 | Debug("Debugger::BreakpointInServerThread(): type %d", lastFrame.frameType); |
| 838 | { |
| 839 | std::unique_lock<std::mutex> lk(breakpointMutex_); |
| 840 | isPaused_ = true; |
| 841 | } |
| 842 | |
| 843 | QueryResultInfo * queryResults = nullptr; |
| 844 | if (hasLastQueryInfo_ |
| 845 | && callStack_.size() == lastQueryDepth_ - 1) |
| 846 | { |
| 847 | queryResults = &lastQueryResults_; |
| 848 | } |
| 849 | |
| 850 | messageHandler_.SendBreakpointTriggered(callStack_, queryResults); |
| 851 | |
| 852 | { |
| 853 | std::unique_lock<std::mutex> lk(breakpointMutex_); |
| 854 | breakpointCv_.wait(lk, [this]() { this->ServerThreadReentry(); return !this->isPaused_; }); |
| 855 | } |
| 856 | |
| 857 | Debug("Continuing from breakpoint."); |
| 858 | } |
| 859 | |
| 860 | void Debugger::GlobalBreakpointInServerThread(GlobalBreakpointReason reason) |
| 861 | { |
nothing calls this directly
no test coverage detected