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

View File

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

View File

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