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"
|
2022-03-24 19:07:28 +00:00
|
|
|
|
2022-03-31 16:05:39 +01:00
|
|
|
namespace Bloom::DebugServer::Gdb
|
2022-03-24 19:07:28 +00:00
|
|
|
{
|
|
|
|
|
class DebugSession
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Connection connection;
|
|
|
|
|
|
2022-05-04 19:49:18 +01:00
|
|
|
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;
|
|
|
|
|
|
2022-03-28 01:04:14 +01:00
|
|
|
DebugSession(Connection&& connection, const TargetDescriptor& targetDescriptor);
|
2022-03-24 19:07:28 +00:00
|
|
|
|
|
|
|
|
void terminate();
|
|
|
|
|
};
|
|
|
|
|
}
|