- 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:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user