blob: 3b16976341ec121c1f55b0d48750f87a7a9d2e4b [file] [log] [blame]
sewardj35421a32004-07-05 13:12:34 +00001
2/*---------------------------------------------------------------*/
sewardj752f9062010-05-03 21:38:49 +00003/*--- begin main_globals.h ---*/
sewardj35421a32004-07-05 13:12:34 +00004/*---------------------------------------------------------------*/
5
sewardjf8ed9d82004-11-12 17:40:23 +00006/*
sewardj752f9062010-05-03 21:38:49 +00007 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
sewardjf8ed9d82004-11-12 17:40:23 +00009
sewardj89ae8472013-10-18 14:12:58 +000010 Copyright (C) 2004-2013 OpenWorks LLP
sewardj752f9062010-05-03 21:38:49 +000011 info@open-works.net
sewardjf8ed9d82004-11-12 17:40:23 +000012
sewardj752f9062010-05-03 21:38:49 +000013 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.
sewardjf8ed9d82004-11-12 17:40:23 +000017
sewardj752f9062010-05-03 21:38:49 +000018 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.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
sewardj7bd6ffe2005-08-03 16:07:36 +000026 02110-1301, USA.
27
sewardj752f9062010-05-03 21:38:49 +000028 The GNU General Public License is contained in the file COPYING.
sewardjf8ed9d82004-11-12 17:40:23 +000029
30 Neither the names of the U.S. Department of Energy nor the
31 University of California nor the names of its contributors may be
32 used to endorse or promote products derived from this software
33 without prior written permission.
sewardjf8ed9d82004-11-12 17:40:23 +000034*/
35
sewardjcef7d3e2009-07-02 12:21:59 +000036#ifndef __VEX_MAIN_GLOBALS_H
37#define __VEX_MAIN_GLOBALS_H
sewardj35421a32004-07-05 13:12:34 +000038
sewardj887a11a2004-07-05 17:26:47 +000039#include "libvex_basictypes.h"
sewardj08613742004-10-25 13:01:45 +000040#include "libvex.h"
sewardj35421a32004-07-05 13:12:34 +000041
42
sewardj887a11a2004-07-05 17:26:47 +000043/* Global settings for the VEX library. These are the
sewardj35421a32004-07-05 13:12:34 +000044 only library-wide globals. */
45
46/* Are we started yet? */
47extern Bool vex_initdone;
48
49/* failure exit function */
sewardj2b515872004-07-05 20:50:45 +000050__attribute__ ((noreturn))
sewardj35421a32004-07-05 13:12:34 +000051extern void (*vex_failure_exit) ( void );
52
53/* logging output function */
sewardj58277842005-02-07 03:11:17 +000054extern void (*vex_log_bytes) ( HChar*, Int nbytes );
sewardj35421a32004-07-05 13:12:34 +000055
56/* debug paranoia level */
57extern Int vex_debuglevel;
58
sewardjf48ac192004-10-29 00:41:29 +000059/* trace flags */
60extern Int vex_traceflags;
sewardj35421a32004-07-05 13:12:34 +000061
sewardj08613742004-10-25 13:01:45 +000062/* Optimiser/front-end control */
63extern VexControl vex_control;
sewardj35421a32004-07-05 13:12:34 +000064
65
sewardjf48ac192004-10-29 00:41:29 +000066/* vex_traceflags values */
67#define VEX_TRACE_FE (1 << 7) /* show conversion into IR */
68#define VEX_TRACE_OPT1 (1 << 6) /* show after initial opt */
69#define VEX_TRACE_INST (1 << 5) /* show after instrumentation */
70#define VEX_TRACE_OPT2 (1 << 4) /* show after second opt */
71#define VEX_TRACE_TREES (1 << 3) /* show after tree building */
72#define VEX_TRACE_VCODE (1 << 2) /* show selected insns */
73#define VEX_TRACE_RCODE (1 << 1) /* show after reg-alloc */
74#define VEX_TRACE_ASM (1 << 0) /* show final assembly */
75
76
sewardjcef7d3e2009-07-02 12:21:59 +000077#endif /* ndef __VEX_MAIN_GLOBALS_H */
sewardj35421a32004-07-05 13:12:34 +000078
79/*---------------------------------------------------------------*/
sewardjcef7d3e2009-07-02 12:21:59 +000080/*--- end main_globals.h ---*/
sewardj35421a32004-07-05 13:12:34 +000081/*---------------------------------------------------------------*/