C ++ Win32 Raw Exception Handler

I currently used SetUnhandledExceptionFilter () to provide a callback to retrieve information when an unhandled exception occurred, this callback will provide me with the EXCEPTION_RECORD that provides ExceptionAddress.

[1] what really is ExceptionAddress? Is it the address of the function / code that gives the exception, or the address of the memory that any function was trying to access?

[2] is there any better mechanism that could give me better information when an unhandled exception occurred? (I can’t use debug mode or add any code that affects performance at runtime, since the crash is rare and only on release when the code runs as fast as possible)

[3] Is there a way to get multiple call addresses when an unhandled exception has occurred.

[4] suppose that it ExceptionAddresshas address A, and I have a DLL X loaded and executed at the base address A-x, as well as some other DLL Y in A+y, is it good to assume that the crash was a PROBLEM caused by the code in the DLL X?

+3
source share
3

(1) ExceptionAddress - , . (0xC0000005) , , , . , .

(2) no. , . .

(3) dbghelp.dll . StackWalk64, .

(4) GetModuleHandleEx ExceptionAddress dll, , , - DLL , "". , dll, dll.

+5

, , , :

http://www.codeproject.com/KB/applications/blackbox.aspx

, , , , .

.

There is also an improved version called "Blackbox revision". Can't find the site right now.

0
source

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


All Articles