2023-09-10 22:27:10 +01:00
|
|
|
#include "VContContinueExecution.hpp"
|
|
|
|
|
|
|
|
|
|
#include "src/DebugServer/Gdb/ResponsePackets/ErrorResponsePacket.hpp"
|
|
|
|
|
|
2024-10-25 23:12:04 +01:00
|
|
|
namespace DebugServer::Gdb::CommandPackets
|
2023-09-10 22:27:10 +01:00
|
|
|
{
|
|
|
|
|
using Services::TargetControllerService;
|
|
|
|
|
|
|
|
|
|
using ResponsePackets::ErrorResponsePacket;
|
|
|
|
|
|
|
|
|
|
using ::Exceptions::Exception;
|
|
|
|
|
|
|
|
|
|
VContContinueExecution::VContContinueExecution(const RawPacket& rawPacket)
|
|
|
|
|
: CommandPacket(rawPacket)
|
|
|
|
|
{}
|
|
|
|
|
|
2024-07-23 21:14:22 +01:00
|
|
|
void VContContinueExecution::handle(
|
2024-10-25 22:22:25 +01:00
|
|
|
DebugSession& debugSession,
|
2024-10-25 23:12:04 +01:00
|
|
|
const TargetDescriptor& gdbTargetDescriptor,
|
2024-07-23 21:14:22 +01:00
|
|
|
const Targets::TargetDescriptor& targetDescriptor,
|
|
|
|
|
TargetControllerService& targetControllerService
|
|
|
|
|
) {
|
2023-09-10 22:27:10 +01:00
|
|
|
Logger::info("Handling VContContinueExecution packet");
|
|
|
|
|
|
|
|
|
|
try {
|
2024-07-23 21:14:22 +01:00
|
|
|
targetControllerService.resumeTargetExecution();
|
2023-09-10 22:27:10 +01:00
|
|
|
debugSession.waitingForBreak = true;
|
|
|
|
|
|
|
|
|
|
} catch (const Exception& exception) {
|
|
|
|
|
Logger::error("Failed to continue execution on target - " + exception.getMessage());
|
2024-07-23 21:14:22 +01:00
|
|
|
debugSession.connection.writePacket(ErrorResponsePacket{});
|
2023-09-10 22:27:10 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|