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...
views:
225answers:
2No, 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.