简体   繁体   中英

C++ crash dump, stack unwinding on Win32 exceptions (when catch(…) used) - VS 2003

Like in Just In Time debugging, does VS 2003 compiled apps catch Win32 (or asynchronous) exceptions in a catch (...) and unwind the stack? before the dump file is written...

No, the debugger invocation is created in code that runs UP the stack from the exception, so the stack has not yet unwind. That is true for both sync (C++)and async (OS) exception.

See the Fig. 13 in the famous MSJ article A Crash Course on the Depths of Win32™ Structured Exception Handling .

The unhandled exception filter is invoked after the first pass of the exception filter list, if no filter admitted that is willing to handle the exception. This first pass is before the unwinding, which occurs on the second pass. If you break into the debugger when given a chance you'll find your exception place down your stack, and that makes perfect sense: it would give little to no value to debug a stack that had already unwound, you would have no idea what went wrong.

This depends on stack unwind semantics choosen when compiling your application Compiler can be instructed to catch or not to catch SEH exceptions for your code. Startup code always catches C++ & SEH exceptions and if any exception is caught it terminates the application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM