2 /*---------------------------------------------------------------*/
3 /*--- begin main_globals.h ---*/
4 /*---------------------------------------------------------------*/
7 This file is part of Valgrind, a dynamic binary instrumentation
10 Copyright (C) 2004-2017 OpenWorks LLP
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 This program is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, see <http://www.gnu.org/licenses/>.
26 The GNU General Public License is contained in the file COPYING.
28 Neither the names of the U.S. Department of Energy nor the
29 University of California nor the names of its contributors may be
30 used to endorse or promote products derived from this software
31 without prior written permission.
34 #ifndef __VEX_MAIN_GLOBALS_H
35 #define __VEX_MAIN_GLOBALS_H
37 #include "libvex_basictypes.h"
41 /* Global settings for the VEX library. These are the
42 only library-wide globals. */
44 /* Are we started yet? */
45 extern Bool vex_initdone
;
47 /* failure exit function */
48 __attribute__ ((noreturn
))
49 extern void (*vex_failure_exit
) ( void );
51 /* logging output function */
52 extern void (*vex_log_bytes
) ( const HChar
*, SizeT nbytes
);
54 /* debug paranoia level */
55 extern Int vex_debuglevel
;
58 extern Int vex_traceflags
;
60 /* Optimiser/front-end control */
61 extern VexControl vex_control
;
64 /* vex_traceflags values */
65 #define VEX_TRACE_FE (1 << 7) /* show conversion into IR */
66 #define VEX_TRACE_OPT1 (1 << 6) /* show after initial opt */
67 #define VEX_TRACE_INST (1 << 5) /* show after instrumentation */
68 #define VEX_TRACE_OPT2 (1 << 4) /* show after second opt */
69 #define VEX_TRACE_TREES (1 << 3) /* show after tree building */
70 #define VEX_TRACE_VCODE (1 << 2) /* show selected insns */
71 #define VEX_TRACE_RCODE (1 << 1) /* show after reg-alloc */
72 #define VEX_TRACE_ASM (1 << 0) /* show final assembly */
75 #endif /* ndef __VEX_MAIN_GLOBALS_H */
77 /*---------------------------------------------------------------*/
78 /*--- end main_globals.h ---*/
79 /*---------------------------------------------------------------*/