MCPcopy Create free account
hub / github.com/Vector35/debugger / performAttachPID

Method performAttachPID

ui/controlswidget.cpp:161–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160
161void 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
188void DebugControlsWidget::performRestart()

Callers

nothing calls this directly

Calls 3

GetSelectedPidMethod · 0.45
SetPIDAttachMethod · 0.45
AttachMethod · 0.45

Tested by

no test coverage detected