ReactOS  0.4.14-dev-342-gdc047f9
cppexcept.c
Go to the documentation of this file.
1 /*
2  * msvcrt C++ exception handling
3  *
4  * Copyright 2002 Alexandre Julliard
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  *
20  * NOTES
21  * A good reference is the article "How a C++ compiler implements
22  * exception handling" by Vishal Kochhar, available on
23  * www.thecodeproject.com.
24  */
25 
26 #define __WINE_DEBUG_CHANNEL__
27 #include <precomp.h>
28 #include <stdarg.h>
29 
30 #include <wine/exception.h>
31 #include <internal/wine/msvcrt.h>
33 
34 #ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */
35 
37 
38 DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
41  EXCEPTION_REGISTRATION_RECORD* nested_frame, int nested_trylevel );
42 
43 /* call a function with a given ebp */
44 #ifdef _MSC_VER
45 #pragma warning(disable:4731) // don't warn about modification of ebp
46 #endif
47 static inline void *call_ebp_func( void *func, void *_ebp )
48 {
49  void *result;
50 #ifdef _MSC_VER
51  __asm
52  {
53  mov eax, func
54  push ebx
55  push ebp
56  mov ebp, _ebp
57  call eax
58  pop ebp
59  pop ebx
60  mov result, eax
61  }
62 #else
63  int dummy;
64  __asm__ __volatile__ ("pushl %%ebx\n\t"
65  "pushl %%ebp\n\t"
66  "movl %4,%%ebp\n\t"
67  "call *%%eax\n\t"
68  "popl %%ebp\n\t"
69  "popl %%ebx"
70  : "=a" (result), "=S" (dummy), "=D" (dummy)
71  : "0" (func), "1" (_ebp) : "ecx", "edx", "memory" );
72 #endif
73  return result;
74 }
75 #ifdef _MSC_VER
76 #pragma warning(default:4731)
77 #endif
78 
79 /* call a copy constructor */
80 static inline void call_copy_ctor( void *func, void *this, void *src, int has_vbase )
81 {
82  TRACE( "calling copy ctor %p object %p src %p\n", func, this, src );
83 #ifdef _MSC_VER
84  if (has_vbase)
85  {
86  __asm
87  {
88  mov ecx, this
89  push 1
90  push src
91  call func
92  }
93  }
94  else
95  {
96  __asm
97  {
98  mov ecx, this
99  push src
100  call func
101  }
102  }
103 #else
104  if (has_vbase)
105  /* in that case copy ctor takes an extra bool indicating whether to copy the base class */
106  __asm__ __volatile__("pushl $1; pushl %2; call *%0"
107  : : "r" (func), "c" (this), "r" (src) : "eax", "edx", "memory" );
108  else
109  __asm__ __volatile__("pushl %2; call *%0"
110  : : "r" (func), "c" (this), "r" (src) : "eax", "edx", "memory" );
111 #endif
112 }
113 
114 /* call the destructor of the exception object */
115 static inline void call_dtor( void *func, void *object )
116 {
117 #ifdef _MSC_VER
118  __asm
119  {
120  mov ecx, object
121  call func
122  }
123 #else
124  __asm__ __volatile__("call *%0" : : "r" (func), "c" (object) : "eax", "edx", "memory" );
125 #endif
126 }
127 
128 #ifdef _MSC_VER
129 #pragma warning(push)
130 #pragma warning(disable:4731)
131 /* continue execution to the specified address after exception is caught */
132 __forceinline void DECLSPEC_NORETURN continue_after_catch( cxx_exception_frame* frame, void *addr )
133 {
134  __asm
135  {
136  mov eax, addr
137  mov edx, frame
138  mov esp, [edx-4]
139  lea ebp, [edx+12]
140  jmp eax
141  }
142  for (;;) ; /* unreached */
143 }
144 #pragma warning(pop)
145 #else
146 /* continue execution to the specified address after exception is caught */
147 static inline void DECLSPEC_NORETURN continue_after_catch( cxx_exception_frame* frame, void *addr )
148 {
149  __asm__ __volatile__("movl -4(%0),%%esp; leal 12(%0),%%ebp; jmp *%1"
150  : : "r" (frame), "a" (addr) );
151  for (;;) ; /* unreached */
152 }
153 #endif
154 
155 static inline void dump_type( const cxx_type_info *type )
156 {
157  TRACE( "flags %x type %p %s offsets %d,%d,%d size %d copy ctor %p\n",
158  type->flags, type->type_info, dbgstr_type_info(type->type_info),
159  type->offsets.this_offset, type->offsets.vbase_descr, type->offsets.vbase_offset,
160  type->size, type->copy_ctor );
161 }
162 
163 static void dump_exception_type( const cxx_exception_type *type )
164 {
165  UINT i;
166 
167  TRACE( "flags %x destr %p handler %p type info %p\n",
168  type->flags, type->destructor, type->custom_handler, type->type_info_table );
169  for (i = 0; i < type->type_info_table->count; i++)
170  {
171  TRACE( " %d: ", i );
172  dump_type( type->type_info_table->info[i] );
173  }
174 }
175 
176 static void dump_function_descr( const cxx_function_descr *descr )
177 {
178 #ifndef WINE_NO_TRACE_MSGS
179  UINT i;
180  int j;
181 
182  TRACE( "magic %x\n", descr->magic );
183  TRACE( "unwind table: %p %d\n", descr->unwind_table, descr->unwind_count );
184  for (i = 0; i < descr->unwind_count; i++)
185  {
186  TRACE( " %d: prev %d func %p\n", i,
187  descr->unwind_table[i].prev, descr->unwind_table[i].handler );
188  }
189  TRACE( "try table: %p %d\n", descr->tryblock, descr->tryblock_count );
190  for (i = 0; i < descr->tryblock_count; i++)
191  {
192  TRACE( " %d: start %d end %d catchlevel %d catch %p %d\n", i,
193  descr->tryblock[i].start_level, descr->tryblock[i].end_level,
194  descr->tryblock[i].catch_level, descr->tryblock[i].catchblock,
195  descr->tryblock[i].catchblock_count );
196  for (j = 0; j < descr->tryblock[i].catchblock_count; j++)
197  {
198  const catchblock_info *ptr = &descr->tryblock[i].catchblock[j];
199  TRACE( " %d: flags %x offset %d handler %p type %p %s\n",
200  j, ptr->flags, ptr->offset, ptr->handler,
201  ptr->type_info, dbgstr_type_info( ptr->type_info ) );
202  }
203  }
204 #endif
205  if (descr->magic <= CXX_FRAME_MAGIC_VC6) return;
206  TRACE( "expect list: %p\n", descr->expect_list );
207  if (descr->magic <= CXX_FRAME_MAGIC_VC7) return;
208  TRACE( "flags: %08x\n", descr->flags );
209 }
210 
211 /* check if the exception type is caught by a given catch block, and return the type that matched */
212 static const cxx_type_info *find_caught_type( cxx_exception_type *exc_type,
213  const catchblock_info *catchblock )
214 {
215  UINT i;
216 
217  for (i = 0; i < exc_type->type_info_table->count; i++)
218  {
219  const cxx_type_info *type = exc_type->type_info_table->info[i];
220 
221  if (!catchblock->type_info) return type; /* catch(...) matches any type */
222  if (catchblock->type_info != type->type_info)
223  {
224  if (strcmp( catchblock->type_info->mangled, type->type_info->mangled )) continue;
225  }
226  /* type is the same, now check the flags */
227  if ((exc_type->flags & TYPE_FLAG_CONST) &&
228  !(catchblock->flags & TYPE_FLAG_CONST)) continue;
229  if ((exc_type->flags & TYPE_FLAG_VOLATILE) &&
230  !(catchblock->flags & TYPE_FLAG_VOLATILE)) continue;
231  return type; /* it matched */
232  }
233  return NULL;
234 }
235 
236 
237 /* copy the exception object where the catch block wants it */
238 static void copy_exception( void *object, cxx_exception_frame *frame,
239  const catchblock_info *catchblock, const cxx_type_info *type )
240 {
241  void **dest_ptr;
242 
243  if (!catchblock->type_info || !catchblock->type_info->mangled[0]) return;
244  if (!catchblock->offset) return;
245  dest_ptr = (void **)((char *)&frame->ebp + catchblock->offset);
246 
247  if (catchblock->flags & TYPE_FLAG_REFERENCE)
248  {
249  *dest_ptr = get_this_pointer( &type->offsets, object );
250  }
251  else if (type->flags & CLASS_IS_SIMPLE_TYPE)
252  {
253  memmove( dest_ptr, object, type->size );
254  /* if it is a pointer, adjust it */
255  if (type->size == sizeof(void *)) *dest_ptr = get_this_pointer( &type->offsets, *dest_ptr );
256  }
257  else /* copy the object */
258  {
259  if (type->copy_ctor)
260  call_copy_ctor( type->copy_ctor, dest_ptr, get_this_pointer(&type->offsets,object),
261  (type->flags & CLASS_HAS_VIRTUAL_BASE_CLASS) );
262  else
263  memmove( dest_ptr, get_this_pointer(&type->offsets,object), type->size );
264  }
265 }
266 
267 /* unwind the local function up to a given trylevel */
268 static void cxx_local_unwind( cxx_exception_frame* frame, const cxx_function_descr *descr, int last_level)
269 {
270  void (*handler)(void);
271  int trylevel = frame->trylevel;
272 
273  while (trylevel != last_level)
274  {
275  if (trylevel < 0 || (unsigned)trylevel >= descr->unwind_count)
276  {
277  ERR( "invalid trylevel %d\n", trylevel );
279  }
280  handler = descr->unwind_table[trylevel].handler;
281  if (handler)
282  {
283  TRACE( "calling unwind handler %p trylevel %d last %d ebp %p\n",
284  handler, trylevel, last_level, &frame->ebp );
285  call_ebp_func( handler, &frame->ebp );
286  }
287  trylevel = descr->unwind_table[trylevel].prev;
288  }
289  frame->trylevel = last_level;
290 }
291 
292 /* exception frame for nested exceptions in catch block */
293 struct catch_func_nested_frame
294 {
295  EXCEPTION_REGISTRATION_RECORD frame; /* standard exception frame */
296  EXCEPTION_RECORD *prev_rec; /* previous record to restore in thread data */
297  cxx_exception_frame *cxx_frame; /* frame of parent exception */
298  const cxx_function_descr *descr; /* descriptor of parent exception */
299  int trylevel; /* current try level */
300  EXCEPTION_RECORD *rec; /* rec associated with frame */
301 };
302 
303 /* handler for exceptions happening while calling a catch function */
304 static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
306 {
307  struct catch_func_nested_frame *nested_frame = (struct catch_func_nested_frame *)frame;
308 
310  {
311  msvcrt_get_thread_data()->exc_record = nested_frame->prev_rec;
313  }
314 
315  TRACE( "got nested exception in catch function\n" );
316 
317  if(rec->ExceptionCode == CXX_EXCEPTION)
318  {
319  PEXCEPTION_RECORD prev_rec = nested_frame->rec;
320  if(rec->ExceptionInformation[1] == 0 && rec->ExceptionInformation[2] == 0)
321  {
322  /* exception was rethrown */
323  rec->ExceptionInformation[1] = prev_rec->ExceptionInformation[1];
324  rec->ExceptionInformation[2] = prev_rec->ExceptionInformation[2];
325  TRACE("detect rethrow: re-propagate: obj: %lx, type: %lx\n",
326  rec->ExceptionInformation[1], rec->ExceptionInformation[2]);
327  }
328  else {
329  /* new exception in exception handler, destroy old */
330  void *object = (void*)prev_rec->ExceptionInformation[1];
332  TRACE("detect threw new exception in catch block - destroy old(obj: %p type: %p)\n",
333  object, info);
334  if(info && info->destructor)
335  call_dtor( info->destructor, object );
336  }
337  }
338 
339  return cxx_frame_handler( rec, nested_frame->cxx_frame, context,
340  NULL, nested_frame->descr, &nested_frame->frame,
341  nested_frame->trylevel );
342 }
343 
344 /* find and call the appropriate catch block for an exception */
345 /* returns the address to continue execution to after the catch block was called */
346 static inline void call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame *frame,
347  const cxx_function_descr *descr, int nested_trylevel,
349 {
350  UINT i;
351  int j;
352  void *addr, *object = (void *)rec->ExceptionInformation[1];
353  struct catch_func_nested_frame nested_frame;
354  int trylevel = frame->trylevel;
356  DWORD save_esp = ((DWORD*)frame)[-1];
357 
358  for (i = 0; i < descr->tryblock_count; i++)
359  {
360  const tryblock_info *tryblock = &descr->tryblock[i];
361 
362  if (trylevel < tryblock->start_level) continue;
363  if (trylevel > tryblock->end_level) continue;
364 
365  /* got a try block */
366  for (j = 0; j < tryblock->catchblock_count; j++)
367  {
368  const catchblock_info *catchblock = &tryblock->catchblock[j];
369  if(info)
370  {
371  const cxx_type_info *type = find_caught_type( info, catchblock );
372  if (!type) continue;
373 
374  TRACE( "matched type %p in tryblock %d catchblock %d\n", type, i, j );
375 
376  /* copy the exception to its destination on the stack */
377  copy_exception( object, frame, catchblock, type );
378  }
379  else
380  {
381  /* no CXX_EXCEPTION only proceed with a catch(...) block*/
382  if(catchblock->type_info)
383  continue;
384  TRACE("found catch(...) block\n");
385  }
386 
387  /* unwind the stack */
388  RtlUnwind( frame, 0, rec, 0 );
389  cxx_local_unwind( frame, descr, tryblock->start_level );
390  frame->trylevel = tryblock->end_level + 1;
391 
392  /* call the catch block */
393  TRACE( "calling catch block %p addr %p ebp %p\n",
394  catchblock, catchblock->handler, &frame->ebp );
395 
396  /* setup an exception block for nested exceptions */
397 
398  nested_frame.frame.Handler = (PEXCEPTION_ROUTINE)catch_function_nested_handler;
399  nested_frame.prev_rec = thread_data->exc_record;
400  nested_frame.cxx_frame = frame;
401  nested_frame.descr = descr;
402  nested_frame.trylevel = nested_trylevel + 1;
403  nested_frame.rec = rec;
404 
405  __wine_push_frame( &nested_frame.frame );
406  thread_data->exc_record = rec;
407  addr = call_ebp_func( catchblock->handler, &frame->ebp );
408  thread_data->exc_record = nested_frame.prev_rec;
409  __wine_pop_frame( &nested_frame.frame );
410 
411  ((DWORD*)frame)[-1] = save_esp;
412  if (info && info->destructor) call_dtor( info->destructor, object );
413  TRACE( "done, continuing at %p\n", addr );
414 
415  continue_after_catch( frame, addr );
416  }
417  }
418 }
419 
420 
421 /*********************************************************************
422  * cxx_frame_handler
423  *
424  * Implementation of __CxxFrameHandler.
425  */
426 DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
428  const cxx_function_descr *descr,
429  EXCEPTION_REGISTRATION_RECORD* nested_frame,
430  int nested_trylevel )
431 {
432  cxx_exception_type *exc_type;
433 
434  if (descr->magic < CXX_FRAME_MAGIC_VC6 || descr->magic > CXX_FRAME_MAGIC_VC8)
435  {
436  ERR( "invalid frame magic %x\n", descr->magic );
438  }
439  if (descr->magic >= CXX_FRAME_MAGIC_VC8 &&
440  (descr->flags & FUNC_DESCR_SYNCHRONOUS) &&
441  (rec->ExceptionCode != CXX_EXCEPTION))
442  return ExceptionContinueSearch; /* handle only c++ exceptions */
443 
445  {
446  if (descr->unwind_count && !nested_trylevel) cxx_local_unwind( frame, descr, -1 );
448  }
449  if (!descr->tryblock_count) return ExceptionContinueSearch;
450 
451  if(rec->ExceptionCode == CXX_EXCEPTION)
452  {
453  exc_type = (cxx_exception_type *)rec->ExceptionInformation[2];
454 
456  exc_type->custom_handler)
457  {
458  return exc_type->custom_handler( rec, frame, context, dispatch,
459  descr, nested_trylevel, nested_frame, 0 );
460  }
461 
462  if (TRACE_ON(seh))
463  {
464  TRACE("handling C++ exception rec %p frame %p trylevel %d descr %p nested_frame %p\n",
465  rec, frame, frame->trylevel, descr, nested_frame );
466  dump_exception_type( exc_type );
467  dump_function_descr( descr );
468  }
469  }
470  else
471  {
472  exc_type = NULL;
473  TRACE("handling C exception code %x rec %p frame %p trylevel %d descr %p nested_frame %p\n",
474  rec->ExceptionCode, rec, frame, frame->trylevel, descr, nested_frame );
475  }
476 
477  call_catch_block( rec, frame, descr, frame->trylevel, exc_type );
479 }
480 
481 
482 /*********************************************************************
483  * __CxxFrameHandler (MSVCRT.@)
484  */
487 #ifdef _MSC_VER
490 {
491  __asm
492  {
493  push 0
494  push 0
495  push eax
496  push [esp + 28]
497  push [esp + 28]
498  push [esp + 28]
499  push [esp + 28]
500  call cxx_frame_handler
501  add esp, 28
502  ret
503  }
504 }
505 #else
507  "pushl $0\n\t" /* nested_trylevel */
508  __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
509  "pushl $0\n\t" /* nested_frame */
510  __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
511  "pushl %eax\n\t" /* descr */
512  __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
513  "pushl 28(%esp)\n\t" /* dispatch */
514  __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
515  "pushl 28(%esp)\n\t" /* context */
516  __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
517  "pushl 28(%esp)\n\t" /* frame */
518  __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
519  "pushl 28(%esp)\n\t" /* rec */
520  __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
521  "call " __ASM_NAME("cxx_frame_handler") "\n\t"
522  "add $28,%esp\n\t"
523  __ASM_CFI(".cfi_adjust_cfa_offset -28\n\t")
524  "ret" )
525 #endif
526 
527 /*********************************************************************
528  * __CxxLongjmpUnwind (MSVCRT.@)
529  *
530  * Callback meant to be used as UnwindFunc for setjmp/longjmp.
531  */
532 void __stdcall __CxxLongjmpUnwind( const struct __JUMP_BUFFER *buf )
533 {
534  cxx_exception_frame *frame = (cxx_exception_frame *)buf->Registration;
535  const cxx_function_descr *descr = (const cxx_function_descr *)buf->UnwindData[0];
536 
537  TRACE( "unwinding frame %p descr %p trylevel %ld\n", frame, descr, buf->TryLevel );
538  cxx_local_unwind( frame, descr, buf->TryLevel );
539 }
540 
541 #endif /* __i386__ */
542 
543 
544 /*********************************************************************
545  * __CppXcptFilter (MSVCRT.@)
546  */
548 {
549  /* only filter c++ exceptions */
551  return _XcptFilter( ex, ptr );
552 }
553 
554 /*********************************************************************
555  * _CxxThrowException (MSVCRT.@)
556  */
558 {
559  ULONG_PTR args[3];
560 
562  args[1] = (ULONG_PTR)object;
563  args[2] = (ULONG_PTR)type;
565 }
566 
567 /*********************************************************************
568  * __CxxDetectRethrow (MSVCRT.@)
569  */
571 {
572  PEXCEPTION_RECORD rec;
573 
574  if (!ptrs)
575  return FALSE;
576 
577  rec = ptrs->ExceptionRecord;
578 
579  if (rec->ExceptionCode == CXX_EXCEPTION &&
580  rec->NumberParameters == 3 &&
582  rec->ExceptionInformation[2])
583  {
584  ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record;
585  return TRUE;
586  }
587  return (msvcrt_get_thread_data()->exc_record == rec);
588 }
589 
590 /*********************************************************************
591  * __CxxQueryExceptionSize (MSVCRT.@)
592  */
593 unsigned int CDECL __CxxQueryExceptionSize(void)
594 {
595  return sizeof(cxx_exception_type);
596 }
int add
Definition: i386-dis.c:3122
GLenum func
Definition: glext.h:6028
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
#define TRUE
Definition: types.h:120
Definition: comerr.c:44
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
struct __cxx_exception_type cxx_exception_type
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx movl TEMP incl eax andl eax ecx incl ebx eax jnz xchgl ecx incl TEMP esp ecx subl ebx pushl ecx ecx edx ecx ecx mm0 mm4 mm0 mm4 mm1 mm5 mm1 mm5 mm2 mm6 mm2 mm6 mm3 mm7 mm3 mm7 paddd mm0 paddd mm4 paddd mm0 paddd mm4 paddd mm0 paddd mm4 movq mm1 movq mm5 mm1 mm5 paddd mm0 paddd mm4 mm0 mm4 packssdw mm0 packssdw mm4 mm1 punpckldq mm0 pand mm1 pand mm0 por mm1 movq edi esi edx edi decl ecx jnz popl ecx ecx jecxz mm0 mm0 mm1 mm1 mm2 mm2 mm3 mm3 paddd mm0 paddd mm0 paddd mm0 movq mm1 mm1 paddd mm0 mm0 packssdw mm0 movd eax movw edi esi edx esi ecx mm0 mm4 mm0 mm4 mm1 mm5 mm1 mm5 mm2 mm6 mm2 mm6 mm3 mm7 mm3 mm7 paddd mm0 paddd mm4 paddd mm0 paddd mm4 paddd mm0 paddd mm4 movq mm1 movq mm5 mm1 mm5 paddd mm1 paddd mm5 mm1 mm5 packssdw mm1 packssdw mm5 psubd mm0 psubd mm4 psubsw mm0 psubsw mm4 mm1 punpckldq mm0 pand mm1 pand mm0 por mm1 movq edi esi edx edi decl ecx jnz mm0 mm0 mm1 mm1 mm2 mm2 mm3 mm3 paddd mm0 paddd mm0 paddd mm0 movq mm1 mm1 paddd mm1 mm1 packssdw mm1 psubd mm0 psubsw mm0 movd eax movw edi emms popl ebx popl esi popl edi mov ebp
Definition: synth_sse3d.h:248
Definition: http.c:6587
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define TYPE_FLAG_VOLATILE
Definition: cppexcept.h:74
#define CLASS_IS_SIMPLE_TYPE
Definition: cppexcept.h:80
LONG NTSTATUS
Definition: precomp.h:26
#define TYPE_FLAG_REFERENCE
Definition: cppexcept.h:75
NTSYSAPI VOID NTAPI RtlUnwind(_In_opt_ PVOID TargetFrame, _In_opt_ PVOID TargetIp, _In_opt_ PEXCEPTION_RECORD ExceptionRecord, _In_ PVOID ReturnValue)
Definition: except.c:47
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
int catchblock_count
Definition: cppexcept.h:83
#define CXX_FRAME_MAGIC_VC6
Definition: cppexcept.h:24
static calc_node_t * pop(void)
Definition: rpn_ieee.c:90
Definition: match.c:390
const catchblock_info * catchblock
Definition: cppexcept.h:84
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
#define EH_NONCONTINUABLE
Definition: stubs.h:9
uint32_t ULONG_PTR
Definition: typedefs.h:63
char mangled[16]
Definition: cpp.c:36
#define __ASM_GLOBAL_FUNC(name, code)
Definition: port.h:201
DWORD ExceptionCode
Definition: compat.h:196
#define EXCEPTION_CONTINUE_SEARCH
Definition: excpt.h:86
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
DWORD __CxxFrameHandler(PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD *ExceptionRegistrationFrame, PCONTEXT context, EXCEPTION_REGISTRATION_RECORD **_ExceptionRecord)
Definition: ehandler.c:20
unsigned int BOOL
Definition: ntddk_ex.h:94
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
#define TYPE_FLAG_CONST
Definition: cppexcept.h:73
#define __ASM_NAME(name)
Definition: config.h:934
static PVOID ptr
Definition: dispmode.c:27
static EXCEPTION_REGISTRATION_RECORD * __wine_push_frame(EXCEPTION_REGISTRATION_RECORD *frame)
Definition: exception.h:88
BOOL CDECL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs)
Definition: cppexcept.c:570
smooth NULL
Definition: ftsmooth.c:416
cxx_exc_custom_handler custom_handler
Definition: cppexcept.h:112
static const char * dbgstr_type_info(const type_info *info)
Definition: cppexcept.h:128
#define __ASM_CFI(str)
Definition: asm.h:39
EXCEPTION_ROUTINE * PEXCEPTION_ROUTINE
Definition: compat.h:377
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
void WINAPI _CxxThrowException(exception *object, const cxx_exception_type *type)
Definition: cppexcept.c:557
#define EH_UNWINDING
Definition: exception.h:15
#define TRACE(s)
Definition: solgame.cpp:4
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
Definition: compat.h:201
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl eax
Definition: synth_sse3d.h:85
if(!(yy_init))
Definition: macro.lex.yy.c:714
static void * get_this_pointer(const this_ptr_offsets *off, void *object)
Definition: cppexcept.h:136
#define CXX_FRAME_MAGIC_VC8
Definition: cppexcept.h:26
#define WINAPI
Definition: msvc.h:8
void(* handler)(void)
Definition: cppexcept.h:71
const char * descr
Definition: boot.c:45
unsigned long DWORD
Definition: ntddk_ex.h:95
const type_info * type_info
Definition: cppexcept.h:69
#define __stdcall
Definition: typedefs.h:25
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl ebx
Definition: synth_sse3d.h:83
int ret
GLenum const GLvoid * addr
Definition: glext.h:9621
GLenum src
Definition: glext.h:6340
thread_data_t * msvcrt_get_thread_data(void)
Definition: tls.c:31
void dispatch(HANDLE hStopEvent)
Definition: dispatch.c:66
#define EH_EXIT_UNWIND
Definition: exception.h:16
#define ERR(fmt,...)
Definition: debug.h:109
int CDECL __CppXcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
Definition: cppexcept.c:547
VOID WINAPI RaiseException(IN DWORD dwExceptionCode, IN DWORD dwExceptionFlags, IN DWORD nNumberOfArguments, IN CONST ULONG_PTR *lpArguments OPTIONAL)
Definition: except.c:693
#define CDECL
Definition: compat.h:21
#define FUNC_DESCR_SYNCHRONOUS
Definition: cppexcept.h:29
unsigned char dummy
Definition: maze.c:118
const cxx_type_info_table * type_info_table
Definition: cppexcept.h:113
unsigned int UINT
Definition: ndis.h:50
int CDECL _XcptFilter(NTSTATUS, PEXCEPTION_POINTERS)
unsigned int CDECL __CxxQueryExceptionSize(void)
Definition: cppexcept.c:593
static void dump_type(type_t *t)
Definition: write_msft.c:1037
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define ULONG_PTR
Definition: config.h:101
DWORD ExceptionFlags
Definition: compat.h:197
PEXCEPTION_RECORD ExceptionRecord
Definition: rtltypes.h:196
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7786
DWORD NumberParameters
Definition: compat.h:200
ecx edi ebx edx edi decl ecx esi eax jecxz decl eax andl eax esi movl edx
Definition: synth_sse3d.h:85
static void push(calc_node_t *op)
Definition: rpn_ieee.c:113
GLuint64EXT * result
Definition: glext.h:11304
#define TRACE_ON(x)
Definition: compat.h:65
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
void __cdecl MSVCRT_terminate(void)
Definition: cpp.c:1080
#define CXX_FRAME_MAGIC_VC7
Definition: cppexcept.h:25
static EXCEPTION_REGISTRATION_RECORD * __wine_pop_frame(EXCEPTION_REGISTRATION_RECORD *frame)
Definition: exception.h:102
#define CLASS_HAS_VIRTUAL_BASE_CLASS
Definition: cppexcept.h:81
jmp_buf jmp
Definition: mach.c:35
const cxx_type_info * info[3]
Definition: cppexcept.h:88
#define CXX_EXCEPTION
Definition: cppexcept.h:27