From 7785dd1b56c66b069c1a6bccc901a42d70e94787 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Wed, 19 Dec 2018 00:23:38 +0100 Subject: [PATCH] - fix linking and some linux things --- src/CMakeLists.txt | 4 ++-- src/scripting/vm/jit_runtime.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5e6a115195..6d39692e51 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -115,7 +115,8 @@ if( WIN32 ) comdlg32 ws2_32 setupapi - oleaut32 ) + oleaut32 + dbghelp ) if( NOT ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) set( ZDOOM_LIBS ${ZDOOM_LIBS} DelayImp ) @@ -125,7 +126,6 @@ if( WIN32 ) if( DX_dxguid_LIBRARY ) list( APPEND ZDOOM_LIBS "${DX_dxguid_LIBRARY}" ) endif() - set( ZDOOM_LIBS ${ZDOOM_LIBS} libdbghelp.a ) endif() else() if( APPLE ) diff --git a/src/scripting/vm/jit_runtime.cpp b/src/scripting/vm/jit_runtime.cpp index 80c1fa7b2f..4cca847e61 100644 --- a/src/scripting/vm/jit_runtime.cpp +++ b/src/scripting/vm/jit_runtime.cpp @@ -771,6 +771,8 @@ void *AddJitFunction(asmjit::CodeHolder* code, JitCompiler *compiler) #endif } + JitDebugInfo.Push({ compiler->GetScriptFunction()->PrintableName, compiler->GetScriptFunction()->SourceFileName, startaddr, endaddr }); + return p; } #endif @@ -850,7 +852,6 @@ static int CaptureStackTrace(int max_frames, void **out_frames) } #ifdef WIN32 -#pragma comment(lib, "dbghelp.lib") class NativeSymbolResolver { public: @@ -897,7 +898,7 @@ public: { FString s; char **strings; - void **frames; + void *frames[1] = { frame }; strings = backtrace_symbols(frames, 1); // Decode the strings