From 83c5065faaec5b77ec74cac99e5aad651c269d52 Mon Sep 17 00:00:00 2001 From: Nav Date: Thu, 11 Nov 2021 19:06:28 +0000 Subject: [PATCH] New insight worker task for fetching the current stack pointer --- CMakeLists.txt | 1 + .../InsightWorker/Tasks/ReadStackPointer.cpp | 7 +++++++ .../InsightWorker/Tasks/ReadStackPointer.hpp | 20 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 src/Insight/InsightWorker/Tasks/ReadStackPointer.cpp create mode 100644 src/Insight/InsightWorker/Tasks/ReadStackPointer.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index a1a8c6ef..bf0335e5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,7 @@ add_executable(Bloom src/Insight/InsightWorker/Tasks/RefreshTargetPinStates.cpp src/Insight/InsightWorker/Tasks/SetTargetPinState.cpp src/Insight/InsightWorker/Tasks/ReadTargetMemory.cpp + src/Insight/InsightWorker/Tasks/ReadStackPointer.cpp src/Insight/InsightWorker/Tasks/QueryLatestVersionNumber.cpp # Error dialogue window diff --git a/src/Insight/InsightWorker/Tasks/ReadStackPointer.cpp b/src/Insight/InsightWorker/Tasks/ReadStackPointer.cpp new file mode 100644 index 00000000..e99543cc --- /dev/null +++ b/src/Insight/InsightWorker/Tasks/ReadStackPointer.cpp @@ -0,0 +1,7 @@ +#include "ReadStackPointer.hpp" + +using namespace Bloom; + +void ReadStackPointer::run(TargetControllerConsole& targetControllerConsole) { + emit this->stackPointerRead(targetControllerConsole.getStackPointer()); +} diff --git a/src/Insight/InsightWorker/Tasks/ReadStackPointer.hpp b/src/Insight/InsightWorker/Tasks/ReadStackPointer.hpp new file mode 100644 index 00000000..65cf9e06 --- /dev/null +++ b/src/Insight/InsightWorker/Tasks/ReadStackPointer.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "InsightWorkerTask.hpp" + +namespace Bloom +{ + class ReadStackPointer: public InsightWorkerTask + { + Q_OBJECT + + public: + ReadStackPointer(): InsightWorkerTask() {} + + signals: + void stackPointerRead(std::uint32_t stackPointer); + + protected: + void run(TargetControllerConsole& targetControllerConsole) override; + }; +}