2022-12-24 02:40:57 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
|
|
|
|
#include "InsightWorkerTask.hpp"
|
|
|
|
|
|
|
|
|
|
#include "src/Targets/TargetMemory.hpp"
|
|
|
|
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.hpp"
|
|
|
|
|
|
|
|
|
|
namespace Bloom
|
|
|
|
|
{
|
|
|
|
|
class CaptureMemorySnapshot: public InsightWorkerTask
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
CaptureMemorySnapshot(
|
|
|
|
|
const QString& name,
|
|
|
|
|
const QString& description,
|
|
|
|
|
Targets::TargetMemoryType memoryType,
|
|
|
|
|
const std::vector<FocusedMemoryRegion>& focusedRegions,
|
|
|
|
|
const std::vector<ExcludedMemoryRegion>& excludedRegions,
|
|
|
|
|
const std::optional<Targets::TargetMemoryBuffer>& data
|
|
|
|
|
);
|
|
|
|
|
|
2023-03-15 20:15:05 +00:00
|
|
|
TaskGroups taskGroups() const override {
|
2022-12-28 15:54:53 +00:00
|
|
|
return TaskGroups({
|
|
|
|
|
TaskGroup::USES_TARGET_CONTROLLER,
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-24 02:40:57 +00:00
|
|
|
signals:
|
|
|
|
|
void memorySnapshotCaptured(MemorySnapshot snapshot);
|
|
|
|
|
|
|
|
|
|
protected:
|
2022-12-26 21:27:19 +00:00
|
|
|
void run(Services::TargetControllerService& targetControllerService) override;
|
2022-12-24 02:40:57 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QString name;
|
|
|
|
|
QString description;
|
|
|
|
|
Targets::TargetMemoryType memoryType;
|
|
|
|
|
std::vector<FocusedMemoryRegion> focusedRegions;
|
|
|
|
|
std::vector<ExcludedMemoryRegion> excludedRegions;
|
|
|
|
|
|
|
|
|
|
std::optional<Targets::TargetMemoryBuffer> data;
|
|
|
|
|
};
|
|
|
|
|
}
|