DUMP in unhandled C ++ exception

In MSVC, how can I make any unhandled C ++ exception (like std :: runtime_error) breaks my compiled program so that it generates a dump with a full stack from the exception throw location?

I installed NTSD in the AeDebug registry and can generate good dumps for things like memory access violation, so the question here comes down to the program crashing correctly, I suppose.

Thanks in advance.

+3
source share
3 answers

I finally broke it.

void Terminate()
{
  OutputDebugStringA("Terminate\r\n");
  RaiseException(0xE0000010, EXCEPTION_NONCONTINUABLE, 0, 0);
}

RaiseException(), , , .

, , , , :

  • API Windows IPHelper Windows DLL
  • DLL C Windows (MSVCRT MSVCRT90)
  • ++ SetUnhandledExceptionFilter() , ++. ++ - , set_terminate(), .
+2

SetUnhandledExceptionFilter DebugBreak , .

: oops, , ++. , () ++, . , , catch, .

+1

Windows.
Windbg - KD NTSD .
ADPlus, Windows.

Here is a good place to start learning how to use it.

0
source

Source: https://habr.com/ru/post/1748223/


All Articles