Implemented support for breakpoint caching in the GDB server
This commit is contained in:
@@ -2,12 +2,16 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "TargetDescriptor.hpp"
|
||||
#include "GdbDebugServerConfig.hpp"
|
||||
#include "Connection.hpp"
|
||||
#include "Feature.hpp"
|
||||
#include "ProgrammingSession.hpp"
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::DebugServer::Gdb
|
||||
{
|
||||
class DebugSession
|
||||
@@ -29,6 +33,18 @@ namespace Bloom::DebugServer::Gdb
|
||||
*/
|
||||
const TargetDescriptor& gdbTargetDescriptor;
|
||||
|
||||
/**
|
||||
* The current server configuration.
|
||||
*/
|
||||
const GdbDebugServerConfig& serverConfig;
|
||||
|
||||
/**
|
||||
* Internal bookkeeping of breakpoints managed by GDB. These will both remain empty if the user has disabled
|
||||
* breakpoint caching.
|
||||
*/
|
||||
std::unordered_set<Targets::TargetMemoryAddress> breakpointAddresses;
|
||||
std::unordered_set<Targets::TargetMemoryAddress> breakpointAddressesPendingRemoval;
|
||||
|
||||
/**
|
||||
* When the GDB client is waiting for the target to halt, this is set to true so we know when to notify the
|
||||
* client.
|
||||
@@ -53,7 +69,8 @@ namespace Bloom::DebugServer::Gdb
|
||||
DebugSession(
|
||||
Connection&& connection,
|
||||
const std::set<std::pair<Feature, std::optional<std::string>>>& supportedFeatures,
|
||||
const TargetDescriptor& targetDescriptor
|
||||
const TargetDescriptor& targetDescriptor,
|
||||
const GdbDebugServerConfig& serverConfig
|
||||
);
|
||||
|
||||
DebugSession(const DebugSession& other) = delete;
|
||||
|
||||
Reference in New Issue
Block a user