2021-04-04 21:04:12 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
2023-09-20 23:37:54 +01:00
|
|
|
#include <optional>
|
2023-09-23 21:50:04 +01:00
|
|
|
#include <cassert>
|
2021-04-04 21:04:12 +01:00
|
|
|
|
2022-09-06 17:16:49 +01:00
|
|
|
#include "TargetMemory.hpp"
|
2024-12-05 23:09:01 +00:00
|
|
|
#include "TargetAddressSpaceDescriptor.hpp"
|
|
|
|
|
#include "TargetMemorySegmentDescriptor.hpp"
|
2022-09-06 17:16:49 +01:00
|
|
|
|
2023-08-13 15:47:51 +01:00
|
|
|
namespace Targets
|
2021-04-04 21:04:12 +01:00
|
|
|
{
|
2023-09-20 23:37:54 +01:00
|
|
|
enum class TargetBreakCause: std::uint8_t
|
2021-04-04 21:04:12 +01:00
|
|
|
{
|
|
|
|
|
BREAKPOINT,
|
|
|
|
|
UNKNOWN,
|
|
|
|
|
};
|
|
|
|
|
|
2024-12-05 23:09:01 +00:00
|
|
|
struct TargetProgramBreakpoint
|
2021-04-04 21:04:12 +01:00
|
|
|
{
|
2023-09-20 23:37:54 +01:00
|
|
|
enum class Type: std::uint8_t
|
|
|
|
|
{
|
|
|
|
|
HARDWARE,
|
|
|
|
|
SOFTWARE,
|
|
|
|
|
};
|
|
|
|
|
|
2024-12-05 23:09:01 +00:00
|
|
|
const TargetAddressSpaceDescriptor& addressSpaceDescriptor;
|
|
|
|
|
const TargetMemorySegmentDescriptor& memorySegmentDescriptor;
|
|
|
|
|
TargetMemoryAddress address;
|
|
|
|
|
TargetMemorySize size;
|
|
|
|
|
Type type;
|
2023-09-20 23:37:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct BreakpointResources
|
|
|
|
|
{
|
2024-12-05 23:09:01 +00:00
|
|
|
std::uint32_t hardwareBreakpoints = 0;
|
|
|
|
|
std::uint32_t softwareBreakpoints = 0;
|
|
|
|
|
std::uint32_t reservedHardwareBreakpoints = 0;
|
2021-04-04 21:04:12 +01:00
|
|
|
};
|
|
|
|
|
}
|