Used target memory aliases in TDF structs

This commit is contained in:
Nav
2024-03-15 18:45:48 +00:00
parent cbdb1e27e4
commit 64af03c101
3 changed files with 10 additions and 11 deletions

View File

@@ -1,6 +1,5 @@
#pragma once
#include <cstdint>
#include <string>
#include <optional>
#include <map>
@@ -15,15 +14,15 @@ namespace Targets::TargetDescription
struct AddressSpace
{
std::string key;
std::uint32_t startAddress;
std::uint32_t size;
TargetMemoryAddress startAddress;
TargetMemorySize size;
std::optional<TargetMemoryEndianness> endianness;
std::map<std::string, MemorySegment, std::less<void>> memorySegmentsByKey;
AddressSpace(
const std::string& key,
std::uint32_t startAddress,
std::uint32_t size,
TargetMemoryAddress startAddress,
TargetMemorySize size,
const std::optional<TargetMemoryEndianness>& endianness,
const std::map<std::string, MemorySegment, std::less<void>>& memorySegmentsByKey
)

View File

@@ -1,6 +1,5 @@
#pragma once
#include <cstdint>
#include <optional>
#include "src/Targets/TargetMemorySegmentType.hpp"

View File

@@ -1,6 +1,5 @@
#pragma once
#include <cstdint>
#include <string>
#include <map>
#include <optional>
@@ -8,6 +7,8 @@
#include <functional>
#include <ranges>
#include "src/Targets/TargetMemory.hpp"
#include "src/Services/StringService.hpp"
#include "Exceptions/InvalidTargetDescriptionDataException.hpp"
@@ -17,15 +18,15 @@ namespace Targets::TargetDescription
{
std::string key;
std::string name;
std::uint32_t startAddress;
std::uint32_t size;
TargetMemoryAddress startAddress;
TargetMemorySize size;
std::map<std::string, MemorySegmentSection, std::less<void>> subSectionsByKey;
MemorySegmentSection(
const std::string& key,
const std::string& name,
std::uint32_t startAddress,
std::uint32_t size,
TargetMemoryAddress startAddress,
TargetMemorySize size,
const std::map<std::string, MemorySegmentSection, std::less<void>>& subSectionsByKey
)
: key(key)