Skip to content

Commit b6800aa

Browse files
committed
xrCore: fix linux linkage
1 parent 525a775 commit b6800aa

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/xrCore/xrDebug.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ void xrDebug::GatherInfo(char* assertionInfo, size_t bufferSize, const ErrorLoca
413413
#ifdef USE_OWN_ERROR_MESSAGE_WINDOW
414414
buffer += xr_sprintf(buffer, bufferSize, "stack trace:\n\n");
415415
#endif // USE_OWN_ERROR_MESSAGE_WINDOW
416+
#if defined(WINDOWS)
416417
xr_vector<xr_string> stackTrace = BuildStackTrace();
417418
for (size_t i = 2; i < stackTrace.size(); i++)
418419
{
@@ -422,6 +423,7 @@ void xrDebug::GatherInfo(char* assertionInfo, size_t bufferSize, const ErrorLoca
422423
buffer += xr_sprintf(buffer, bufferSize, "%s\n", stackTrace[i].c_str());
423424
#endif // USE_OWN_ERROR_MESSAGE_WINDOW
424425
}
426+
#endif
425427
if (shared_str_initialized)
426428
FlushLog();
427429
os_clipboard::copy_to_clipboard(assertionInfo);
@@ -836,7 +838,9 @@ void xrDebug::Initialize(const bool& dedicated)
836838
{
837839
*BugReportFile = 0;
838840
OnThreadSpawn();
841+
#ifdef USE_BUG_TRAP
839842
SetupExceptionHandler(dedicated);
843+
#endif
840844
// exception handler to all "unhandled" exceptions
841845
#if defined(WINDOWS)
842846
PrevFilter = ::SetUnhandledExceptionFilter(UnhandledFilter);

src/xrCore/xrDebug.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,16 @@ class XRCORE_API xrDebug
8585
static int ShowMessage(pcstr title, pcstr message, bool simple = true);
8686

8787
static void LogStackTrace(const char* header);
88+
#if defined(WINDOWS)
8889
static xr_vector<xr_string> BuildStackTrace(u16 maxFramesCount = 512);
90+
#endif
8991
private:
9092
static bool symEngineInitialized;
9193
static Lock dbgHelpLock;
9294
static void FormatLastError(char* buffer, const size_t& bufferSize);
95+
#ifdef USE_BUG_TRAP
9396
static void SetupExceptionHandler(const bool& dedicated);
97+
#endif
9498
static LONG WINAPI UnhandledFilter(EXCEPTION_POINTERS* exPtrs);
9599
static void WINAPI PreErrorHandler(INT_PTR);
96100
static void SaveMiniDump(EXCEPTION_POINTERS* exPtrs);

0 commit comments

Comments
 (0)