ReactOS  0.4.14-dev-317-g96040ec
cpp.c
Go to the documentation of this file.
1 /*
2  * msvcrt.dll C++ objects
3  *
4  * Copyright 2000 Jon Griffiths
5  * Copyright 2003, 2004 Alexandre Julliard
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 
22 #include <precomp.h>
23 
24 #include <wine/exception.h>
25 #include <internal/wine/msvcrt.h>
27 
28 typedef exception bad_cast;
29 typedef exception bad_typeid;
30 typedef exception __non_rtti_object;
31 
32 typedef struct _rtti_base_descriptor
33 {
36  this_ptr_offsets offsets; /* offsets for computing the this pointer */
37  unsigned int attributes;
39 
40 typedef struct _rtti_base_array
41 {
42  const rtti_base_descriptor *bases[3]; /* First element is the class itself */
44 
45 typedef struct _rtti_object_hierarchy
46 {
47  unsigned int signature;
48  unsigned int attributes;
49  int array_len; /* Size of the array pointed to by 'base_classes' */
52 
53 typedef struct _rtti_object_locator
54 {
55  unsigned int signature;
57  unsigned int flags;
61 
62 #ifdef __i386__ /* thiscall functions are i386-specific */
63 
64 #define THISCALL(func) __thiscall_ ## func
65 #define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
66 
67 #ifdef _MSC_VER
68 #include <internal/wine_msc.h>
69 #else
70 #define DEFINE_THISCALL_WRAPPER(func,args) \
71  extern void THISCALL(func)(void); \
72  __ASM_GLOBAL_FUNC(__thiscall_ ## func, \
73  "popl %eax\n\t" \
74  "pushl %ecx\n\t" \
75  "pushl %eax\n\t" \
76  "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
77 #endif /* _MSC_VER */
78 
79 #else /* __i386__ */
80 
81 #define THISCALL(func) func
82 #define THISCALL_NAME(func) __ASM_NAME(#func)
83 #define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */
84 
85 #endif /* __i386__ */
86 
92 
93 /* get the vtable pointer for a C++ object */
94 static inline const vtable_ptr *get_vtable( void *obj )
95 {
96  return *(const vtable_ptr **)obj;
97 }
98 
99 static inline const rtti_object_locator *get_obj_locator( void *cppobj )
100 {
101  const vtable_ptr *vtable = get_vtable( cppobj );
102  return (const rtti_object_locator *)vtable[-1];
103 }
104 
106 {
107  int i;
108  const rtti_object_hierarchy *h = ptr->type_hierarchy;
109 
110  TRACE( "%p: sig=%08x base_offset=%08x flags=%08x type=%p %s hierarchy=%p\n",
111  ptr, ptr->signature, ptr->base_class_offset, ptr->flags,
112  ptr->type_descriptor, dbgstr_type_info(ptr->type_descriptor), ptr->type_hierarchy );
113  TRACE( " hierarchy: sig=%08x attr=%08x len=%d base classes=%p\n",
114  h->signature, h->attributes, h->array_len, h->base_classes );
115  for (i = 0; i < h->array_len; i++)
116  {
117  TRACE( " base class %p: num %d off %d,%d,%d attr %08x type %p %s\n",
118  h->base_classes->bases[i],
119  h->base_classes->bases[i]->num_base_classes,
120  h->base_classes->bases[i]->offsets.this_offset,
121  h->base_classes->bases[i]->offsets.vbase_descr,
122  h->base_classes->bases[i]->offsets.vbase_offset,
123  h->base_classes->bases[i]->attributes,
124  h->base_classes->bases[i]->type_descriptor,
125  dbgstr_type_info(h->base_classes->bases[i]->type_descriptor) );
126  }
127 }
128 
129 /* Internal common ctor for exception */
130 static void EXCEPTION_ctor(exception *_this, const char** name)
131 {
133  if (*name)
134  {
135  size_t name_len = strlen(*name) + 1;
136  _this->name = MSVCRT_malloc(name_len);
137  memcpy(_this->name, *name, name_len);
138  _this->do_free = TRUE;
139  }
140  else
141  {
142  _this->name = NULL;
143  _this->do_free = FALSE;
144  }
145 }
146 
147 /******************************************************************
148  * ??0exception@@QAE@ABQBD@Z (MSVCRT.@)
149  */
152 {
153  TRACE("(%p,%s)\n", _this, *name);
154  EXCEPTION_ctor(_this, name);
155  return _this;
156 }
157 
158 /******************************************************************
159  * ??0exception@@QAE@ABQBDH@Z (MSVCRT.@)
160  */
163 {
164  TRACE("(%p,%s)\n", _this, *name);
165  _this->vtable = &MSVCRT_exception_vtable;
166  _this->name = *name;
167  _this->do_free = FALSE;
168  return _this;
169 }
170 
171 /******************************************************************
172  * ??0exception@@QAE@ABV0@@Z (MSVCRT.@)
173  */
176 {
177  TRACE("(%p,%p)\n", _this, rhs);
178 
179  if (!rhs->do_free)
180  {
181  _this->vtable = &MSVCRT_exception_vtable;
182  _this->name = rhs->name;
183  _this->do_free = FALSE;
184  }
185  else
186  EXCEPTION_ctor(_this, (const char**)&rhs->name);
187  TRACE("name = %s\n", _this->name);
188  return _this;
189 }
190 
191 /******************************************************************
192  * ??0exception@@QAE@XZ (MSVCRT.@)
193  */
196 {
197  static const char* empty = NULL;
198 
199  TRACE("(%p)\n", _this);
200  EXCEPTION_ctor(_this, &empty);
201  return _this;
202 }
203 
204 /******************************************************************
205  * ??1exception@@UAE@XZ (MSVCRT.@)
206  */
209 {
210  TRACE("(%p)\n", _this);
211  _this->vtable = &MSVCRT_exception_vtable;
212  if (_this->do_free) MSVCRT_free(_this->name);
213 }
214 
215 /******************************************************************
216  * ??4exception@@QAEAAV0@ABV0@@Z (MSVCRT.@)
217  */
220 {
221  TRACE("(%p %p)\n", _this, rhs);
222  if (_this != rhs)
223  {
224  MSVCRT_exception_dtor(_this);
225  MSVCRT_exception_copy_ctor(_this, rhs);
226  }
227  TRACE("name = %s\n", _this->name);
228  return _this;
229 }
230 
231 /******************************************************************
232  * ??_Eexception@@UAEPAXI@Z (MSVCRT.@)
233  */
236 {
237  TRACE("(%p %x)\n", _this, flags);
238  if (flags & 2)
239  {
240  /* we have an array, with the number of elements stored before the first object */
241  int i, *ptr = (int *)_this - 1;
242 
243  for (i = *ptr - 1; i >= 0; i--) MSVCRT_exception_dtor(_this + i);
245  }
246  else
247  {
248  MSVCRT_exception_dtor(_this);
249  if (flags & 1) MSVCRT_operator_delete(_this);
250  }
251  return _this;
252 }
253 
254 /******************************************************************
255  * ??_Gexception@@UAEPAXI@Z (MSVCRT.@)
256  */
259 {
260  TRACE("(%p %x)\n", _this, flags);
261  MSVCRT_exception_dtor(_this);
262  if (flags & 1) MSVCRT_operator_delete(_this);
263  return _this;
264 }
265 
266 /******************************************************************
267  * ?what@exception@@UBEPBDXZ (MSVCRT.@)
268  */
271 {
272  TRACE("(%p) returning %s\n", _this, _this->name);
273  return _this->name ? _this->name : "Unknown exception";
274 }
275 
276 /******************************************************************
277  * ??0bad_typeid@@QAE@ABV0@@Z (MSVCRT.@)
278  */
280 bad_typeid * __stdcall MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs)
281 {
282  TRACE("(%p %p)\n", _this, rhs);
283  MSVCRT_exception_copy_ctor(_this, rhs);
284  _this->vtable = &MSVCRT_bad_typeid_vtable;
285  return _this;
286 }
287 
288 /******************************************************************
289  * ??0bad_typeid@@QAE@PBD@Z (MSVCRT.@)
290  */
292 bad_typeid * __stdcall MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name)
293 {
294  TRACE("(%p %s)\n", _this, name);
295  EXCEPTION_ctor(_this, &name);
296  _this->vtable = &MSVCRT_bad_typeid_vtable;
297  return _this;
298 }
299 
300 /******************************************************************
301  * ??_Fbad_typeid@@QAEXXZ (MSVCRT.@)
302  */
304 bad_typeid * __stdcall MSVCRT_bad_typeid_default_ctor(bad_typeid * _this)
305 {
306  return MSVCRT_bad_typeid_ctor( _this, "bad typeid" );
307 }
308 
309 /******************************************************************
310  * ??1bad_typeid@@UAE@XZ (MSVCRT.@)
311  */
314 {
315  TRACE("(%p)\n", _this);
316  MSVCRT_exception_dtor(_this);
317 }
318 
319 /******************************************************************
320  * ??4bad_typeid@@QAEAAV0@ABV0@@Z (MSVCRT.@)
321  */
323 bad_typeid * __stdcall MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs)
324 {
325  TRACE("(%p %p)\n", _this, rhs);
326  MSVCRT_exception_opequals(_this, rhs);
327  return _this;
328 }
329 
330 /******************************************************************
331  * ??_Ebad_typeid@@UAEPAXI@Z (MSVCRT.@)
332  */
334 void * __stdcall MSVCRT_bad_typeid_vector_dtor(bad_typeid * _this, unsigned int flags)
335 {
336  TRACE("(%p %x)\n", _this, flags);
337  if (flags & 2)
338  {
339  /* we have an array, with the number of elements stored before the first object */
340  int i, *ptr = (int *)_this - 1;
341 
342  for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_typeid_dtor(_this + i);
344  }
345  else
346  {
347  MSVCRT_bad_typeid_dtor(_this);
348  if (flags & 1) MSVCRT_operator_delete(_this);
349  }
350  return _this;
351 }
352 
353 /******************************************************************
354  * ??_Gbad_typeid@@UAEPAXI@Z (MSVCRT.@)
355  */
357 void * __stdcall MSVCRT_bad_typeid_scalar_dtor(bad_typeid * _this, unsigned int flags)
358 {
359  TRACE("(%p %x)\n", _this, flags);
360  MSVCRT_bad_typeid_dtor(_this);
361  if (flags & 1) MSVCRT_operator_delete(_this);
362  return _this;
363 }
364 
365 /******************************************************************
366  * ??0__non_rtti_object@@QAE@ABV0@@Z (MSVCRT.@)
367  */
369 __non_rtti_object * __stdcall MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this,
370  const __non_rtti_object * rhs)
371 {
372  TRACE("(%p %p)\n", _this, rhs);
373  MSVCRT_bad_typeid_copy_ctor(_this, rhs);
374  _this->vtable = &MSVCRT___non_rtti_object_vtable;
375  return _this;
376 }
377 
378 /******************************************************************
379  * ??0__non_rtti_object@@QAE@PBD@Z (MSVCRT.@)
380  */
382 __non_rtti_object * __stdcall MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this,
383  const char * name)
384 {
385  TRACE("(%p %s)\n", _this, name);
386  EXCEPTION_ctor(_this, &name);
387  _this->vtable = &MSVCRT___non_rtti_object_vtable;
388  return _this;
389 }
390 
391 /******************************************************************
392  * ??1__non_rtti_object@@UAE@XZ (MSVCRT.@)
393  */
395 void __stdcall MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this)
396 {
397  TRACE("(%p)\n", _this);
398  MSVCRT_bad_typeid_dtor(_this);
399 }
400 
401 /******************************************************************
402  * ??4__non_rtti_object@@QAEAAV0@ABV0@@Z (MSVCRT.@)
403  */
405 __non_rtti_object * __stdcall MSVCRT___non_rtti_object_opequals(__non_rtti_object * _this,
406  const __non_rtti_object *rhs)
407 {
408  TRACE("(%p %p)\n", _this, rhs);
409  MSVCRT_bad_typeid_opequals(_this, rhs);
410  return _this;
411 }
412 
413 /******************************************************************
414  * ??_E__non_rtti_object@@UAEPAXI@Z (MSVCRT.@)
415  */
417 void * __stdcall MSVCRT___non_rtti_object_vector_dtor(__non_rtti_object * _this, unsigned int flags)
418 {
419  TRACE("(%p %x)\n", _this, flags);
420  if (flags & 2)
421  {
422  /* we have an array, with the number of elements stored before the first object */
423  int i, *ptr = (int *)_this - 1;
424 
425  for (i = *ptr - 1; i >= 0; i--) MSVCRT___non_rtti_object_dtor(_this + i);
427  }
428  else
429  {
431  if (flags & 1) MSVCRT_operator_delete(_this);
432  }
433  return _this;
434 }
435 
436 /******************************************************************
437  * ??_G__non_rtti_object@@UAEPAXI@Z (MSVCRT.@)
438  */
440 void * __stdcall MSVCRT___non_rtti_object_scalar_dtor(__non_rtti_object * _this, unsigned int flags)
441 {
442  TRACE("(%p %x)\n", _this, flags);
444  if (flags & 1) MSVCRT_operator_delete(_this);
445  return _this;
446 }
447 
448 /******************************************************************
449  * ??0bad_cast@@AAE@PBQBD@Z (MSVCRT.@)
450  * ??0bad_cast@@QAE@ABQBD@Z (MSVCRT.@)
451  */
453 bad_cast * __stdcall MSVCRT_bad_cast_ctor(bad_cast * _this, const char ** name)
454 {
455  TRACE("(%p %s)\n", _this, *name);
456  EXCEPTION_ctor(_this, name);
457  _this->vtable = &MSVCRT_bad_cast_vtable;
458  return _this;
459 }
460 
461 /******************************************************************
462  * ??0bad_cast@@QAE@ABV0@@Z (MSVCRT.@)
463  */
465 bad_cast * __stdcall MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs)
466 {
467  TRACE("(%p %p)\n", _this, rhs);
468  MSVCRT_exception_copy_ctor(_this, rhs);
469  _this->vtable = &MSVCRT_bad_cast_vtable;
470  return _this;
471 }
472 
473 /******************************************************************
474  * ??0bad_cast@@QAE@PBD@Z (MSVCRT.@)
475  */
477 bad_cast * __stdcall MSVCRT_bad_cast_ctor_charptr(bad_cast * _this, const char * name)
478 {
479  TRACE("(%p %s)\n", _this, name);
480  EXCEPTION_ctor(_this, &name);
481  _this->vtable = &MSVCRT_bad_cast_vtable;
482  return _this;
483 }
484 
485 /******************************************************************
486  * ??_Fbad_cast@@QAEXXZ (MSVCRT.@)
487  */
489 bad_cast * __stdcall MSVCRT_bad_cast_default_ctor(bad_cast * _this)
490 {
491  return MSVCRT_bad_cast_ctor_charptr( _this, "bad cast" );
492 }
493 
494 /******************************************************************
495  * ??1bad_cast@@UAE@XZ (MSVCRT.@)
496  */
499 {
500  TRACE("(%p)\n", _this);
501  MSVCRT_exception_dtor(_this);
502 }
503 
504 /******************************************************************
505  * ??4bad_cast@@QAEAAV0@ABV0@@Z (MSVCRT.@)
506  */
508 bad_cast * __stdcall MSVCRT_bad_cast_opequals(bad_cast * _this, const bad_cast * rhs)
509 {
510  TRACE("(%p %p)\n", _this, rhs);
511  MSVCRT_exception_opequals(_this, rhs);
512  return _this;
513 }
514 
515 /******************************************************************
516  * ??_Ebad_cast@@UAEPAXI@Z (MSVCRT.@)
517  */
519 void * __stdcall MSVCRT_bad_cast_vector_dtor(bad_cast * _this, unsigned int flags)
520 {
521  TRACE("(%p %x)\n", _this, flags);
522  if (flags & 2)
523  {
524  /* we have an array, with the number of elements stored before the first object */
525  int i, *ptr = (int *)_this - 1;
526 
527  for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_cast_dtor(_this + i);
529  }
530  else
531  {
532  MSVCRT_bad_cast_dtor(_this);
533  if (flags & 1) MSVCRT_operator_delete(_this);
534  }
535  return _this;
536 }
537 
538 /******************************************************************
539  * ??_Gbad_cast@@UAEPAXI@Z (MSVCRT.@)
540  */
542 void * __stdcall MSVCRT_bad_cast_scalar_dtor(bad_cast * _this, unsigned int flags)
543 {
544  TRACE("(%p %x)\n", _this, flags);
545  MSVCRT_bad_cast_dtor(_this);
546  if (flags & 1) MSVCRT_operator_delete(_this);
547  return _this;
548 }
549 
550 /******************************************************************
551  * ??8type_info@@QBEHABV0@@Z (MSVCRT.@)
552  */
555 {
556  int ret = !strcmp(_this->mangled + 1, rhs->mangled + 1);
557  TRACE("(%p %p) returning %d\n", _this, rhs, ret);
558  return ret;
559 }
560 
561 /******************************************************************
562  * ??9type_info@@QBEHABV0@@Z (MSVCRT.@)
563  */
566 {
567  int ret = !!strcmp(_this->mangled + 1, rhs->mangled + 1);
568  TRACE("(%p %p) returning %d\n", _this, rhs, ret);
569  return ret;
570 }
571 
572 /******************************************************************
573  * ?before@type_info@@QBEHABV1@@Z (MSVCRT.@)
574  */
577 {
578  int ret = strcmp(_this->mangled + 1, rhs->mangled + 1) < 0;
579  TRACE("(%p %p) returning %d\n", _this, rhs, ret);
580  return ret;
581 }
582 
583 /******************************************************************
584  * ??1type_info@@UAE@XZ (MSVCRT.@)
585  */
588 {
589  TRACE("(%p)\n", _this);
590  MSVCRT_free(_this->name);
591 }
592 
593 /******************************************************************
594  * ?name@type_info@@QBEPBDXZ (MSVCRT.@)
595  */
598 {
599  if (!_this->name)
600  {
601  /* Create and set the demangled name */
602  /* Note: mangled name in type_info struct always starts with a '.', while
603  * it isn't valid for mangled name.
604  * Is this '.' really part of the mangled name, or has it some other meaning ?
605  */
606  char* name = __unDName(0, _this->mangled + 1, 0,
608  if (name)
609  {
610  size_t len = strlen(name);
611 
612  /* It seems _unDName may leave blanks at the end of the demangled name */
613  while (len && name[--len] == ' ')
614  name[len] = '\0';
615 
616  if (InterlockedCompareExchangePointer((void**)&_this->name, name, NULL))
617  {
618  /* Another thread set this member since we checked above - use it */
619  MSVCRT_free(name);
620  }
621  }
622  }
623  TRACE("(%p) returning %s\n", _this, _this->name);
624  return _this->name;
625 }
626 
627 /******************************************************************
628  * ?raw_name@type_info@@QBEPBDXZ (MSVCRT.@)
629  */
632 {
633  TRACE("(%p) returning %s\n", _this, _this->mangled);
634  return _this->mangled;
635 }
636 
637 /* Unexported */
640 {
641  TRACE("(%p %x)\n", _this, flags);
642  if (flags & 2)
643  {
644  /* we have an array, with the number of elements stored before the first object */
645  int i, *ptr = (int *)_this - 1;
646 
647  for (i = *ptr - 1; i >= 0; i--) MSVCRT_type_info_dtor(_this + i);
649  }
650  else
651  {
652  MSVCRT_type_info_dtor(_this);
653  if (flags & 1) MSVCRT_operator_delete(_this);
654  }
655  return _this;
656 }
657 
658 /* vtables */
659 
660 #ifdef __GNUC__
661 #ifdef _WIN64
662 
663 #define __ASM_VTABLE(name,funcs) \
664  __asm__(".data\n" \
665  "\t.align 8\n" \
666  "\t.quad " __ASM_NAME(#name "_rtti") "\n" \
667  "\t.globl " __ASM_NAME("MSVCRT_" #name "_vtable") "\n" \
668  __ASM_NAME("MSVCRT_" #name "_vtable") ":\n" \
669  "\t.quad " THISCALL_NAME(MSVCRT_ ## name ## _vector_dtor) "\n" \
670  funcs "\n\t.text");
671 
672 #define __ASM_EXCEPTION_VTABLE(name) \
673  __ASM_VTABLE(name, "\t.quad " THISCALL_NAME(MSVCRT_what_exception) )
674 
675 #else
676 
677 #define __ASM_VTABLE(name,funcs) \
678  __asm__(".data\n" \
679  "\t.align 4\n" \
680  "\t.long " __ASM_NAME(#name "_rtti") "\n" \
681  "\t.globl " __ASM_NAME("MSVCRT_" #name "_vtable") "\n" \
682  __ASM_NAME("MSVCRT_" #name "_vtable") ":\n" \
683  "\t.long " THISCALL_NAME(MSVCRT_ ## name ## _vector_dtor) "\n" \
684  funcs "\n\t.text");
685 
686 #define __ASM_EXCEPTION_VTABLE(name) \
687  __ASM_VTABLE(name, "\t.long " THISCALL_NAME(MSVCRT_what_exception) )
688 
689 #endif /* _WIN64 */
690 
691 #ifndef __GNUC__
692 void __asm_dummy_vtables(void) {
693 #endif
694 
696 __ASM_EXCEPTION_VTABLE(exception)
697 __ASM_EXCEPTION_VTABLE(bad_typeid)
698 __ASM_EXCEPTION_VTABLE(bad_cast)
699 __ASM_EXCEPTION_VTABLE(__non_rtti_object)
700 
701 #ifndef __GNUC__
702 }
703 #endif
704 #endif
705 
706 /* Static RTTI for exported objects */
707 
709 {
711  NULL,
712  ".?AVexception@@"
713 };
714 
716 {
718  0,
719  { 0, -1, 0 },
720  0
721 };
722 
724 {
725  {
727  NULL,
728  NULL
729  }
730 };
731 
733 {
734  0,
735  0,
736  1,
738 };
739 
741 {
742  0,
743  0,
744  0,
747 };
748 
750 {
751  0,
753  { 0, -1, 0 },
754  sizeof(exception),
756 };
757 
759 {
761  NULL,
762  ".?AVbad_typeid@@"
763 };
764 
766 {
768  1,
769  { 0, -1, 0 },
770  0
771 };
772 
774 {
775  {
778  NULL
779  }
780 };
781 
783 {
784  0,
785  0,
786  2,
788 };
789 
791 {
792  0,
793  0,
794  0,
797 };
798 
800 {
801  0,
803  { 0, -1, 0 },
804  sizeof(exception),
806 };
807 
809 {
811  NULL,
812  ".?AVbad_cast@@"
813 };
814 
816 {
818  1,
819  { 0, -1, 0 },
820  0
821 };
822 
824 {
825  {
828  NULL
829  }
830 };
831 
833 {
834  0,
835  0,
836  2,
838 };
839 
841 {
842  0,
843  0,
844  0,
847 };
848 
850 {
851  0,
853  { 0, -1, 0 },
854  sizeof(exception),
856 };
857 
859 {
861  NULL,
862  ".?AV__non_rtti_object@@"
863 };
864 
866 {
868  2,
869  { 0, -1, 0 },
870  0
871 };
872 
874 {
875  {
879  }
880 };
881 
883 {
884  0,
885  0,
886  3,
888 };
889 
891 {
892  0,
893  0,
894  0,
897 };
898 
900 {
901  0,
903  { 0, -1, 0 },
904  sizeof(exception),
906 };
907 
909 {
911  NULL,
912  ".?AVtype_info@@"
913 };
914 
916 {
918  0,
919  { 0, -1, 0 },
920  0
921 };
922 
924 {
925  {
927  NULL,
928  NULL
929  }
930 };
931 
933 {
934  0,
935  0,
936  1,
938 };
939 
941 {
942  0,
943  0,
944  0,
947 };
948 
949 /*
950  * Exception RTTI for cpp objects
951  */
953 {
954  3,
955  {
959  }
960 };
961 
963 {
964  0,
966  NULL,
968 };
969 
971 {
972  2,
973  {
976  NULL
977  }
978 };
979 
981 {
982  0,
984  NULL,
986 };
987 
989 {
990  0,
992  NULL,
994 };
995 
996 
997 /******************************************************************
998  * ?set_terminate@@YAP6AXXZP6AXXZ@Z (MSVCRT.@)
999  *
1000  * Install a handler to be called when terminate() is called.
1001  *
1002  * PARAMS
1003  * func [I] Handler function to install
1004  *
1005  * RETURNS
1006  * The previously installed handler function, if any.
1007  */
1009 {
1011  terminate_function previous = data->terminate_handler;
1012  TRACE("(%p) returning %p\n",func,previous);
1013  data->terminate_handler = func;
1014  return previous;
1015 }
1016 
1017 /******************************************************************
1018  * _get_terminate (MSVCRT.@)
1019  */
1021 {
1023  return data->terminate_handler;
1024 }
1025 
1026 /******************************************************************
1027  * ?set_unexpected@@YAP6AXXZP6AXXZ@Z (MSVCRT.@)
1028  *
1029  * Install a handler to be called when unexpected() is called.
1030  *
1031  * PARAMS
1032  * func [I] Handler function to install
1033  *
1034  * RETURNS
1035  * The previously installed handler function, if any.
1036  */
1038 {
1040  unexpected_function previous = data->unexpected_handler;
1041  TRACE("(%p) returning %p\n",func,previous);
1042  data->unexpected_handler = func;
1043  return previous;
1044 }
1045 
1046 /******************************************************************
1047  * _get_unexpected (MSVCRT.@)
1048  */
1050 {
1052  return data->unexpected_handler;
1053 }
1054 
1055 /******************************************************************
1056  * ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z (MSVCRT.@)
1057  */
1059 {
1061  _se_translator_function previous = data->se_translator;
1062  TRACE("(%p) returning %p\n",func,previous);
1063  data->se_translator = func;
1064  return previous;
1065 }
1066 
1067 /******************************************************************
1068  * ?terminate@@YAXXZ (MSVCRT.@)
1069  *
1070  * Default handler for an unhandled exception.
1071  *
1072  * PARAMS
1073  * None.
1074  *
1075  * RETURNS
1076  * This function does not return. Either control resumes from any
1077  * handler installed by calling set_terminate(), or (by default) abort()
1078  * is called.
1079  */
1081 {
1083  if (data->terminate_handler) data->terminate_handler();
1084  abort();
1085 }
1086 
1087 /******************************************************************
1088  * ?unexpected@@YAXXZ (MSVCRT.@)
1089  */
1091 {
1093  if (data->unexpected_handler) data->unexpected_handler();
1094  MSVCRT_terminate();
1095 }
1096 
1097 
1098 /******************************************************************
1099  * __RTtypeid (MSVCRT.@)
1100  *
1101  * Retrieve the Run Time Type Information (RTTI) for a C++ object.
1102  *
1103  * PARAMS
1104  * cppobj [I] C++ object to get type information for.
1105  *
1106  * RETURNS
1107  * Success: A type_info object describing cppobj.
1108  * Failure: If the object to be cast has no RTTI, a __non_rtti_object
1109  * exception is thrown. If cppobj is NULL, a bad_typeid exception
1110  * is thrown. In either case, this function does not return.
1111  *
1112  * NOTES
1113  * This function is usually called by compiler generated code as a result
1114  * of using one of the C++ dynamic cast statements.
1115  */
1116 const type_info* CDECL MSVCRT___RTtypeid(void *cppobj)
1117 {
1118  const type_info *ret;
1119 
1120  if (!cppobj)
1121  {
1122  bad_typeid e;
1123  MSVCRT_bad_typeid_ctor( &e, "Attempted a typeid of NULL pointer!" );
1125  return NULL;
1126  }
1127 
1128  __TRY
1129  {
1130  const rtti_object_locator *obj_locator = get_obj_locator( cppobj );
1131  ret = obj_locator->type_descriptor;
1132  }
1134  {
1135  __non_rtti_object e;
1136  MSVCRT___non_rtti_object_ctor( &e, "Bad read pointer - no RTTI data!" );
1138  return NULL;
1139  }
1140  __ENDTRY
1141  return ret;
1142 }
1143 
1144 /******************************************************************
1145  * __RTDynamicCast (MSVCRT.@)
1146  *
1147  * Dynamically cast a C++ object to one of its base classes.
1148  *
1149  * PARAMS
1150  * cppobj [I] Any C++ object to cast
1151  * unknown [I] Reserved, set to 0
1152  * src [I] type_info object describing cppobj
1153  * dst [I] type_info object describing the base class to cast to
1154  * do_throw [I] TRUE = throw an exception if the cast fails, FALSE = don't
1155  *
1156  * RETURNS
1157  * Success: The address of cppobj, cast to the object described by dst.
1158  * Failure: NULL, If the object to be cast has no RTTI, or dst is not a
1159  * valid cast for cppobj. If do_throw is TRUE, a bad_cast exception
1160  * is thrown and this function does not return.
1161  *
1162  * NOTES
1163  * This function is usually called by compiler generated code as a result
1164  * of using one of the C++ dynamic cast statements.
1165  */
1166 void* CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown,
1168  int do_throw)
1169 {
1170  void *ret;
1171 
1172  if (!cppobj) return NULL;
1173 
1174  TRACE("obj: %p unknown: %d src: %p %s dst: %p %s do_throw: %d)\n",
1175  cppobj, unknown, src, dbgstr_type_info(src), dst, dbgstr_type_info(dst), do_throw);
1176 
1177  /* To cast an object at runtime:
1178  * 1.Find out the true type of the object from the typeinfo at vtable[-1]
1179  * 2.Search for the destination type in the class hierarchy
1180  * 3.If destination type is found, return base object address + dest offset
1181  * Otherwise, fail the cast
1182  *
1183  * FIXME: the unknown parameter doesn't seem to be used for anything
1184  */
1185  __TRY
1186  {
1187  int i;
1188  const rtti_object_locator *obj_locator = get_obj_locator( cppobj );
1189  const rtti_object_hierarchy *obj_bases = obj_locator->type_hierarchy;
1190  const rtti_base_descriptor * const* base_desc = obj_bases->base_classes->bases;
1191 
1192  if (TRACE_ON(msvcrt)) dump_obj_locator(obj_locator);
1193 
1194  ret = NULL;
1195  for (i = 0; i < obj_bases->array_len; i++)
1196  {
1197  const type_info *typ = base_desc[i]->type_descriptor;
1198 
1199  if (!strcmp(typ->mangled, dst->mangled))
1200  {
1201  /* compute the correct this pointer for that base class */
1202  void *this_ptr = (char *)cppobj - obj_locator->base_class_offset;
1203  ret = get_this_pointer( &base_desc[i]->offsets, this_ptr );
1204  break;
1205  }
1206  }
1207  /* VC++ sets do_throw to 1 when the result of a dynamic_cast is assigned
1208  * to a reference, since references cannot be NULL.
1209  */
1210  if (!ret && do_throw)
1211  {
1212  const char *msg = "Bad dynamic_cast!";
1213  bad_cast e;
1214  MSVCRT_bad_cast_ctor( &e, &msg );
1216  }
1217  }
1219  {
1220  __non_rtti_object e;
1221  MSVCRT___non_rtti_object_ctor( &e, "Access violation - no RTTI data!" );
1223  return NULL;
1224  }
1225  __ENDTRY
1226  return ret;
1227 }
1228 
1229 
1230 /******************************************************************
1231  * __RTCastToVoid (MSVCRT.@)
1232  *
1233  * Dynamically cast a C++ object to a void*.
1234  *
1235  * PARAMS
1236  * cppobj [I] The C++ object to cast
1237  *
1238  * RETURNS
1239  * Success: The base address of the object as a void*.
1240  * Failure: NULL, if cppobj is NULL or has no RTTI.
1241  *
1242  * NOTES
1243  * This function is usually called by compiler generated code as a result
1244  * of using one of the C++ dynamic cast statements.
1245  */
1246 void* CDECL MSVCRT___RTCastToVoid(void *cppobj)
1247 {
1248  void *ret;
1249 
1250  if (!cppobj) return NULL;
1251 
1252  __TRY
1253  {
1254  const rtti_object_locator *obj_locator = get_obj_locator( cppobj );
1255  ret = (char *)cppobj - obj_locator->base_class_offset;
1256  }
1258  {
1259  __non_rtti_object e;
1260  MSVCRT___non_rtti_object_ctor( &e, "Access violation - no RTTI data!" );
1262  return NULL;
1263  }
1264  __ENDTRY
1265  return ret;
1266 }
terminate_function CDECL MSVCRT_set_terminate(terminate_function func)
Definition: cpp.c:1008
GLenum func
Definition: glext.h:6028
#define __ASM_VTABLE(name, funcs)
Definition: wine_msc.h:49
this_ptr_offsets offsets
Definition: cpp.c:36
#define TRUE
Definition: types.h:120
void __cdecl MSVCRT_operator_delete(void *)
Definition: heap.c:91
static void * vtable[]
Definition: typelib.c:1231
const type_info * type_descriptor
Definition: cpp.c:34
unsigned int signature
Definition: cpp.c:55
static const cxx_type_info_table bad_cast_type_info_table
Definition: cpp.c:952
const rtti_base_descriptor * bases[3]
Definition: cpp.c:42
static const cxx_exception_type bad_cast_exception_type
Definition: cpp.c:962
static const rtti_object_hierarchy __non_rtti_object_type_hierarchy
Definition: cpp.c:882
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
void __stdcall MSVCRT___non_rtti_object_dtor(__non_rtti_object *_this)
Definition: cpp.c:395
void *__stdcall MSVCRT_bad_typeid_vector_dtor(bad_typeid *_this, unsigned int flags)
Definition: cpp.c:334
static void EXCEPTION_ctor(exception *_this, const char **name)
Definition: cpp.c:130
static const rtti_object_hierarchy bad_cast_type_hierarchy
Definition: cpp.c:832
static const cxx_type_info bad_typeid_cxx_type_info
Definition: cpp.c:799
void *__stdcall MSVCRT___non_rtti_object_vector_dtor(__non_rtti_object *_this, unsigned int flags)
Definition: cpp.c:417
const rtti_object_locator __non_rtti_object_rtti
Definition: cpp.c:890
bad_typeid *__stdcall MSVCRT_bad_typeid_default_ctor(bad_typeid *_this)
Definition: cpp.c:304
char *__cdecl __unDName(char *, const char *, int, malloc_func_t, free_func_t, unsigned short int)
Definition: undname.c:1645
static const rtti_base_descriptor type_info_rtti_base_descriptor
Definition: cpp.c:915
static const cxx_type_info __non_rtti_object_cxx_type_info
Definition: cpp.c:899
unexpected_function CDECL MSVCRT_set_unexpected(unexpected_function func)
Definition: cpp.c:1037
bad_cast *__stdcall MSVCRT_bad_cast_opequals(bad_cast *_this, const bad_cast *rhs)
Definition: cpp.c:508
static const rtti_base_array bad_typeid_rtti_base_array
Definition: cpp.c:773
void __cdecl MSVCRT_free(void *)
const vtable_ptr MSVCRT___non_rtti_object_vtable
#define THISCALL(func)
Definition: cpp.c:81
const rtti_object_locator type_info_rtti
Definition: cpp.c:940
const vtable_ptr MSVCRT_bad_cast_vtable
static const rtti_base_array __non_rtti_object_rtti_base_array
Definition: cpp.c:873
bad_cast *__stdcall MSVCRT_bad_cast_ctor(bad_cast *_this, const char **name)
Definition: cpp.c:453
struct _rtti_base_array rtti_base_array
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
char mangled[16]
Definition: cpp.c:36
bad_typeid *__stdcall MSVCRT_bad_typeid_ctor(bad_typeid *_this, const char *name)
Definition: cpp.c:292
static const rtti_object_hierarchy exception_type_hierarchy
Definition: cpp.c:732
exception __stdcall MSVCRT_exception_opequals(exception *_this, const exception *rhs)
Definition: cpp.c:219
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
static const rtti_base_descriptor __non_rtti_object_rtti_base_descriptor
Definition: cpp.c:865
void *__stdcall MSVCRT_exception_scalar_dtor(exception *_this, unsigned int flags)
Definition: cpp.c:258
unsigned int attributes
Definition: cpp.c:48
#define e
Definition: ke_i.h:82
int __stdcall MSVCRT_type_info_opnot_equals(type_info *_this, const type_info *rhs)
Definition: cpp.c:565
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
const vtable_ptr MSVCRT_exception_vtable
#define DEFINE_THISCALL_WRAPPER(func, args)
Definition: cpp.c:83
static PVOID ptr
Definition: dispmode.c:27
bad_cast *__stdcall MSVCRT_bad_cast_copy_ctor(bad_cast *_this, const bad_cast *rhs)
Definition: cpp.c:465
unsigned int attributes
Definition: cpp.c:37
const rtti_object_locator bad_cast_rtti
Definition: cpp.c:840
void CDECL MSVCRT_terminate(void)
Definition: cpp.c:1080
const vtable_ptr MSVCRT_bad_typeid_vtable
smooth NULL
Definition: ftsmooth.c:416
static const rtti_base_descriptor bad_typeid_rtti_base_descriptor
Definition: cpp.c:765
void *CDECL MSVCRT___RTCastToVoid(void *cppobj)
Definition: cpp.c:1246
static const char * dbgstr_type_info(const type_info *info)
Definition: cppexcept.h:128
#define __TRY
Definition: compat.h:70
const rtti_object_locator bad_typeid_rtti
Definition: cpp.c:790
static const rtti_base_descriptor bad_cast_rtti_base_descriptor
Definition: cpp.c:815
const type_info *CDECL MSVCRT___RTtypeid(void *cppobj)
Definition: cpp.c:1116
void *__stdcall MSVCRT___non_rtti_object_scalar_dtor(__non_rtti_object *_this, unsigned int flags)
Definition: cpp.c:440
int __stdcall MSVCRT_type_info_before(type_info *_this, const type_info *rhs)
Definition: cpp.c:576
void WINAPI _CxxThrowException(exception *object, const cxx_exception_type *type)
Definition: cppexcept.c:557
void CDECL MSVCRT_unexpected(void)
Definition: cpp.c:1090
struct _rtti_base_descriptor rtti_base_descriptor
void *__stdcall MSVCRT_bad_cast_scalar_dtor(bad_cast *_this, unsigned int flags)
Definition: cpp.c:542
#define TRACE(s)
Definition: solgame.cpp:4
__non_rtti_object *__stdcall MSVCRT___non_rtti_object_ctor(__non_rtti_object *_this, const char *name)
Definition: cpp.c:382
const char *__stdcall MSVCRT_type_info_raw_name(type_info *_this)
Definition: cpp.c:631
static const vtable_ptr * get_vtable(void *obj)
Definition: cpp.c:94
static unsigned int
Definition: cpp.c:62
static const cxx_exception_type __non_rtti_object_exception_type
Definition: cpp.c:988
exception __stdcall MSVCRT_exception_copy_ctor(exception *_this, const exception *rhs)
Definition: cpp.c:175
void(__cdecl * unexpected_function)(void)
Definition: eh.h:21
static void * get_this_pointer(const this_ptr_offsets *off, void *object)
Definition: cppexcept.h:136
static const type_info bad_typeid_type_info
Definition: cpp.c:758
#define UNDNAME_NO_ARGUMENTS
Definition: dbghelp.h:1250
const char *__stdcall MSVCRT_what_exception(exception *_this)
Definition: cpp.c:270
void __stdcall MSVCRT_type_info_dtor(type_info *_this)
Definition: cpp.c:587
void(__cdecl * terminate_function)(void)
Definition: eh.h:19
#define __stdcall
Definition: typedefs.h:25
__non_rtti_object *__stdcall MSVCRT___non_rtti_object_opequals(__non_rtti_object *_this, const __non_rtti_object *rhs)
Definition: cpp.c:405
Definition: id3.c:18
static const cxx_type_info_table bad_typeid_type_info_table
Definition: cpp.c:970
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static const rtti_base_array exception_rtti_base_array
Definition: cpp.c:723
GLbitfield flags
Definition: glext.h:7161
int __stdcall MSVCRT_type_info_opequals_equals(type_info *_this, const type_info *rhs)
Definition: cpp.c:554
static const cxx_type_info bad_cast_cxx_type_info
Definition: cpp.c:849
void(* vtable_ptr)(void)
Definition: cpp.c:23
void(* _se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info)
Definition: eh.h:44
#define __ENDTRY
Definition: compat.h:72
int ret
const rtti_base_array * base_classes
Definition: cpp.c:50
bad_typeid *__stdcall MSVCRT_bad_typeid_opequals(bad_typeid *_this, const bad_typeid *rhs)
Definition: cpp.c:323
__non_rtti_object *__stdcall MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object *_this, const __non_rtti_object *rhs)
Definition: cpp.c:369
struct _rtti_object_hierarchy rtti_object_hierarchy
static void dump_obj_locator(const rtti_object_locator *ptr)
Definition: cpp.c:105
void __stdcall MSVCRT_exception_dtor(exception *_this)
Definition: cpp.c:208
const vtable_ptr MSVCRT_type_info_vtable
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
int num_base_classes
Definition: cpp.c:35
GLenum GLsizei len
Definition: glext.h:6722
void *__stdcall MSVCRT_type_info_vector_dtor(type_info *_this, unsigned int flags)
Definition: cpp.c:639
GLenum src
Definition: glext.h:6340
terminate_function CDECL _get_terminate(void)
Definition: cpp.c:1020
#define UNDNAME_32_BIT_DECODE
Definition: dbghelp.h:1248
thread_data_t * msvcrt_get_thread_data(void)
Definition: tls.c:31
exception __stdcall MSVCRT_exception_ctor(exception *_this, const char **name)
Definition: cpp.c:151
static const type_info type_info_type_info
Definition: cpp.c:908
exception __stdcall MSVCRT_exception_default_ctor(exception *_this)
Definition: cpp.c:195
bad_cast *__stdcall MSVCRT_bad_cast_default_ctor(bad_cast *_this)
Definition: cpp.c:489
unsigned int flags
Definition: cpp.c:57
static const rtti_base_descriptor exception_rtti_base_descriptor
Definition: cpp.c:715
const type_info * type_descriptor
Definition: cpp.c:58
static const cxx_exception_type bad_typeid_exception_type
Definition: cpp.c:980
unexpected_function CDECL _get_unexpected(void)
Definition: cpp.c:1049
_se_translator_function CDECL MSVCRT__set_se_translator(_se_translator_function func)
Definition: cpp.c:1058
char * name
Definition: cpp.c:28
static const rtti_base_array type_info_rtti_base_array
Definition: cpp.c:923
const rtti_object_hierarchy * type_hierarchy
Definition: cpp.c:59
#define CDECL
Definition: compat.h:21
void *__stdcall MSVCRT_bad_typeid_scalar_dtor(bad_typeid *_this, unsigned int flags)
Definition: cpp.c:357
GLenum GLenum dst
Definition: glext.h:6340
static const rtti_object_hierarchy type_info_type_hierarchy
Definition: cpp.c:932
#define abort()
Definition: i386-dis.c:35
int do_free
Definition: cpp.c:29
BOOL empty
Definition: button.c:170
static const type_info bad_cast_type_info
Definition: cpp.c:808
static const rtti_object_locator * get_obj_locator(void *cppobj)
Definition: cpp.c:99
struct __exception exception
static const type_info __non_rtti_object_type_info
Definition: cpp.c:858
void(* cxx_copy_ctor)(void)
Definition: cppexcept.h:49
void *__stdcall MSVCRT_exception_vector_dtor(exception *_this, unsigned int flags)
Definition: cpp.c:235
#define msg(x)
Definition: auth_time.c:54
Definition: name.c:36
exception __stdcall MSVCRT_exception_ctor_noalloc(exception *_this, char **name, int noalloc)
Definition: cpp.c:162
const rtti_object_locator exception_rtti
Definition: cpp.c:740
vtable_ptr * vtable
Definition: cpp.c:27
#define const
Definition: zconf.h:230
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
int base_class_offset
Definition: cpp.c:56
static const type_info exception_type_info
Definition: cpp.c:708
void __stdcall MSVCRT_bad_typeid_dtor(bad_typeid *_this)
Definition: cpp.c:313
const char *__stdcall MSVCRT_type_info_name(type_info *_this)
Definition: cpp.c:597
unsigned int signature
Definition: cpp.c:47
bad_cast *__stdcall MSVCRT_bad_cast_ctor_charptr(bad_cast *_this, const char *name)
Definition: cpp.c:477
void *__stdcall MSVCRT_bad_cast_vector_dtor(bad_cast *_this, unsigned int flags)
Definition: cpp.c:519
void *__cdecl MSVCRT_malloc(MSVCRT_size_t)
static const rtti_object_hierarchy bad_typeid_type_hierarchy
Definition: cpp.c:782
#define TRACE_ON(x)
Definition: compat.h:65
void __stdcall MSVCRT_bad_cast_dtor(bad_cast *_this)
Definition: cpp.c:498
#define __EXCEPT_PAGE_FAULT
Definition: compat.h:71
bad_typeid *__stdcall MSVCRT_bad_typeid_copy_ctor(bad_typeid *_this, const bad_typeid *rhs)
Definition: cpp.c:280
void *CDECL MSVCRT___RTDynamicCast(void *cppobj, int unknown, type_info *src, type_info *dst, int do_throw)
Definition: cpp.c:1166
static const rtti_base_array bad_cast_rtti_base_array
Definition: cpp.c:823
static const cxx_type_info exception_cxx_type_info
Definition: cpp.c:749
struct _rtti_object_locator rtti_object_locator
GLuint const GLchar * name
Definition: glext.h:6031