2022-12-24 02:40:57 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
|
|
|
|
#include "InsightWorkerTask.hpp"
|
|
|
|
|
|
|
|
|
|
#include "src/Targets/TargetMemory.hpp"
|
2024-12-24 18:27:59 +00:00
|
|
|
#include "src/Targets/TargetAddressSpaceDescriptor.hpp"
|
|
|
|
|
#include "src/Targets/TargetMemorySegmentDescriptor.hpp"
|
|
|
|
|
|
2022-12-24 02:40:57 +00:00
|
|
|
#include "src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.hpp"
|
|
|
|
|
|
2023-08-13 15:47:51 +01:00
|
|
|
class CaptureMemorySnapshot: public InsightWorkerTask
|
2022-12-24 02:40:57 +00:00
|
|
|
{
|
2023-08-13 15:47:51 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
CaptureMemorySnapshot(
|
|
|
|
|
const QString& name,
|
|
|
|
|
const QString& description,
|
2024-12-24 18:27:59 +00:00
|
|
|
const Targets::TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
|
|
|
|
const Targets::TargetMemorySegmentDescriptor& memorySegmentDescriptor,
|
2023-08-13 15:47:51 +01:00
|
|
|
const std::vector<FocusedMemoryRegion>& focusedRegions,
|
|
|
|
|
const std::vector<ExcludedMemoryRegion>& excludedRegions,
|
|
|
|
|
const std::optional<Targets::TargetMemoryBuffer>& data
|
|
|
|
|
);
|
|
|
|
|
|
2024-12-24 18:27:59 +00:00
|
|
|
[[nodiscard]] QString brief() const override;
|
|
|
|
|
[[nodiscard]] TaskGroups taskGroups() const override;
|
2023-08-13 15:47:51 +01:00
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void memorySnapshotCaptured(MemorySnapshot snapshot);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void run(Services::TargetControllerService& targetControllerService) override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QString name;
|
|
|
|
|
QString description;
|
2024-12-24 18:27:59 +00:00
|
|
|
const Targets::TargetAddressSpaceDescriptor& addressSpaceDescriptor;
|
|
|
|
|
const Targets::TargetMemorySegmentDescriptor& memorySegmentDescriptor;
|
2023-08-13 15:47:51 +01:00
|
|
|
std::vector<FocusedMemoryRegion> focusedRegions;
|
|
|
|
|
std::vector<ExcludedMemoryRegion> excludedRegions;
|
|
|
|
|
|
|
|
|
|
std::optional<Targets::TargetMemoryBuffer> data;
|
|
|
|
|
};
|