| 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 | { |
nothing calls this directly
no test coverage detected