diff --git a/src/Insight/InsightWorker/Tasks/CaptureMemorySnapshot.cpp b/src/Insight/InsightWorker/Tasks/CaptureMemorySnapshot.cpp index f6cdfd35..815b1bb4 100644 --- a/src/Insight/InsightWorker/Tasks/CaptureMemorySnapshot.cpp +++ b/src/Insight/InsightWorker/Tasks/CaptureMemorySnapshot.cpp @@ -82,6 +82,7 @@ namespace Bloom this->memoryType, std::move(*this->data), targetControllerService.getProgramCounter(), + targetControllerService.getStackPointer(), std::move(this->focusedRegions), std::move(this->excludedRegions) ); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.cpp index 07a4cef7..dc62146b 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.cpp @@ -14,6 +14,7 @@ namespace Bloom Targets::TargetMemoryType memoryType, const Targets::TargetMemoryBuffer& data, Targets::TargetProgramCounter programCounter, + Targets::TargetStackPointer stackPointer, const std::vector& focusedRegions, const std::vector& excludedRegions ) @@ -22,6 +23,7 @@ namespace Bloom , memoryType(memoryType) , data(data) , programCounter(programCounter) + , stackPointer(stackPointer) , focusedRegions(focusedRegions) , excludedRegions(excludedRegions) {} @@ -36,6 +38,7 @@ namespace Bloom || !jsonObject.contains("memoryType") || !jsonObject.contains("hexData") || !jsonObject.contains("programCounter") + || !jsonObject.contains("stackPointer") || !jsonObject.contains("createdTimestamp") || !jsonObject.contains("focusedRegions") || !jsonObject.contains("excludedRegions") @@ -48,6 +51,7 @@ namespace Bloom this->description = jsonObject.find("description")->toString(); this->memoryType = EnumToStringMappings::targetMemoryTypes.at(jsonObject.find("memoryType")->toString()); this->programCounter = static_cast(jsonObject.find("programCounter")->toInteger()); + this->stackPointer = static_cast(jsonObject.find("stackPointer")->toInteger()); this->createdDate.setSecsSinceEpoch(jsonObject.find("createdTimestamp")->toInteger()); const auto hexData = QByteArray::fromHex(jsonObject.find("hexData")->toString().toUtf8()); @@ -97,6 +101,7 @@ namespace Bloom static_cast(this->data.size()) ).toHex())}, {"programCounter", static_cast(this->programCounter)}, + {"stackPointer", static_cast(this->stackPointer)}, {"createdTimestamp", this->createdDate.toSecsSinceEpoch()}, {"focusedRegions", focusedRegions}, {"excludedRegions", excludedRegions}, diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.hpp index 4c50a02d..a2e14061 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/MemorySnapshot.hpp @@ -24,6 +24,7 @@ namespace Bloom Targets::TargetMemoryType memoryType; Targets::TargetMemoryBuffer data; Targets::TargetProgramCounter programCounter; + Targets::TargetStackPointer stackPointer; QDateTime createdDate = Services::DateTimeService::currentDateTime(); std::vector focusedRegions; @@ -35,6 +36,7 @@ namespace Bloom Targets::TargetMemoryType memoryType, const Targets::TargetMemoryBuffer& data, Targets::TargetProgramCounter programCounter, + Targets::TargetStackPointer stackPointer, const std::vector& focusedRegions, const std::vector& excludedRegions ); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotViewer/SnapshotViewer.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotViewer/SnapshotViewer.cpp index d3c59337..978d758e 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotViewer/SnapshotViewer.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/SnapshotViewer/SnapshotViewer.cpp @@ -186,6 +186,7 @@ namespace Bloom::Widgets void SnapshotViewer::onHexViewerReady() { this->hexViewerWidget->addExternalContextMenuAction(this->restoreBytesAction); + this->hexViewerWidget->setStackPointer(this->snapshot.stackPointer); } void SnapshotViewer::restoreSelectedBytes(