- 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:
@@ -0,0 +1,29 @@
|
||||
#include "VContStepExecution.hpp"
|
||||
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ErrorResponsePacket.hpp"
|
||||
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
using ResponsePackets::ErrorResponsePacket;
|
||||
|
||||
using ::Exceptions::Exception;
|
||||
|
||||
VContStepExecution::VContStepExecution(const RawPacket& rawPacket)
|
||||
: CommandPacket(rawPacket)
|
||||
{}
|
||||
|
||||
void VContStepExecution::handle(Gdb::DebugSession& debugSession, TargetControllerService& targetControllerService) {
|
||||
Logger::info("Handling VContStepExecution packet");
|
||||
|
||||
try {
|
||||
targetControllerService.stepTargetExecution(std::nullopt);
|
||||
debugSession.waitingForBreak = true;
|
||||
|
||||
} catch (const Exception& exception) {
|
||||
Logger::error("Failed to step execution on target - " + exception.getMessage());
|
||||
debugSession.connection.writePacket(ErrorResponsePacket());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user