Files
BloomPatched/src/DebugServer/Gdb/CommandPackets/SupportedFeaturesQuery.hpp

41 lines
1.4 KiB
C++
Raw Normal View History

2021-04-04 21:04:12 +01:00
#pragma once
#include <string>
#include <set>
#include "CommandPacket.hpp"
#include "../Feature.hpp"
namespace Bloom::DebugServer::Gdb::CommandPackets
2021-04-04 21:04:12 +01:00
{
/**
* The SupportedFeaturesQuery command packet is a query from the GDB client, requesting a list of GDB features
* supported by the GDB server. The body of this packet also contains a list GDB features that are supported or
* unsupported by the GDB client.
*
* The command packet is identified by its 'qSupported' prefix in the command packet data. Following the prefix is
* a list of GDB features that are supported/unsupported by the client. For more info on this command
* packet, see the GDP RSP documentation.
*
* Responses to this command packet should take the form of a ResponsePackets::SupportedFeaturesResponse.
*/
class SupportedFeaturesQuery: public CommandPacket
{
public:
2022-04-08 23:39:51 +01:00
explicit SupportedFeaturesQuery(const RawPacketType& rawPacket);
2021-04-04 21:04:12 +01:00
[[nodiscard]] bool isFeatureSupported(const Feature& feature) const {
2021-04-04 21:04:12 +01:00
return this->supportedFeatures.find(feature) != this->supportedFeatures.end();
}
[[nodiscard]] const std::set<Feature>& getSupportedFeatures() const {
2021-04-04 21:04:12 +01:00
return this->supportedFeatures;
}
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
private:
std::set<Feature> supportedFeatures;
2021-04-04 21:04:12 +01:00
};
}