Adds an optional SetMemoryBase CodeLoader function

This is necessary for the code loader to know where the memory base is
for unified memory
This commit is contained in:
Ryan Houdek authored and Stefanos Kornilios Mitsis Poiitidis committed 2020-03-06 07:56:16 +02:00
1 parent 0eb5e2b332
commit 692a93c604
1 file changed
+6
+6
View File
@@ -38,6 +38,12 @@ public:
virtual void GetInitLocations(std::vector<uint64_t> *Locations) {}
virtual uint64_t InitializeThreadSlot(std::function<void(void const*, uint64_t)> Writer) const { return 0; };
/**
* @brief Lets the core tell the CodeLoader where the virtual memory region starts and if we are running in an environment
* where host and guest code is unified in a single address space
*/
virtual void SetMemoryBase(uint64_t Base, bool Unified) {}
using MemoryLayout = std::tuple<uint64_t, uint64_t, uint64_t>;
/**
* @brief Gets the default memory layout of the memory object being loaded