Files
UnrealEngineUWP/Engine/Source/Developer/Windows/LiveCodingServer/Private/External/LC_RelocationPatcher.h
Tim Smith 5fb833c5c1 Added support for more arbitrary property changes to live coding.
1) Changed the pre/post compile notifications from module notifications to process commands.
2) Added server command to notify that we want re-instance patching (two phase)
3) Added support for two phase patching to enable re-instancing without all the limitations.
4) Added a null CDO check for old blueprint classes (approved by Phillip)

#rb ben.marsh
#rnx
#preflight 6086e3481046fb000183c2d4

[CL 16115620 by Tim Smith in ue5-main branch]
2021-04-26 12:49:25 -04:00

87 lines
1.7 KiB
C++

// Copyright 2011-2020 Molecular Matters GmbH, all rights reserved.
#pragma once
// BEGIN EPIC MOD
#include "CoreTypes.h"
// END EPIC MOD
#include "LC_Coff.h"
#include "LC_Symbols.h"
#include "LC_ModuleCache.h"
#include "LC_ProcessTypes.h"
namespace relocations
{
struct Record
{
coff::Relocation::Type::Enum relocationType;
uint16_t patchIndex;
uint32_t newModuleRva;
union Data
{
struct RelativeRelocation
{
uint32_t originalModuleRva;
} relativeRelocation;
struct SectionRelativeRelocation
{
uint32_t sectionRelativeRva;
} sectionRelativeRelocation;
struct VA32Relocation
{
uint32_t originalModuleRva;
} va32Relocation;
struct RVA32Relocation
{
uint32_t originalModuleRva;
} rva32Relocation;
struct VA64Relocation
{
uint32_t originalModuleRva;
} va64Relocation;
} data;
};
bool WouldPatchRelocation(const ImmutableString& dstSymbolName);
bool WouldPatchRelocation
(
const coff::Relocation* relocation,
const coff::CoffDB* coffDb,
const ImmutableString& srcSymbolName,
const ModuleCache::FindSymbolData& originalData
);
Record PatchRelocation
(
const coff::Relocation* relocation,
const coff::CoffDB* coffDb,
const types::StringSet& forceRelocationSymbols,
const ModuleCache* moduleCache,
const ImmutableString& srcSymbolName,
const ImmutableString& dstSymbolName,
const symbols::Symbol* srcSymbol,
size_t newModuleIndex,
void* newModuleBases[]
// BEGIN EPIC MOD
, bool forceBackwards
// END EPIC MOD
);
void PatchRelocation
(
const Record& record,
Process::Handle processHandle,
void* processModuleBases[],
void* newModuleBase
);
bool IsValidRecord(const Record& record);
};