Files
BloomPatched/src/TargetController/Commands/GetState.hpp
Nav c4bcf71424 Replaced static TargetController state object access with new GetState command
This corrects a bug where the DebugServer checks if the TargetController is in
service just before it's about to suspend. The DebugServer then attempts to start
a new debug session, only for the TargetController to go into a suspended state.
A fatal error occurs and a shutdown follows. This bug is only apparent when
the user stops and starts debug sessions very quickly, with releasePostDebugSession
set to true.
2022-08-14 17:44:52 +01:00

30 lines
692 B
C++

#pragma once
#include "Command.hpp"
#include "src/TargetController/Responses/State.hpp"
namespace Bloom::TargetController::Commands
{
class GetState: public Command
{
public:
using SuccessResponseType = Responses::State;
static constexpr CommandType type = CommandType::GET_STATE;
static inline const std::string name = "GetState";
[[nodiscard]] CommandType getType() const override {
return GetState::type;
}
[[nodiscard]] bool requiresActiveState() const override {
return false;
}
[[nodiscard]] bool requiresDebugMode() const override {
return false;
}
};
}