From 87d317c0f712ded3670881250687b20652b0dd46 Mon Sep 17 00:00:00 2001 From: DepressedTWM Date: Mon, 1 Jun 2026 09:26:48 -0400 Subject: [PATCH] Added stacktrace info in crashlogs --- CMakeLists.txt | 2 +- src/meow.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f5f396..56d6dc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,7 +314,7 @@ source_group("Binding Source" FILES ${BINDING_SOURCE} ${BINDING_HEADERS}) ## Setup main executable ## -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 23) add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32 ${MAIN_HEADERS} diff --git a/src/meow.cpp b/src/meow.cpp index 800704f..2e2b6b9 100644 --- a/src/meow.cpp +++ b/src/meow.cpp @@ -24,6 +24,8 @@ #include #include +#include + #ifdef __LINUX__ #include #include "xdg-user-dir-lookup.h" @@ -66,6 +68,8 @@ void crash(const char* reason, Exception::Type t, bool do_exp){ if (out.is_open()){ out << "[SUNSHINE CRASHDUMP]" << std::endl; try{ + out << boost::stacktrace::stacktrace() << std::endl; + out << "REASON: " << reason << std::endl; out << "GL Vendor: " << glGetStringInt(GL_VENDOR) << std::endl; out << "GL Renderer: " << glGetStringInt(GL_RENDERER) << std::endl; out << "GL Version: " << glGetStringInt(GL_VERSION) << std::endl; @@ -98,7 +102,7 @@ void crash(const char* reason, Exception::Type t, bool do_exp){ out << "OpenAL version: " << AL_VERSION << std::endl; out << "Boost versino: " << BOOST_VERSION / 100000 << "." << BOOST_VERSION / 100 % 1000 << "." << BOOST_VERSION % 100 << std::endl; out << "Pixman version: " << PIXMAN_VERSION_STRING << std::endl; - + out << "Stack trace" << std::endl; out.close(); }else{ printf("[CRASHLOG] Failed to write crashdump file\n");