| 159 | |
| 160 | |
| 161 | void DebugControlsWidget::performAttachPID() |
| 162 | { |
| 163 | AttachProcessDialog dialog(this, m_controller); |
| 164 | if (dialog.exec() != QDialog::Accepted) |
| 165 | return; |
| 166 | |
| 167 | uint32_t pid = dialog.GetSelectedPid(); |
| 168 | if (pid == 0) |
| 169 | return; |
| 170 | |
| 171 | m_controller->SetPIDAttach(pid); |
| 172 | QString text = QString( |
| 173 | "The debugger is %1 the target and preparing the debugger binary view. \n" |
| 174 | "This might take a while.").arg("attaching to"); |
| 175 | ProgressTask* task = |
| 176 | new ProgressTask(this, "Attaching", text, "", [=](std::function<bool(size_t, size_t)> progress) { |
| 177 | m_controller->Attach(); |
| 178 | |
| 179 | // For now, this cant be canceled, as the Debugger model wasn't |
| 180 | // designed with that in mind. This function below can return false if canceling is enabled |
| 181 | progress(1, 1); |
| 182 | return; |
| 183 | }); |
| 184 | task->wait(); |
| 185 | } |
| 186 | |
| 187 | |
| 188 | void DebugControlsWidget::performRestart() |
nothing calls this directly
no test coverage detected