* @brief MainWindow::on_InvestigateProcessButton_clicked - Open the process investigation window for the selected process. */
| 550 | * @brief MainWindow::on_InvestigateProcessButton_clicked - Open the process investigation window for the selected process. |
| 551 | */ |
| 552 | void MainWindow::on_InvestigateProcessButton_clicked() |
| 553 | { |
| 554 | PPROCESS_DETAILED_REQUEST processDetailed; |
| 555 | PROCESS_SIZES_REQUEST processSizes; |
| 556 | int selectedRow; |
| 557 | |
| 558 | if(this->ui->ProcessesTable->selectedItems().size() == 0) |
| 559 | { |
| 560 | return; |
| 561 | } |
| 562 | |
| 563 | // |
| 564 | // Since rows start from 0, we need to subtract |
| 565 | // the row count from the table size to get the |
| 566 | // right index. |
| 567 | // |
| 568 | selectedRow = processes.size() - 1 - this->ui->ProcessesTable->selectedItems()[0]->row(); |
| 569 | |
| 570 | processSizes = communicator.GetProcessSizes(processes[selectedRow].ProcessId, processes[selectedRow].EpochExecutionTime); |
| 571 | processDetailed = communicator.RequestDetailedProcess(processes[selectedRow].ProcessId, processes[selectedRow].EpochExecutionTime, processSizes.ImageSize, processSizes.StackSize); |
| 572 | if (processDetailed == NULL || processDetailed->Populated == FALSE) |
| 573 | { |
| 574 | pmlog("main: Failed to retrieve a detailed process report."); |
| 575 | return; |
| 576 | } |
| 577 | |
| 578 | this->investigatorWindow->UpdateNewProcess(*processDetailed); |
| 579 | free(processDetailed); |
| 580 | this->investigatorWindow->show(); |
| 581 | this->investigatorWindow->RefreshWidgets(); |
| 582 | } |
| 583 | |
| 584 | /** |
| 585 | * @brief MainWindow::on_ProcessSearch_editingFinished - Search for the specified process. |
nothing calls this directly
no test coverage detected