| 1004 | } |
| 1005 | |
| 1006 | void DAPDebugger::handleFrames(const StackFrames &stackFrames) |
| 1007 | { |
| 1008 | d->stackModel.setFrames(stackFrames); |
| 1009 | |
| 1010 | auto curFrame = d->stackModel.currentFrame(); |
| 1011 | if (curFrame.line == -1) { |
| 1012 | // none of frame in model. |
| 1013 | return; |
| 1014 | } |
| 1015 | |
| 1016 | //frame changed reset localsmodel |
| 1017 | if (d->currentValidFrame.function != curFrame.function || d->currentValidFrame.module != curFrame.module) |
| 1018 | d->localsModel.clear(); |
| 1019 | d->currentValidFrame = curFrame; |
| 1020 | |
| 1021 | if (d->getLocalsFuture.isRunning()) |
| 1022 | d->getLocalsFuture.cancel(); |
| 1023 | |
| 1024 | // update local variables. |
| 1025 | d->processingVariablesTimer.start(50); // if processing time < 50ms, do not show spinner |
| 1026 | d->processingVariablesCount.ref(); |
| 1027 | d->getLocalsFuture = QtConcurrent::run([=]() { |
| 1028 | IVariables locals; |
| 1029 | getLocals(curFrame.frameId, &locals); |
| 1030 | d->localsModel.clearHighlightItems(); |
| 1031 | d->localsModel.setDatas(locals); |
| 1032 | d->processingVariablesCount.deref(); |
| 1033 | updateWatchingVariables(); |
| 1034 | |
| 1035 | emit processingVariablesDone(); |
| 1036 | }); |
| 1037 | } |
| 1038 | |
| 1039 | void DAPDebugger::updateThreadList(int curr, const dap::array<dap::Thread> &threads) |
| 1040 | { |
nothing calls this directly
no test coverage detected