- Implemented support for range stepping with GDB (vCont... packets)

- Refactored some bits of the generic GDB server class, along with the AVR-specific implementation
This commit is contained in:
Nav
2023-09-10 22:27:10 +01:00
parent 1d0f30db7a
commit 7d4ce1050f
42 changed files with 901 additions and 103 deletions

View File

@@ -3,6 +3,7 @@
#include <cstdint>
#include "TargetDescriptor.hpp"
#include "DebugSession.hpp"
#include "src/DebugServer/Gdb/GdbRspDebugServer.hpp"
@@ -22,19 +23,37 @@ namespace DebugServer::Gdb::AvrGdb
}
protected:
void init() override;
DebugSession* startDebugSession(Connection&& connection) override;
const Gdb::TargetDescriptor& getGdbTargetDescriptor() override {
return this->gdbTargetDescriptor.value();
}
void endDebugSession() override;
const Gdb::TargetDescriptor& getGdbTargetDescriptor() override;
DebugSession* getActiveDebugSession() override;
std::unique_ptr<Gdb::CommandPackets::CommandPacket> resolveCommandPacket(
const RawPacket& rawPacket
) override;
std::set<std::pair<Feature, std::optional<std::string>>> getSupportedFeatures() override;
/**
* Should return a set of GDB features supported by the AVR GDB server. Each supported feature may come with an
* optional value.
*
* The set of features returned by this function will be stored against the active debug session object.
*
* @return
*/
std::set<std::pair<Feature, std::optional<std::string>>> getSupportedFeatures();
void handleTargetStoppedGdbResponse(Targets::TargetProgramCounter programAddress) override;
private:
std::optional<TargetDescriptor> gdbTargetDescriptor;
TargetDescriptor gdbTargetDescriptor;
/**
* When a connection with a GDB client is established, a new instance of the DebugSession class is created and
* held here. A value of std::nullopt means there is no active debug session present.
*/
std::optional<DebugSession> activeDebugSession;
};
}