2021-04-04 21:04:12 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
|
|
|
|
#include "CommandPacket.hpp"
|
|
|
|
|
|
2022-03-31 16:05:39 +01:00
|
|
|
namespace Bloom::DebugServer::Gdb::CommandPackets
|
2021-04-04 21:04:12 +01:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The ContinueExecution class implements a structure for "c" packets. These packets instruct the server
|
|
|
|
|
* to continue execution on the target.
|
|
|
|
|
*
|
|
|
|
|
* See @link https://sourceware.org/gdb/onlinedocs/gdb/Packets.html#Packets for more on this.
|
|
|
|
|
*/
|
|
|
|
|
class ContinueExecution: public CommandPacket
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/**
|
2022-04-03 16:59:14 +01:00
|
|
|
* The "c" packet can contain an address which specifies the point from which the execution should be resumed on
|
2021-04-04 21:04:12 +01:00
|
|
|
* the target.
|
|
|
|
|
*
|
2022-04-03 16:59:14 +01:00
|
|
|
* Although the packet *can* contain this address, it is not required, hence the std::optional type.
|
2021-04-04 21:04:12 +01:00
|
|
|
*/
|
|
|
|
|
std::optional<std::uint32_t> fromProgramCounter;
|
|
|
|
|
|
2021-06-22 23:52:31 +01:00
|
|
|
explicit ContinueExecution(const std::vector<unsigned char>& rawPacket): CommandPacket(rawPacket) {
|
2021-04-04 21:04:12 +01:00
|
|
|
init();
|
2021-05-31 00:03:57 +01:00
|
|
|
}
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2022-03-24 19:17:41 +00:00
|
|
|
void handle(DebugSession& debugSession, TargetControllerConsole& targetControllerConsole) override;
|
2021-10-06 21:12:31 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void init();
|
2021-04-04 21:04:12 +01:00
|
|
|
};
|
|
|
|
|
}
|