ReactOS 0.4.16-dev-2102-g4cf8777
except.c
Go to the documentation of this file.
1/*
2 * msvcrt.dll exception handling
3 *
4 * Copyright 2000 Jon Griffiths
5 * Copyright 2005 Juan Lang
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 *
21 * FIXME: Incomplete support for nested exceptions/try block cleanup.
22 */
23
24#include <float.h>
25#include <signal.h>
26#include <stdarg.h>
27#include <stdbool.h>
28
29#include "ntstatus.h"
30#define WIN32_NO_STATUS
31#include "windef.h"
32#include "winbase.h"
33#include "winternl.h"
34#include "msvcrt.h"
35#include "excpt.h"
36#include "wincon.h"
37#include "wine/exception.h"
38#include "wine/debug.h"
39
40#include "cppexcept.h"
41
43
44#if _MSVCR_VER>=70 && _MSVCR_VER<=71
45static MSVCRT_security_error_handler security_error_handler;
46#endif
47
49
51{
52 unwind_info *unwind_table = rtti_rva( descr->unwind_table, base );
53 tryblock_info *tryblock = rtti_rva( descr->tryblock, base );
54 ipmap_info *ipmap = rtti_rva( descr->ipmap, base );
55 UINT i, j;
56
57 TRACE( "magic %x\n", descr->magic );
58 TRACE( "unwind table: %p %d\n", unwind_table, descr->unwind_count );
59 for (i = 0; i < descr->unwind_count; i++)
60 {
61 TRACE(" %d: prev %d func %p\n", i, unwind_table[i].prev,
62 unwind_table[i].handler ? rtti_rva( unwind_table[i].handler, base ) : NULL );
63 }
64 TRACE( "try table: %p %d\n", tryblock, descr->tryblock_count );
65 for (i = 0; i < descr->tryblock_count; i++)
66 {
67 catchblock_info *catchblock = rtti_rva( tryblock[i].catchblock, base );
68
69 TRACE( " %d: start %d end %d catchlevel %d catch %p %d\n", i,
70 tryblock[i].start_level, tryblock[i].end_level,
71 tryblock[i].catch_level, catchblock, tryblock[i].catchblock_count);
72 for (j = 0; j < tryblock[i].catchblock_count; j++)
73 {
74 type_info *type_info = catchblock[j].type_info ? rtti_rva( catchblock[j].type_info, base ) : NULL;
75 TRACE( " %d: flags %x offset %d handler %p",
76 j, catchblock[j].flags, catchblock[j].offset,
77 catchblock[j].handler ? rtti_rva(catchblock[j].handler, base) : NULL );
78#ifdef _WIN64
79 TRACE( " frame %x", catchblock[j].frame );
80#endif
81 TRACE( " type %p %s\n", type_info, dbgstr_type_info(type_info) );
82 }
83 }
84 TRACE( "ipmap: %p %d\n", ipmap, descr->ipmap_count );
85 for (i = 0; i < descr->ipmap_count; i++)
86 TRACE( " %d: ip %x state %d\n", i, ipmap[i].ip, ipmap[i].state );
87#ifdef RTTI_USE_RVA
88 TRACE( "unwind_help %+d\n", descr->unwind_help );
89#endif
90 if (descr->magic <= CXX_FRAME_MAGIC_VC6) return;
91 TRACE( "expect list: %p\n", rtti_rva( descr->expect_list, base ) );
92 if (descr->magic <= CXX_FRAME_MAGIC_VC7) return;
93 TRACE( "flags: %08x\n", descr->flags );
94}
95
96void *find_catch_handler( void *object, uintptr_t frame, uintptr_t exc_base,
97 const tryblock_info *tryblock,
99{
100 unsigned int i;
101 const catchblock_info *catchblock = rtti_rva( tryblock->catchblock, image_base );
102 const cxx_type_info *type;
103 const type_info *catch_ti;
104
105 for (i = 0; i < tryblock->catchblock_count; i++)
106 {
107 if (exc_type)
108 {
109 catch_ti = catchblock[i].type_info ? rtti_rva( catchblock[i].type_info, image_base ) : NULL;
110 type = find_caught_type( exc_type, exc_base, catch_ti, catchblock[i].flags );
111 if (!type) continue;
112
113 TRACE( "matched type %p in catchblock %d\n", type, i );
114
115 if (catch_ti && catch_ti->mangled[0] && catchblock[i].offset)
116 {
117 /* copy the exception to its destination on the stack */
118 void **dest = (void **)(frame + catchblock[i].offset);
119 copy_exception( object, dest, catchblock[i].flags, type, exc_base );
120 }
121 }
122 else
123 {
124 /* no CXX_EXCEPTION only proceed with a catch(...) block*/
125 if (catchblock[i].type_info) continue;
126 TRACE( "found catch(...) block\n" );
127 }
128 return rtti_rva( catchblock[i].handler, image_base );
129 }
130 return NULL;
131}
132
133#ifndef __i386__ /* i386 implementation is in except_i386.c */
134
135typedef struct
136{
141
142typedef struct
143{
150
152{
153 const ipmap_info *ipmap = rtti_rva( descr->ipmap, base );
154 unsigned int i;
155 int ret;
156
157 for (i = 0; i < descr->ipmap_count; i++) if (base + ipmap[i].ip > ip) break;
158 ret = i ? ipmap[i - 1].state : -1;
159 TRACE( "%Ix -> %d\n", ip, ret );
160 return ret;
161}
162
164 const cxx_function_descr *descr, int last_level)
165{
166 const unwind_info *unwind_table = rtti_rva(descr->unwind_table, dispatch->ImageBase);
167 int *unwind_help = (int *)(frame + descr->unwind_help);
168 int trylevel = unwind_help[0];
169
170 if (trylevel == -2) trylevel = ip_to_state( descr, get_exception_pc(dispatch), dispatch->ImageBase );
171
172 TRACE("current level: %d, last level: %d\n", trylevel, last_level);
173 while (trylevel > last_level)
174 {
175 if (trylevel<0 || trylevel>=descr->unwind_count)
176 {
177 ERR("invalid trylevel %d\n", trylevel);
178 terminate();
179 }
180 if (unwind_table[trylevel].handler)
181 {
182 void *handler = rtti_rva( unwind_table[trylevel].handler, dispatch->ImageBase );
184 }
185 trylevel = unwind_table[trylevel].prev;
186 }
187 unwind_help[0] = trylevel;
188}
189
191{
192 EXCEPTION_RECORD *rec = eptrs->ExceptionRecord;
194
195 if (rec->ExceptionCode != CXX_EXCEPTION)
197 if (!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2])
199 if (rec->ExceptionInformation[1] == ctx->prev_rec->ExceptionInformation[1])
200 ctx->rethrow = TRUE;
202}
203
205{
207 __CxxUnregisterExceptionObject(&ctx->frame_info, ctx->rethrow);
208}
209
211{
212 ULONG_PTR frame = rec->ExceptionInformation[1];
213 const cxx_function_descr *descr = (void*)rec->ExceptionInformation[2];
214 EXCEPTION_RECORD *untrans_rec = (void*)rec->ExceptionInformation[4];
215 EXCEPTION_RECORD *prev_rec = (void*)rec->ExceptionInformation[6];
216 CONTEXT *context = (void*)rec->ExceptionInformation[7];
217 int *unwind_help = (int *)(frame + descr->unwind_help);
218 EXCEPTION_POINTERS ep = { prev_rec, context };
220 void *ret_addr = NULL;
221
222 ctx.rethrow = FALSE;
223 ctx.prev_rec = prev_rec;
224 __CxxRegisterExceptionObject(&ep, &ctx.frame_info);
225 msvcrt_get_thread_data()->processing_throw--;
226 __TRY
227 {
228 __TRY
229 {
230 ret_addr = call_catch_handler( rec );
231 }
233 {
234 TRACE("detect rethrow: exception code: %lx\n", prev_rec->ExceptionCode);
235 ctx.rethrow = TRUE;
236
237 if (untrans_rec)
238 {
240 RaiseException(untrans_rec->ExceptionCode, untrans_rec->ExceptionFlags,
241 untrans_rec->NumberParameters, untrans_rec->ExceptionInformation);
242 }
243 else
244 {
245 RaiseException(prev_rec->ExceptionCode, prev_rec->ExceptionFlags,
246 prev_rec->NumberParameters, prev_rec->ExceptionInformation);
247 }
248 }
250 }
252
253 unwind_help[0] = -2;
254 unwind_help[1] = -1;
255 return ret_addr;
256}
257
258static inline BOOL cxx_is_consolidate(const EXCEPTION_RECORD *rec)
259{
261 rec->NumberParameters > 10 &&
263}
264
266 EXCEPTION_RECORD *untrans_rec,
269 cxx_exception_type *info, ULONG_PTR orig_frame)
270{
271 ULONG_PTR exc_base = (rec->NumberParameters == 4 ? rec->ExceptionInformation[3] : 0);
272 void *handler, *object = (void *)rec->ExceptionInformation[1];
273 int trylevel = ip_to_state( descr, get_exception_pc(dispatch), dispatch->ImageBase );
275 const tryblock_info *in_catch;
276 EXCEPTION_RECORD catch_record;
277 CONTEXT ctx;
278 UINT i;
279 INT *unwind_help;
280
281 data->processing_throw++;
282 for (i=descr->tryblock_count; i>0; i--)
283 {
284 in_catch = rtti_rva(descr->tryblock, dispatch->ImageBase);
285 in_catch = &in_catch[i-1];
286
287 if (trylevel>in_catch->end_level && trylevel<=in_catch->catch_level)
288 break;
289 }
290 if (!i)
291 in_catch = NULL;
292
293 unwind_help = (int *)(orig_frame + descr->unwind_help);
294 if (trylevel > unwind_help[1])
295 unwind_help[0] = unwind_help[1] = trylevel;
296 else
297 trylevel = unwind_help[1];
298 TRACE("current trylevel: %d\n", trylevel);
299
300 for (i=0; i<descr->tryblock_count; i++)
301 {
302 const tryblock_info *tryblock = rtti_rva(descr->tryblock, dispatch->ImageBase);
303 tryblock = &tryblock[i];
304
305 if (trylevel < tryblock->start_level) continue;
306 if (trylevel > tryblock->end_level) continue;
307
308 if (in_catch)
309 {
310 if(tryblock->start_level <= in_catch->end_level) continue;
311 if(tryblock->end_level > in_catch->catch_level) continue;
312 }
313
314 handler = find_catch_handler( object, orig_frame, exc_base, tryblock, info, dispatch->ImageBase );
315 if (!handler) continue;
316
317 /* unwind stack and call catch */
318 memset(&catch_record, 0, sizeof(catch_record));
321 catch_record.NumberParameters = 11;
323 catch_record.ExceptionInformation[1] = orig_frame;
324 catch_record.ExceptionInformation[2] = (ULONG_PTR)descr;
325 catch_record.ExceptionInformation[3] = tryblock->start_level;
326 catch_record.ExceptionInformation[4] = (ULONG_PTR)untrans_rec;
327 catch_record.ExceptionInformation[5] = (ULONG_PTR)handler;
328 /* tyFlow expects ExceptionInformation[6] to contain exception record */
329 catch_record.ExceptionInformation[6] = (ULONG_PTR)rec;
330 catch_record.ExceptionInformation[7] = (ULONG_PTR)context;
331 catch_record.ExceptionInformation[10] = -1;
332 RtlUnwindEx((void*)frame, (void*)dispatch->ControlPc, &catch_record, NULL, &ctx, NULL);
333 }
334
335 TRACE("no matching catch block found\n");
336 data->processing_throw--;
337}
338
340{
343 cxx_exception_type *exc_type;
344
345 if (rec->ExceptionCode != CXX_EXCEPTION)
346 {
347 TRACE("non-c++ exception thrown in SEH handler: %lx\n", rec->ExceptionCode);
348 terminate();
349 }
350
351 exc_type = (cxx_exception_type *)rec->ExceptionInformation[2];
352 find_catch_block(rec, ep->ContextRecord, ctx->seh_rec, ctx->dest_frame, ctx->dispatch,
353 ctx->descr, exc_type, ctx->orig_frame);
354
357}
358
361{
362 if (!nested && rec->ExceptionCode == CXX_EXCEPTION &&
363 descr->magic >= CXX_FRAME_MAGIC_VC8 &&
364 (descr->flags & FUNC_DESCR_NOEXCEPT))
365 {
366 ERR("noexcept function propagating exception\n");
367 terminate();
368 }
369}
370
374{
375 int trylevel = ip_to_state( descr, get_exception_pc(dispatch), dispatch->ImageBase );
376 cxx_exception_type *exc_type;
377 ULONG_PTR orig_frame = frame;
378 ULONG_PTR throw_base;
379 DWORD throw_func_off;
380 void *throw_func;
381 UINT i, j;
382 int unwindlevel = -1;
383
385 {
386 FIXME("unhandled frame magic %x\n", descr->magic);
388 }
389
390 if (descr->magic >= CXX_FRAME_MAGIC_VC8 &&
391 (descr->flags & FUNC_DESCR_SYNCHRONOUS) &&
392 (rec->ExceptionCode != CXX_EXCEPTION &&
393 !cxx_is_consolidate(rec) &&
395 return ExceptionContinueSearch; /* handle only c++ exceptions */
396
397 /* update orig_frame if it's a nested exception */
398 throw_func_off = RtlLookupFunctionEntry(dispatch->ControlPc, &throw_base, NULL)->BeginAddress;
399 throw_func = rtti_rva(throw_func_off, throw_base);
400 TRACE("reconstructed handler pointer: %p\n", throw_func);
401 for (i=descr->tryblock_count; i>0; i--)
402 {
403 const tryblock_info *tryblock = rtti_rva(descr->tryblock, dispatch->ImageBase);
404 tryblock = &tryblock[i-1];
405
406 if (trylevel>tryblock->end_level && trylevel<=tryblock->catch_level)
407 {
408 for (j=0; j<tryblock->catchblock_count; j++)
409 {
410 const catchblock_info *catchblock = rtti_rva(tryblock->catchblock, dispatch->ImageBase);
411 catchblock = &catchblock[j];
412
413 if (rtti_rva(catchblock->handler, dispatch->ImageBase) == throw_func)
414 {
415 unwindlevel = tryblock->end_level;
416#ifdef _WIN64
417 orig_frame = *(ULONG_PTR *)(frame + catchblock->frame);
418#else
419 orig_frame = *(ULONG_PTR *)frame;
420#endif
421 TRACE("nested exception detected, setting orig_frame to %Ix\n", orig_frame);
422 }
423 }
424 }
425 }
426
428 {
430 cxx_local_unwind(orig_frame, dispatch, descr,
431 cxx_is_consolidate(rec) ? rec->ExceptionInformation[3] : trylevel);
432 else
433 cxx_local_unwind(orig_frame, dispatch, descr, unwindlevel);
435 }
436 if (!descr->tryblock_count)
437 {
438 check_noexcept(rec, descr, orig_frame != frame);
440 }
441
442 if (rec->ExceptionCode == CXX_EXCEPTION &&
443 (!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2]))
444 {
445 TRACE("rethrow detected.\n");
446 *rec = *msvcrt_get_thread_data()->exc_record;
447 }
448 if (rec->ExceptionCode == CXX_EXCEPTION)
449 {
450 exc_type = (cxx_exception_type *)rec->ExceptionInformation[2];
451
452 if (TRACE_ON(seh))
453 {
454 TRACE("handling C++ exception rec %p frame %Ix descr %p\n", rec, frame, descr);
457 }
458 }
459 else
460 {
462
463 exc_type = NULL;
464 TRACE("handling C exception code %lx rec %p frame %Ix descr %p\n",
465 rec->ExceptionCode, rec, frame, descr);
466
467 if (data->se_translator) {
468 EXCEPTION_POINTERS except_ptrs;
470
471 ctx.dest_frame = frame;
472 ctx.orig_frame = orig_frame;
473 ctx.seh_rec = rec;
474 ctx.dispatch = dispatch;
475 ctx.descr = descr;
476 __TRY
477 {
478 except_ptrs.ExceptionRecord = rec;
479 except_ptrs.ContextRecord = context;
480 data->se_translator(rec->ExceptionCode, &except_ptrs);
481 }
483 {
484 }
486 }
487 }
488
489 find_catch_block(rec, context, NULL, frame, dispatch, descr, exc_type, orig_frame);
490 check_noexcept(rec, descr, orig_frame != frame);
492}
493
494/*********************************************************************
495 * __CxxFrameHandler (MSVCRT.@)
496 */
499{
500 TRACE( "%p %Ix %p %p\n", rec, frame, context, dispatch );
501 return cxx_frame_handler( rec, frame, context, dispatch,
502 rtti_rva(*(UINT *)dispatch->HandlerData, dispatch->ImageBase) );
503}
504
505#endif /* __i386__ */
506
508{
509 BOOL ret = FALSE;
510
511 switch (ctrlType)
512 {
513 case CTRL_C_EVENT:
514 if (sighandlers[SIGINT])
515 {
516 if (sighandlers[SIGINT] != SIG_IGN)
518 ret = TRUE;
519 }
520 break;
521 }
522 return ret;
523}
524
525/*********************************************************************
526 * __pxcptinfoptrs (MSVCRT.@)
527 */
529{
530 return (void**)&msvcrt_get_thread_data()->xcptinfo;
531}
532
534
535/* The exception codes are actually NTSTATUS values */
536static const struct
537{
549
551{
554
555 if (!except || !except->ExceptionRecord)
557
558 switch (except->ExceptionRecord->ExceptionCode)
559 {
562 {
563 if (handler != SIG_IGN)
564 {
566
567 old_ep = *ep;
568 *ep = except;
571 *ep = old_ep;
572 }
574 }
575 break;
576 /* According to msdn,
577 * the FPE signal handler takes as a second argument the type of
578 * floating point exception.
579 */
587 if ((handler = sighandlers[SIGFPE]) != SIG_DFL)
588 {
589 if (handler != SIG_IGN)
590 {
592 unsigned int i;
593 int float_signal = _FPE_INVALID;
594
596 for (i = 0; i < ARRAY_SIZE(float_exception_map); i++)
597 {
599 except->ExceptionRecord->ExceptionCode)
600 {
601 float_signal = float_exception_map[i].signal;
602 break;
603 }
604 }
605
606 old_ep = *ep;
607 *ep = except;
608 ((float_handler)handler)(SIGFPE, float_signal);
609 *ep = old_ep;
610 }
612 }
613 break;
616 if ((handler = sighandlers[SIGILL]) != SIG_DFL)
617 {
618 if (handler != SIG_IGN)
619 {
621
622 old_ep = *ep;
623 *ep = except;
626 *ep = old_ep;
627 }
629 }
630 break;
631 }
632 return ret;
633}
634
636{
638}
639
641{
643}
644
645/*********************************************************************
646 * signal (MSVCRT.@)
647 * Some signals may never be generated except through an explicit call to
648 * raise.
649 */
651{
653
654 TRACE("(%d, %p)\n", sig, func);
655
656 if (func == SIG_ERR) return SIG_ERR;
657
658 switch (sig)
659 {
660 /* Cases handled internally. Note SIGTERM is never generated by Windows,
661 * so we effectively mask it.
662 */
663 case SIGABRT:
664 case SIGFPE:
665 case SIGILL:
666 case SIGSEGV:
667 case SIGINT:
668 case SIGTERM:
669 case SIGBREAK:
670 ret = sighandlers[sig];
671 sighandlers[sig] = func;
672 break;
673 default:
674 ret = SIG_ERR;
675 }
676 return ret;
677}
678
679/*********************************************************************
680 * raise (MSVCRT.@)
681 */
682int CDECL raise(int sig)
683{
685
686 TRACE("(%d)\n", sig);
687
688 switch (sig)
689 {
690 case SIGFPE:
691 case SIGILL:
692 case SIGSEGV:
693 handler = sighandlers[sig];
694 if (handler == SIG_DFL) _exit(3);
695 if (handler != SIG_IGN)
696 {
698
699 sighandlers[sig] = SIG_DFL;
700
701 old_ep = *ep;
702 *ep = NULL;
703 if (sig == SIGFPE)
705 else
706 handler(sig);
707 *ep = old_ep;
708 }
709 break;
710 case SIGABRT:
711 case SIGINT:
712 case SIGTERM:
713 case SIGBREAK:
714 handler = sighandlers[sig];
715 if (handler == SIG_DFL) _exit(3);
716 if (handler != SIG_IGN)
717 {
718 sighandlers[sig] = SIG_DFL;
719 handler(sig);
720 }
721 break;
722 default:
723 return -1;
724 }
725 return 0;
726}
727
728/*********************************************************************
729 * _XcptFilter (MSVCRT.@)
730 */
732{
733 TRACE("(%08lx,%p)\n", ex, ptr);
734 /* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
736}
737
738/*********************************************************************
739 * __CppXcptFilter (MSVCRT.@)
740 */
742{
743 /* only filter c++ exceptions */
745 return _XcptFilter(ex, ptr);
746}
747
748/*********************************************************************
749 * __CxxDetectRethrow (MSVCRT.@)
750 */
752{
754
755 if (!ptrs)
756 return FALSE;
757
758 rec = ptrs->ExceptionRecord;
759 if (is_cxx_exception( rec ) && rec->ExceptionInformation[2])
760 {
761 ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record;
762 return TRUE;
763 }
764 return (msvcrt_get_thread_data()->exc_record == rec);
765}
766
767/*********************************************************************
768 * __CxxExceptionFilter (MSVCRT.@)
769 */
771{
772 const cxx_type_info *type;
773 EXCEPTION_RECORD *rec;
774 uintptr_t exc_base;
775
776 TRACE( "%p %p %x %p\n", ptrs, ti, flags, copy );
777
778 if (!ptrs) return EXCEPTION_CONTINUE_SEARCH;
779
780 /* handle catch(...) */
781 if (!ti) return EXCEPTION_EXECUTE_HANDLER;
782
783 rec = ptrs->ExceptionRecord;
785
786 if (rec->ExceptionInformation[1] == 0 && rec->ExceptionInformation[2] == 0)
787 {
788 rec = msvcrt_get_thread_data()->exc_record;
789 if (!rec) return EXCEPTION_CONTINUE_SEARCH;
790 }
791
792 exc_base = rec->ExceptionInformation[3];
794 if (!type) return EXCEPTION_CONTINUE_SEARCH;
795
796 if (copy) copy_exception( (void *)rec->ExceptionInformation[1], copy, flags, type, exc_base );
797
799}
800
801/*********************************************************************
802 * __CxxQueryExceptionSize (MSVCRT.@)
803 */
805{
806 return sizeof(cxx_exception_type);
807}
808
809/*********************************************************************
810 * _abnormal_termination (MSVCRT.@)
811 */
813{
814 FIXME("(void)stub\n");
815 return 0;
816}
817
818/******************************************************************
819 * __uncaught_exception (MSVCRT.@)
820 */
822{
823 return msvcrt_get_thread_data()->processing_throw != 0;
824}
825
826/*********************************************************************
827 * _fpieee_flt (MSVCRT.@)
828 */
831{
832 switch (code)
833 {
839 return handle_fpieee_flt( code, ep, handler );
840 default:
842 }
843}
844
845#if _MSVCR_VER>=70 && _MSVCR_VER<=71
846
847/*********************************************************************
848 * _set_security_error_handler (MSVCR70.@)
849 */
850MSVCRT_security_error_handler CDECL _set_security_error_handler(
852{
853 MSVCRT_security_error_handler old = security_error_handler;
854
855 TRACE("(%p)\n", handler);
856
857 security_error_handler = handler;
858 return old;
859}
860
861/*********************************************************************
862 * __security_error_handler (MSVCR70.@)
863 */
864void CDECL __security_error_handler(int code, void *data)
865{
866 if(security_error_handler)
867 security_error_handler(code, data);
868 else
869 FIXME("(%d, %p) stub\n", code, data);
870
871 _exit(3);
872}
873
874#endif /* _MSVCR_VER>=70 && _MSVCR_VER<=71 */
875
876#if _MSVCR_VER>=110
877/*********************************************************************
878 * __crtSetUnhandledExceptionFilter (MSVCR110.@)
879 */
881{
883}
884#endif
885
886/*********************************************************************
887 * _CreateFrameInfo (MSVCR80.@)
888 */
890{
892
893 TRACE("(%p, %p)\n", fi, obj);
894
895 fi->next = data->frame_info_head;
896 data->frame_info_head = fi;
897 fi->object = obj;
898 return fi;
899}
900
901/*********************************************************************
902 * _FindAndUnlinkFrame (MSVCR80.@)
903 */
905{
907 frame_info *cur = data->frame_info_head;
908
909 TRACE("(%p)\n", fi);
910
911 if (cur == fi)
912 {
913 data->frame_info_head = cur->next;
914 return;
915 }
916
917 for (; cur->next; cur = cur->next)
918 {
919 if (cur->next == fi)
920 {
921 cur->next = fi->next;
922 return;
923 }
924 }
925
926 ERR("frame not found, native crashes in this case\n");
927}
928
929/*********************************************************************
930 * _IsExceptionObjectToBeDestroyed (MSVCR80.@)
931 */
933{
935
936 TRACE( "%p\n", obj );
937
938 for (cur = msvcrt_get_thread_data()->frame_info_head; cur; cur = cur->next)
939 {
940 if (cur->object == obj)
941 return FALSE;
942 }
943
944 return TRUE;
945}
946
947/*********************************************************************
948 * __DestructExceptionObject (MSVCRT.@)
949 */
951{
953 void *object = (void*)rec->ExceptionInformation[1];
954
955 TRACE("(%p)\n", rec);
956
957 if (!is_cxx_exception( rec )) return;
958
959 if (!info || !info->destructor)
960 return;
961
962 call_dtor( rtti_rva( info->destructor, rec->ExceptionInformation[3] ), object );
963}
964
965/*********************************************************************
966 * __CxxRegisterExceptionObject (MSVCRT.@)
967 */
969{
971
972 TRACE("(%p, %p)\n", ep, frame_info);
973
974 if (!ep || !ep->ExceptionRecord)
975 {
976 frame_info->rec = (void*)-1;
977 frame_info->context = (void*)-1;
978 return TRUE;
979 }
980
981 frame_info->rec = data->exc_record;
982 frame_info->context = data->ctx_record;
983 data->exc_record = ep->ExceptionRecord;
984 data->ctx_record = ep->ContextRecord;
986 return TRUE;
987}
988
989/*********************************************************************
990 * __CxxUnregisterExceptionObject (MSVCRT.@)
991 */
993{
995
996 TRACE("(%p)\n", frame_info);
997
998 if(frame_info->rec == (void*)-1)
999 return;
1000
1001 _FindAndUnlinkFrame(&frame_info->frame_info);
1002 if(data->exc_record->ExceptionCode == CXX_EXCEPTION && !in_use
1003 && _IsExceptionObjectToBeDestroyed((void*)data->exc_record->ExceptionInformation[1]))
1004 __DestructExceptionObject(data->exc_record);
1005 data->exc_record = frame_info->rec;
1006 data->ctx_record = frame_info->context;
1007}
1008
1010 char *what;
1012};
1013
1014#if _MSVCR_VER>=140
1015
1016/*********************************************************************
1017 * __std_exception_copy (UCRTBASE.@)
1018 */
1019void CDECL __std_exception_copy(const struct __std_exception_data *src,
1020 struct __std_exception_data *dst)
1021{
1022 TRACE("(%p %p)\n", src, dst);
1023
1024 if(src->dofree && src->what) {
1025 dst->what = _strdup(src->what);
1026 dst->dofree = 1;
1027 } else {
1028 dst->what = src->what;
1029 dst->dofree = 0;
1030 }
1031}
1032
1033/*********************************************************************
1034 * __std_exception_destroy (UCRTBASE.@)
1035 */
1036void CDECL __std_exception_destroy(struct __std_exception_data *data)
1037{
1038 TRACE("(%p)\n", data);
1039
1040 if(data->dofree)
1041 free(data->what);
1042 data->what = NULL;
1043 data->dofree = 0;
1044}
1045
1046/*********************************************************************
1047 * __current_exception (UCRTBASE.@)
1048 */
1049void** CDECL __current_exception(void)
1050{
1051 TRACE("()\n");
1052 return (void**)&msvcrt_get_thread_data()->exc_record;
1053}
1054
1055/*********************************************************************
1056 * __current_exception_context (UCRTBASE.@)
1057 */
1058void** CDECL __current_exception_context(void)
1059{
1060 TRACE("()\n");
1061 return (void**)&msvcrt_get_thread_data()->ctx_record;
1062}
1063
1064/*********************************************************************
1065 * __processing_throw (UCRTBASE.@)
1066 */
1067int* CDECL __processing_throw(void)
1068{
1069 TRACE("()\n");
1070 return &msvcrt_get_thread_data()->processing_throw;
1071}
1072
1073#endif /* _MSVCR_VER>=140 */
static int state
Definition: maze.c:121
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
#define ARRAY_SIZE(A)
Definition: main.h:20
void dispatch(HANDLE hStopEvent)
Definition: dispatch.c:70
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
#define except(x)
Definition: btrfs_drv.h:136
#define free
Definition: debug_ros.c:5
#define _strdup
Definition: debug_ros.c:7
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CDECL
Definition: compat.h:29
@ ExceptionContinueSearch
Definition: compat.h:91
#define __TRY
Definition: compat.h:80
enum _EXCEPTION_DISPOSITION EXCEPTION_DISPOSITION
#define TRACE_ON(x)
Definition: compat.h:75
#define __ENDTRY
Definition: compat.h:82
#define CALLBACK
Definition: compat.h:35
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, BOOL Add)
Definition: console.c:2111
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI DECLSPEC_HOTPATCH SetUnhandledExceptionFilter(IN LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter)
Definition: except.c:790
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7512
void CDECL terminate(void)
Definition: cpp.c:698
#define CXX_EXCEPTION
Definition: cppexcept.h:34
static const char * dbgstr_type_info(const type_info *info)
Definition: cppexcept.h:169
static const cxx_type_info * find_caught_type(cxx_exception_type *exc_type, uintptr_t base, const type_info *catch_ti, UINT catch_flags)
Definition: cppexcept.h:214
#define CXX_FRAME_MAGIC_VC7
Definition: cppexcept.h:32
static void call_dtor(void *func, void *this)
Definition: cppexcept.h:207
#define CXX_FRAME_MAGIC_VC6
Definition: cppexcept.h:31
#define TRACE_EXCEPTION_TYPE(type, base)
Definition: cppexcept.h:265
#define CXX_FRAME_MAGIC_VC8
Definition: cppexcept.h:33
#define FUNC_DESCR_SYNCHRONOUS
Definition: cppexcept.h:134
static BOOL is_cxx_exception(EXCEPTION_RECORD *rec)
Definition: cppexcept.h:146
static void copy_exception(void *object, void **dest, UINT catch_flags, const cxx_type_info *type, uintptr_t base)
Definition: cppexcept.h:241
void * call_unwind_handler(void *func, uintptr_t frame, DISPATCHER_CONTEXT *dispatch)
int handle_fpieee_flt(__msvcrt_ulong exception_code, EXCEPTION_POINTERS *ep, int(__cdecl *handler)(_FPIEEE_RECORD *))
#define FUNC_DESCR_NOEXCEPT
Definition: cppexcept.h:135
void * call_catch_handler(EXCEPTION_RECORD *rec)
ULONG_PTR get_exception_pc(DISPATCHER_CONTEXT *dispatch)
static void * rtti_rva(unsigned int rva, uintptr_t base)
Definition: cxx.h:469
static int ip_to_state(const cxx_function_descr *descr, uintptr_t ip, uintptr_t base)
Definition: except.c:151
int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
Definition: except.c:741
int CDECL __CxxExceptionFilter(EXCEPTION_POINTERS *ptrs, const type_info *ti, UINT flags, void **copy)
Definition: except.c:770
BOOL CDECL __uncaught_exception(void)
Definition: except.c:821
static void check_noexcept(PEXCEPTION_RECORD rec, const cxx_function_descr *descr, BOOL nested)
Definition: except.c:359
static void find_catch_block(EXCEPTION_RECORD *rec, CONTEXT *context, EXCEPTION_RECORD *untrans_rec, ULONG_PTR frame, DISPATCHER_CONTEXT *dispatch, const cxx_function_descr *descr, cxx_exception_type *info, ULONG_PTR orig_frame)
Definition: except.c:265
static __sighandler_t sighandlers[NSIG]
Definition: except.c:48
int CDECL raise(int sig)
Definition: except.c:682
void CDECL __DestructExceptionObject(EXCEPTION_RECORD *rec)
Definition: except.c:950
static void *WINAPI call_catch_block(EXCEPTION_RECORD *rec)
Definition: except.c:210
static void cxx_local_unwind(ULONG_PTR frame, DISPATCHER_CONTEXT *dispatch, const cxx_function_descr *descr, int last_level)
Definition: except.c:163
EXCEPTION_DISPOSITION CDECL __CxxFrameHandler(EXCEPTION_RECORD *rec, ULONG_PTR frame, CONTEXT *context, DISPATCHER_CONTEXT *dispatch)
Definition: except.c:497
static BOOL cxx_is_consolidate(const EXCEPTION_RECORD *rec)
Definition: except.c:258
int __cdecl _fpieee_flt(__msvcrt_ulong code, EXCEPTION_POINTERS *ep, int(__cdecl *handler)(_FPIEEE_RECORD *))
Definition: except.c:829
static void CALLBACK cxx_catch_cleanup(BOOL normal, void *c)
Definition: except.c:204
static const struct @575 float_exception_map[]
frame_info *CDECL _CreateFrameInfo(frame_info *fi, void *obj)
Definition: except.c:889
static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG_PTR frame, CONTEXT *context, DISPATCHER_CONTEXT *dispatch, const cxx_function_descr *descr)
Definition: except.c:371
void msvcrt_free_signals(void)
Definition: except.c:640
static LONG CALLBACK se_translation_filter(EXCEPTION_POINTERS *ep, void *c)
Definition: except.c:339
static LONG msvcrt_exception_filter(struct _EXCEPTION_POINTERS *except)
Definition: except.c:550
void CDECL __CxxUnregisterExceptionObject(cxx_frame_info *frame_info, BOOL in_use)
Definition: except.c:992
NTSTATUS status
Definition: except.c:538
BOOL CDECL __CxxRegisterExceptionObject(EXCEPTION_POINTERS *ep, cxx_frame_info *frame_info)
Definition: except.c:968
int CDECL __intrinsic_abnormal_termination(void)
Definition: except.c:812
int CDECL _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
Definition: except.c:731
int signal
Definition: except.c:539
void **CDECL __pxcptinfoptrs(void)
Definition: except.c:528
void dump_function_descr(const cxx_function_descr *descr, uintptr_t base)
Definition: except.c:50
void(CDECL * float_handler)(int, int)
Definition: except.c:533
BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs)
Definition: except.c:751
void msvcrt_init_signals(void)
Definition: except.c:635
unsigned int CDECL __CxxQueryExceptionSize(void)
Definition: except.c:804
void CDECL _FindAndUnlinkFrame(frame_info *fi)
Definition: except.c:904
static BOOL WINAPI msvcrt_console_handler(DWORD ctrlType)
Definition: except.c:507
BOOL __cdecl _IsExceptionObjectToBeDestroyed(const void *obj)
Definition: except.c:932
static LONG CALLBACK cxx_rethrow_filter(PEXCEPTION_POINTERS eptrs, void *c)
Definition: except.c:190
void * find_catch_handler(void *object, uintptr_t frame, uintptr_t exc_base, const tryblock_info *tryblock, cxx_exception_type *exc_type, uintptr_t image_base)
Definition: except.c:96
void CDECL _exit(int exitcode)
Definition: exit.c:187
#define __cdecl
Definition: corecrt.h:121
unsigned int uintptr_t
Definition: corecrt.h:185
unsigned long __msvcrt_ulong
Definition: corecrt.h:168
#define _FPE_INEXACT
Definition: float.h:124
#define _FPE_OVERFLOW
Definition: float.h:122
#define _FPE_ZERODIVIDE
Definition: float.h:121
#define _FPE_STACKOVERFLOW
Definition: float.h:127
#define _FPE_INVALID
Definition: float.h:119
#define _FPE_DENORMAL
Definition: float.h:120
#define _FPE_EXPLICITGEN
Definition: float.h:129
#define _FPE_UNDERFLOW
Definition: float.h:123
#define SIG_DFL
Definition: signal.h:41
#define SIG_ERR
Definition: signal.h:43
#define SIGINT
Definition: signal.h:25
#define SIGILL
Definition: signal.h:26
#define SIGTERM
Definition: signal.h:29
void(__cdecl * __sighandler_t)(int)
Definition: signal.h:39
#define SIGFPE
Definition: signal.h:27
#define SIGABRT
Definition: signal.h:31
#define NSIG
Definition: signal.h:33
#define SIG_IGN
Definition: signal.h:42
#define SIGSEGV
Definition: signal.h:28
#define SIGBREAK
Definition: signal.h:30
thread_data_t *CDECL msvcrt_get_thread_data(void)
Definition: thread.c:45
void(__cdecl * MSVCRT_security_error_handler)(int, void *)
Definition: msvcrt.h:80
void **__cdecl __current_exception(void)
int *__cdecl __processing_throw(void)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
static void * image_base(void)
Definition: dll_register.c:28
return ret
Definition: mutex.c:146
#define ULONG_PTR
Definition: config.h:101
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxCollectionEntry * cur
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum func
Definition: glext.h:6028
GLenum src
Definition: glext.h:6340
GLintptr offset
Definition: glext.h:5920
const GLubyte * c
Definition: glext.h:8905
GLenum GLenum dst
Definition: glext.h:6340
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
GLbitfield flags
Definition: glext.h:7161
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define EXCEPTION_CONTINUE_SEARCH
Definition: excpt.h:91
#define EXCEPTION_CONTINUE_EXECUTION
Definition: excpt.h:92
#define c
Definition: ke_i.h:80
if(dx< 0)
Definition: linetemp.h:194
#define EXCEPTION_FLT_STACK_CHECK
Definition: minwinbase.h:54
#define EXCEPTION_FLT_UNDERFLOW
Definition: minwinbase.h:55
#define EXCEPTION_FLT_OVERFLOW
Definition: minwinbase.h:53
#define EXCEPTION_FLT_DENORMAL_OPERAND
Definition: minwinbase.h:49
#define EXCEPTION_FLT_INEXACT_RESULT
Definition: minwinbase.h:51
#define EXCEPTION_ILLEGAL_INSTRUCTION
Definition: minwinbase.h:60
#define EXCEPTION_ACCESS_VIOLATION
Definition: minwinbase.h:44
#define EXCEPTION_FLT_INVALID_OPERATION
Definition: minwinbase.h:52
#define EXCEPTION_PRIV_INSTRUCTION
Definition: minwinbase.h:58
#define EXCEPTION_FLT_DIVIDE_BY_ZERO
Definition: minwinbase.h:50
static PVOID ptr
Definition: dispmode.c:27
UINT WINAPI nested(MSIHANDLE hinst)
Definition: custom.c:565
static char * dest
Definition: rtl.c:135
unsigned int UINT
Definition: ndis.h:50
#define STATUS_FLOAT_UNDERFLOW
Definition: ntstatus.h:477
#define STATUS_FLOAT_OVERFLOW
Definition: ntstatus.h:475
#define STATUS_LONGJUMP
Definition: ntstatus.h:297
#define STATUS_UNWIND_CONSOLIDATE
Definition: ntstatus.h:300
#define STATUS_FLOAT_DIVIDE_BY_ZERO
Definition: ntstatus.h:472
#define STATUS_FLOAT_INVALID_OPERATION
Definition: ntstatus.h:474
#define STATUS_FLOAT_INEXACT_RESULT
Definition: ntstatus.h:473
@ normal
Definition: optimize.h:166
long LONG
Definition: pedump.c:60
NTSYSAPI PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry(ULONG_PTR, ULONG_PTR *, UNWIND_HISTORY_TABLE *)
NTSYSAPI void WINAPI RtlUnwindEx(void *, void *, EXCEPTION_RECORD *, void *, CONTEXT *, UNWIND_HISTORY_TABLE *)
const char * descr
Definition: boot.c:45
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
PEXCEPTION_RECORD ExceptionRecord
Definition: rtltypes.h:200
PCONTEXT ContextRecord
Definition: rtltypes.h:201
DWORD ExceptionCode
Definition: compat.h:208
DWORD NumberParameters
Definition: compat.h:212
DWORD ExceptionFlags
Definition: compat.h:209
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
Definition: compat.h:213
char mangled[128]
Definition: cxx.h:335
Definition: inflate.c:139
Definition: http.c:7252
EXCEPTION_RECORD * prev_rec
Definition: except.c:139
cxx_frame_info frame_info
Definition: except.c:137
BOOL rethrow
Definition: except.c:138
Definition: comerr.c:44
Definition: dhcpd.h:62
int state
Definition: cppexcept.h:39
DISPATCHER_CONTEXT * dispatch
Definition: except.c:147
const cxx_function_descr * descr
Definition: except.c:148
EXCEPTION_RECORD * seh_rec
Definition: except.c:146
ULONG_PTR dest_frame
Definition: except.c:144
ULONG_PTR orig_frame
Definition: except.c:145
Definition: ps.c:97
UINT catchblock_count
Definition: cppexcept.h:107
UINT catchblock
Definition: cppexcept.h:108
#define EXCEPTION_NONCONTINUABLE
Definition: stubs.h:23
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER
Definition: winbase.h:1210
#define CTRL_C_EVENT
Definition: wincon.h:96
#define WINAPI
Definition: msvc.h:6
#define __EXCEPT_CTX(func, ctx)
Definition: exception.h:63
#define __FINALLY_CTX(func, ctx)
Definition: exception.h:68
#define EXCEPTION_EXIT_UNWIND
Definition: rtltypes.h:156
#define EXCEPTION_UNWINDING
Definition: rtltypes.h:155
#define EXCEPTION_TARGET_UNWIND
Definition: rtltypes.h:159