Update ChangeLog and version files for release
[official-gcc.git] / libvtv / vtv_fail.h
blob30741616a46c9cb41a2eabcf326757f99ab37a1d
1 // Copyright (C) 2012-2013
2 // Free Software Foundation
3 //
4 // This file is part of GCC.
5 //
6 // GCC is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3, or (at your option)
9 // any later version.
11 // GCC 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
14 // GNU General Public License for more details.
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
25 #ifndef _VTV_FAIL_H
26 #define _VTV_FAIL_H 1
28 /* __vtv_really_fail prints a backtrace and a memory dump, then calls
29 abort. It is here for programmers to call, presumably from
30 __vtv_verify_fail, if they choose to overwrite the standard
31 __vtv_verify_fail with one of their own. Programmers should NOT
32 attempt to rewrite __vtv_really_fail. */
34 extern void
35 __vtv_really_fail (const char *fail_msg)
36 __attribute__ ((visibility ("default"), noreturn, nothrow));
38 /* __vtv_verify_fail is the function that gets called if the vtable
39 verification code discovers a vtable pointer that it cannot verify
40 as valid. Normally __vtv_verify_fail calls __vtv_really_fail.
41 However programmers can write and link in their own version of
42 __vtv_verify_fail, if they wish to do some kind of secondary
43 verification, for example. The main verification code assumes that
44 IF __vtv_verify_fail returns, then some kind of secondary
45 verification was done AND that the secondary verification succeeded,
46 i.e. that the vtable pointer is actually valid and ok to use. If
47 the secondary verification fails, then __vtv_verify_fail should not
48 return. */
50 extern void
51 __vtv_verify_fail (void **data_set_ptr, const void *vtbl_pointer)
52 __attribute__((visibility ("default"), nothrow));
54 extern void
55 __vtv_verify_fail_debug (void **data_set_ptr, const void *vtbl_pointer,
56 const char *debug_msg)
57 __attribute__((visibility ("default"), nothrow));
59 #endif /* _VTV_FAIL_H */