New debug session class
This commit is contained in:
@@ -128,6 +128,7 @@ add_executable(Bloom
|
||||
src/DebugServers/GdbRsp/GdbRspDebugServer.cpp
|
||||
src/DebugServers/GdbRsp/GdbDebugServerConfig.cpp
|
||||
src/DebugServers/GdbRsp/Connection.cpp
|
||||
src/DebugServers/GdbRsp/DebugSession.cpp
|
||||
src/DebugServers/GdbRsp/CommandPackets/CommandPacket.cpp
|
||||
src/DebugServers/GdbRsp/CommandPackets/CommandPacketFactory.cpp
|
||||
src/DebugServers/GdbRsp/CommandPackets/SupportedFeaturesQuery.cpp
|
||||
|
||||
17
src/DebugServers/GdbRsp/DebugSession.cpp
Normal file
17
src/DebugServers/GdbRsp/DebugSession.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "DebugSession.hpp"
|
||||
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
namespace Bloom::DebugServers::Gdb
|
||||
{
|
||||
using Bloom::Targets::TargetDescriptor;
|
||||
|
||||
DebugSession::DebugSession(const Connection& connection, const TargetDescriptor& targetDescriptor)
|
||||
: connection(connection)
|
||||
, targetDescriptor(targetDescriptor)
|
||||
{}
|
||||
|
||||
void DebugSession::terminate() {
|
||||
this->connection.close();
|
||||
}
|
||||
}
|
||||
27
src/DebugServers/GdbRsp/DebugSession.hpp
Normal file
27
src/DebugServers/GdbRsp/DebugSession.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "Connection.hpp"
|
||||
#include "TargetDescriptor.hpp"
|
||||
|
||||
namespace Bloom::DebugServers::Gdb
|
||||
{
|
||||
class DebugSession
|
||||
{
|
||||
public:
|
||||
Connection connection;
|
||||
|
||||
const TargetDescriptor& targetDescriptor;
|
||||
|
||||
/**
|
||||
* 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(const Connection& connection, const TargetDescriptor& targetDescriptor);
|
||||
|
||||
void terminate();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user