Bladeren bron

Added extra output and callstack information for improving debugging automated tests (#4528)

Signed-off-by: AMZN-AlexOteiza <[email protected]>
AMZN-AlexOteiza 4 jaren geleden
bovenliggende
commit
d1947c68c9

+ 2 - 0
Code/Editor/CryEdit.cpp

@@ -2124,6 +2124,8 @@ bool CCryEditApp::FixDanglingSharedMemory(const QString& sharedMemName) const
 
 int CCryEditApp::ExitInstance(int exitCode)
 {
+    AZ_TracePrintf("Exit", "Called ExitInstance() with exit code: 0x%x", exitCode);
+
     if (m_pEditor)
     {
         m_pEditor->OnBeginShutdownSequence();

+ 2 - 0
Code/Framework/AzCore/AzCore/Debug/Trace.cpp

@@ -224,6 +224,8 @@ namespace AZ
 
     void Debug::Trace::Terminate(int exitCode)
     {
+        AZ_TracePrintf("Exit", "Called Terminate() with exit code: 0x%x", exitCode);
+        AZ::Debug::Trace::PrintCallstack("Exit");
         Platform::Terminate(exitCode);
     }
 

+ 3 - 0
Code/Legacy/CrySystem/DebugCallStack.cpp

@@ -222,6 +222,9 @@ void UpdateFPExceptionsMaskForThreads()
 //////////////////////////////////////////////////////////////////////////
 int DebugCallStack::handleException(EXCEPTION_POINTERS* exception_pointer)
 {
+    AZ_TracePrintf("Exit", "Exception with exit code: 0x%x", exception_pointer->ExceptionRecord->ExceptionCode);
+    AZ::Debug::Trace::PrintCallstack("Exit");
+
     if (gEnv == NULL)
     {
         return EXCEPTION_EXECUTE_HANDLER;