Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions RTEA.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@
<ClInclude Include="Source\System\AllegroTools.h" />
<ClInclude Include="Source\System\Atom.h" />
<ClInclude Include="Source\System\Base64\base64.h" />
<ClInclude Include="Source\System\backward\backward.hpp" />
<ClInclude Include="Source\System\Constants.h" />
<ClInclude Include="Source\System\Controller.h" />
<ClInclude Include="Source\System\Entity.h" />
Expand All @@ -810,8 +811,6 @@
<ClInclude Include="Source\System\Semver200\semver200.h" />
<ClInclude Include="Source\System\Semver200\version.h" />
<ClInclude Include="Source\System\SpatialPartitionGrid.h" />
<ClInclude Include="Source\System\RTEStackTrace.h" />
<ClInclude Include="Source\System\StackWalker\StackWalker.h" />
<ClInclude Include="Source\System\StandardIncludes.h" />
<ClInclude Include="Source\System\Box.h" />
<ClInclude Include="Source\System\Color.h" />
Expand Down Expand Up @@ -1330,8 +1329,6 @@
<ClCompile Include="Source\System\Semver200\Semver200_parser.cpp" />
<ClCompile Include="Source\System\Serializable.cpp" />
<ClCompile Include="Source\System\SpatialPartitionGrid.cpp" />
<ClCompile Include="Source\System\RTEStackTrace.cpp" />
<ClCompile Include="Source\System\StackWalker\StackWalker.cpp" />
<ClCompile Include="Source\System\StandardIncludes.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
<PrecompiledHeaderFile>StandardIncludes.h</PrecompiledHeaderFile>
Expand Down
15 changes: 3 additions & 12 deletions RTEA.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<Filter Include="GUI\Wrappers">
<UniqueIdentifier>{14ff3fdb-4366-4bed-8b6e-ddcf72987b81}</UniqueIdentifier>
</Filter>
<Filter Include="System\StackWalker">
<Filter Include="System\backward">
<UniqueIdentifier>{a8668dc1-51c5-418d-91bf-7ee92f008cb1}</UniqueIdentifier>
</Filter>
<Filter Include="external">
Expand Down Expand Up @@ -612,11 +612,8 @@
<ClInclude Include="Source\System\GameVersion.h">
<Filter>System</Filter>
</ClInclude>
<ClInclude Include="Source\System\StackWalker\StackWalker.h">
<Filter>System\StackWalker</Filter>
</ClInclude>
<ClInclude Include="Source\System\RTEStackTrace.h">
<Filter>System</Filter>
<ClInclude Include="Source\System\backward\backward.hpp">
<Filter>System\backward</Filter>
</ClInclude>
<ClInclude Include="Source\Entities\AEJetpack.h">
<Filter>Entities</Filter>
Expand Down Expand Up @@ -1199,12 +1196,6 @@
<ClCompile Include="Source\System\Semver200\Semver200_parser.cpp">
<Filter>System\Semver200</Filter>
</ClCompile>
<ClCompile Include="Source\System\StackWalker\StackWalker.cpp">
<Filter>System\StackWalker</Filter>
</ClCompile>
<ClCompile Include="Source\System\RTEStackTrace.cpp">
<Filter>System</Filter>
</ClCompile>
<ClCompile Include="Source\Renderer\glad\gl.c">
<Filter>Renderer\glad</Filter>
</ClCompile>
Expand Down
26 changes: 18 additions & 8 deletions Source/System/RTEError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#ifdef _WIN32
#include "Windows.h"
#include "DbgHelp.h"
#include "RTEStackTrace.h"
#endif

#include <array>
Expand All @@ -34,13 +32,19 @@
#include <sys/sysctl.h>
#endif

#include "backward/backward.hpp"


using namespace RTE;

bool RTEError::s_CurrentlyAborting = false;
bool RTEError::s_IgnoreAllAsserts = false;
std::string RTEError::s_LastIgnoredAssertDescription = "";
std::source_location RTEError::s_LastIgnoredAssertLocation = {};

#if (defined(__linux__) || (defined(__APPLE__) && defined(__MACH__)))
backward::SignalHandling sh;
#endif
#ifdef _WIN32
/// <summary>
/// Custom exception handler for Windows SEH.
Expand Down Expand Up @@ -157,9 +161,13 @@ static LONG WINAPI RTEWindowsExceptionHandler([[maybe_unused]] EXCEPTION_POINTER
exceptionDescription << getExceptionDescriptionFromCode(exceptionCode) << " at address 0x" << std::uppercase << std::hex << exceptionAddress << ".\n\n"
<< symbolNameAtAddress << std::endl;

RTEStackTrace stackTrace;
backward::StackTrace st;
st.load_here(32, exceptPtr->ContextRecord);
backward::Printer printer;
std::ostringstream stack;
printer.print(st, stack);

RTEError::UnhandledExceptionFunc(exceptionDescription.str(), stackTrace.GetCallStackAsString(processHandle, exceptPtr->ContextRecord));
RTEError::UnhandledExceptionFunc(exceptionDescription.str(), stack.str());
return EXCEPTION_EXECUTE_HANDLER;
#endif
}
Expand Down Expand Up @@ -344,10 +352,12 @@ void RTEError::AbortFunc(const std::string& description, const std::source_locat

std::string callstack = "";

#ifdef _WIN32
RTEStackTrace stackTrace;
callstack += ("\n\n" + stackTrace.GetCallStackAsString());
#endif
backward::StackTrace st;
st.load_here();
backward::Printer printer;
std::ostringstream stack;
printer.print(st, stack);
callstack = stack.str();

std::string consoleSaveMsg;
if (!callstack.empty()) {
Expand Down
21 changes: 0 additions & 21 deletions Source/System/RTEStackTrace.cpp

This file was deleted.

41 changes: 0 additions & 41 deletions Source/System/RTEStackTrace.h

This file was deleted.

46 changes: 0 additions & 46 deletions Source/System/StackWalker/CODE_OF_CONDUCT.md

This file was deleted.

25 changes: 0 additions & 25 deletions Source/System/StackWalker/LICENSE

This file was deleted.

Loading
Loading