|
||||
File indexing completed on 2025-01-18 10:13:31
0001 0002 /*--------------------------------------------------------------------*/ 0003 /*--- Assertions, etc. pub_tool_libcassert.h ---*/ 0004 /*--------------------------------------------------------------------*/ 0005 0006 /* 0007 This file is part of Valgrind, a dynamic binary instrumentation 0008 framework. 0009 0010 Copyright (C) 2000-2017 Julian Seward 0011 jseward@acm.org 0012 0013 This program is free software; you can redistribute it and/or 0014 modify it under the terms of the GNU General Public License as 0015 published by the Free Software Foundation; either version 2 of the 0016 License, or (at your option) any later version. 0017 0018 This program is distributed in the hope that it will be useful, but 0019 WITHOUT ANY WARRANTY; without even the implied warranty of 0020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0021 General Public License for more details. 0022 0023 You should have received a copy of the GNU General Public License 0024 along with this program; if not, see <http://www.gnu.org/licenses/>. 0025 0026 The GNU General Public License is contained in the file COPYING. 0027 */ 0028 0029 #ifndef __PUB_TOOL_LIBCBASSERT_H 0030 #define __PUB_TOOL_LIBCBASSERT_H 0031 0032 #include "pub_tool_basics.h" // VG_ macro 0033 0034 #define tl_assert(expr) \ 0035 ((void) (LIKELY(expr) ? 0 : \ 0036 (VG_(assert_fail) (/*isCore?*/False, #expr, \ 0037 __FILE__, __LINE__, \ 0038 __PRETTY_FUNCTION__, \ 0039 ""), \ 0040 0))) 0041 0042 #define tl_assert2(expr, format, args...) \ 0043 ((void) (LIKELY(expr) ? 0 : \ 0044 (VG_(assert_fail) (/*isCore?*/False, #expr, \ 0045 __FILE__, __LINE__, \ 0046 __PRETTY_FUNCTION__, \ 0047 format, ##args), \ 0048 0))) 0049 0050 __attribute__ ((__noreturn__)) 0051 extern void VG_(exit)( Int status ); 0052 0053 /* Prints a panic message, appends newline and bug reporting info, aborts. */ 0054 __attribute__ ((__noreturn__)) 0055 extern void VG_(tool_panic) ( const HChar* str ); 0056 0057 __attribute__ ((__noreturn__)) 0058 extern void VG_(assert_fail) ( Bool isCore, const HChar* expr, const HChar* file, 0059 Int line, const HChar* fn, 0060 const HChar* format, ... ); 0061 0062 /* Show the state of various threads related information, such 0063 as the guest stacktrace for each thread. 0064 Mostly for debugging V. 0065 The following activates optional output: 0066 host_stacktrace : shows the host stacktrace. 0067 stack_usage True means: 0068 shows how much of the valgrind stack was used. 0069 shows the client stack range 0070 exited_thread_slots : show information for thread slots that were used 0071 but the thread has now exited. */ 0072 extern void VG_(show_sched_status) ( Bool host_stacktrace, 0073 Bool stack_usage, 0074 Bool exited_threads); 0075 0076 #endif // __PUB_TOOL_LIBCBASSERT_H 0077 0078 /*--------------------------------------------------------------------*/ 0079 /*--- end ---*/ 0080 /*--------------------------------------------------------------------*/
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |