Use embedded debug information for C# dll to have proper stack trace information on game scripts exceptions

This commit is contained in:
Wojciech Figat
2023-01-03 18:38:44 +01:00
parent 06b2bf0094
commit 26f8e5aa9e
6 changed files with 47 additions and 80 deletions

View File

@@ -1,27 +1,22 @@
#include "CoreCLR.h"
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
#include "CoreCLR.h"
#include "Engine/Core/Log.h"
#include "Engine/Platform/Platform.h"
#include "Engine/Platform/FileSystem.h"
#include "Engine/Core/Types/DateTime.h"
#include "Engine/Debug/DebugLog.h"
#include "Engine/Core/Collections/Dictionary.h"
#include <nethost.h>
#include <coreclr_delegates.h>
#include <hostfxr.h>
#if PLATFORM_WINDOWS
#include <combaseapi.h> // CoTask*
#include <combaseapi.h>
#undef SetEnvironmentVariable
#undef LoadLibrary
#endif
#if COMPILE_WITH_PROFILER
#endif
static Dictionary<String, void*> cachedFunctions;
static String assemblyName = TEXT("FlaxEngine.CSharp");
#if PLATFORM_WINDOWS
static const char_t* typeName = TEXT("FlaxEngine.NativeInterop, FlaxEngine.CSharp");
#else
@@ -42,7 +37,6 @@ bool CoreCLR::LoadHostfxr(const String& library_path_)
{
const FLAX_CORECLR_STRING& library_path = FLAX_CORECLR_STRING(library_path_);
char_t hostfxrPath[1024];
size_t hostfxrPathSize = sizeof(hostfxrPath) / sizeof(char_t);