Files
BloomPatched/src/DebugServer/Gdb/DebugSession.hpp

51 lines
1.4 KiB
C++
Raw Normal View History

2022-03-24 19:07:28 +00:00
#pragma once
#include <cstdint>
#include "TargetDescriptor.hpp"
2022-03-27 18:34:08 +01:00
#include "Connection.hpp"
#include "Feature.hpp"
2022-03-24 19:07:28 +00:00
namespace Bloom::DebugServer::Gdb
2022-03-24 19:07:28 +00:00
{
class DebugSession
{
public:
/**
* The connection serving this debug session.
*/
2022-03-24 19:07:28 +00:00
Connection connection;
/**
* A set of all GDB features supported for this debug session, along with any optional values (some GDB
* features can be specified with a value, such as Feature::PACKET_SIZE).
*/
std::set<std::pair<Feature, std::optional<std::string>>> supportedFeatures;
/**
* The GDB target descriptor of the connected target.
*/
const TargetDescriptor& gdbTargetDescriptor;
2022-03-24 19:07:28 +00:00
/**
* When the GDB client is waiting for the target to halt, this is set to true so we know when to notify the
* client.
*/
bool waitingForBreak = false;
DebugSession(
Connection&& connection,
const std::set<std::pair<Feature, std::optional<std::string>>>& supportedFeatures,
const TargetDescriptor& targetDescriptor
);
2022-03-24 19:07:28 +00:00
2022-08-13 03:06:30 +01:00
DebugSession(const DebugSession& other) = delete;
DebugSession(DebugSession&& other) = delete;
DebugSession& operator = (const DebugSession& other) = delete;
DebugSession& operator = (DebugSession&& other) = delete;
~DebugSession();
2022-03-24 19:07:28 +00:00
};
}