2022-03-24 19:06:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
#include "TargetDescriptor.hpp"
|
|
|
|
|
|
2022-03-31 21:52:46 +01:00
|
|
|
#include "src/DebugServer/Gdb/GdbRspDebugServer.hpp"
|
2022-03-24 19:06:09 +00:00
|
|
|
|
2022-03-31 16:05:39 +01:00
|
|
|
namespace Bloom::DebugServer::Gdb::AvrGdb
|
2022-03-24 19:06:09 +00:00
|
|
|
{
|
|
|
|
|
class AvrGdbRsp: public GdbRspDebugServer
|
|
|
|
|
{
|
|
|
|
|
public:
|
2022-03-27 18:32:13 +01:00
|
|
|
AvrGdbRsp(
|
|
|
|
|
const DebugServerConfig& debugServerConfig,
|
2022-04-15 22:05:50 +01:00
|
|
|
EventListener& eventListener,
|
|
|
|
|
EventFdNotifier& eventNotifier
|
2022-03-27 18:32:13 +01:00
|
|
|
);
|
2022-03-24 19:06:09 +00:00
|
|
|
|
|
|
|
|
std::string getName() const override {
|
|
|
|
|
return "AVR GDB Remote Serial Protocol Debug Server";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void init() override;
|
|
|
|
|
|
|
|
|
|
const Gdb::TargetDescriptor& getGdbTargetDescriptor() override {
|
2022-03-25 00:06:56 +00:00
|
|
|
return this->gdbTargetDescriptor.value();
|
2022-03-24 19:06:09 +00:00
|
|
|
}
|
|
|
|
|
|
2022-03-27 19:44:02 +01:00
|
|
|
std::unique_ptr<Gdb::CommandPackets::CommandPacket> resolveCommandPacket(
|
2022-10-01 21:01:37 +01:00
|
|
|
const RawPacket& rawPacket
|
2022-03-27 19:44:02 +01:00
|
|
|
) override;
|
|
|
|
|
|
2022-10-09 13:10:17 +01:00
|
|
|
std::set<std::pair<Feature, std::optional<std::string>>> getSupportedFeatures() override;
|
2022-05-14 22:43:08 +01:00
|
|
|
|
2022-03-24 19:06:09 +00:00
|
|
|
private:
|
2022-03-25 00:06:56 +00:00
|
|
|
std::optional<TargetDescriptor> gdbTargetDescriptor;
|
2022-03-24 19:06:09 +00:00
|
|
|
};
|
|
|
|
|
}
|