Files
UnrealEngineUWP/Engine/Source/Developer/Windows/LiveCodingServer/Public/ILiveCodingServer.h
Ben Marsh 7ad04edd54 Live Coding: Fix crashes when patching adaptive non-unity files in game modules containing static global variables.
Live++ reads object files at startup for game modules, and assigns unique ids to each compiland (used to disambiguate static variables). When compiling the patch, these compilands are modified to reference a unique id for the unity blob, causing the variables to be reconstructed.

Solution is to generate a JSON file to each output directory containing object files containing the mapping, and to use that to assign compiland ids at startup.

#rb none
#jira UE-74036

[CL 6455253 by Ben Marsh in 4.22 branch]
2019-05-14 18:11:40 -04:00

63 lines
1.8 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreTypes.h"
#include "Containers/Map.h"
#include "Features/IModularFeature.h"
#include "Delegates/Delegate.h"
#define LIVE_CODING_SERVER_FEATURE_NAME "LiveCodingServer"
enum class ELiveCodingResult
{
Success,
Error
};
enum class ELiveCodingLogVerbosity
{
Info,
Success,
Warning,
Failure,
};
class ILiveCodingServer : public IModularFeature
{
public:
virtual void Start(const wchar_t* ProcessGroupName) = 0;
virtual void Stop() = 0;
virtual void SetLinkerPath(const wchar_t* LinkerPath, const TMap<FString, FString>& LinkerEnvironment) = 0;
DECLARE_DELEGATE(FBringToFrontDelegate);
virtual FBringToFrontDelegate& GetBringToFrontDelegate() = 0;
DECLARE_DELEGATE(FClearOutputDelegate);
virtual FClearOutputDelegate& GetClearOutputDelegate() = 0;
DECLARE_DELEGATE_OneParam(FStatusChangeDelegate, const wchar_t*);
virtual FStatusChangeDelegate& GetStatusChangeDelegate() = 0;
DECLARE_DELEGATE_TwoParams(FLogOutputDelegate, ELiveCodingLogVerbosity, const wchar_t*);
virtual FLogOutputDelegate& GetLogOutputDelegate() = 0;
typedef TMap<FString, TArray<FString>> FModuleToObjectFiles;
DECLARE_DELEGATE_RetVal_TwoParams(bool, FCompileDelegate, const TArray<FString>&, FModuleToObjectFiles&)
virtual FCompileDelegate& GetCompileDelegate() = 0;
DECLARE_DELEGATE(FCompileStartedDelegate);
virtual FCompileStartedDelegate& GetCompileStartedDelegate() = 0;
DECLARE_DELEGATE_TwoParams(FCompileFinishedDelegate, ELiveCodingResult, const wchar_t*);
virtual FCompileFinishedDelegate& GetCompileFinishedDelegate() = 0;
DECLARE_DELEGATE(FShowConsoleDelegate);
virtual FShowConsoleDelegate& GetShowConsoleDelegate() = 0;
DECLARE_DELEGATE_OneParam(FSetVisibleDelegate, bool);
virtual FSetVisibleDelegate& GetSetVisibleDelegate() = 0;
};