blob: e7d123f6d11e71b87a61a890837d6f3da7516013 [file] [log] [blame]
sewardj35421a32004-07-05 13:12:34 +00001
2/*---------------------------------------------------------------*/
3/*--- ---*/
sewardj887a11a2004-07-05 17:26:47 +00004/*--- This file (vex_globals.h) is ---*/
sewardjdbcfae72005-08-02 11:14:04 +00005/*--- Copyright (C) OpenWorks LLP. All rights reserved. ---*/
sewardj35421a32004-07-05 13:12:34 +00006/*--- ---*/
7/*---------------------------------------------------------------*/
8
sewardjf8ed9d82004-11-12 17:40:23 +00009/*
10 This file is part of LibVEX, a library for dynamic binary
11 instrumentation and translation.
12
sewardja33e9a42006-06-05 23:13:19 +000013 Copyright (C) 2004-2006 OpenWorks LLP. All rights reserved.
sewardjf8ed9d82004-11-12 17:40:23 +000014
sewardj7bd6ffe2005-08-03 16:07:36 +000015 This library is made available under a dual licensing scheme.
sewardjf8ed9d82004-11-12 17:40:23 +000016
sewardj7bd6ffe2005-08-03 16:07:36 +000017 If you link LibVEX against other code all of which is itself
18 licensed under the GNU General Public License, version 2 dated June
19 1991 ("GPL v2"), then you may use LibVEX under the terms of the GPL
20 v2, as appearing in the file LICENSE.GPL. If the file LICENSE.GPL
21 is missing, you can obtain a copy of the GPL v2 from the Free
22 Software Foundation Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 02110-1301, USA.
24
25 For any other uses of LibVEX, you must first obtain a commercial
26 license from OpenWorks LLP. Please contact info@open-works.co.uk
27 for information about commercial licensing.
28
29 This software is provided by OpenWorks LLP "as is" and any express
30 or implied warranties, including, but not limited to, the implied
31 warranties of merchantability and fitness for a particular purpose
32 are disclaimed. In no event shall OpenWorks LLP be liable for any
33 direct, indirect, incidental, special, exemplary, or consequential
34 damages (including, but not limited to, procurement of substitute
35 goods or services; loss of use, data, or profits; or business
36 interruption) however caused and on any theory of liability,
37 whether in contract, strict liability, or tort (including
38 negligence or otherwise) arising in any way out of the use of this
39 software, even if advised of the possibility of such damage.
sewardjf8ed9d82004-11-12 17:40:23 +000040
41 Neither the names of the U.S. Department of Energy nor the
42 University of California nor the names of its contributors may be
43 used to endorse or promote products derived from this software
44 without prior written permission.
sewardjf8ed9d82004-11-12 17:40:23 +000045*/
46
sewardj887a11a2004-07-05 17:26:47 +000047#ifndef __VEX_GLOBALS_H
48#define __VEX_GLOBALS_H
sewardj35421a32004-07-05 13:12:34 +000049
sewardj887a11a2004-07-05 17:26:47 +000050#include "libvex_basictypes.h"
sewardj08613742004-10-25 13:01:45 +000051#include "libvex.h"
sewardj35421a32004-07-05 13:12:34 +000052
53
sewardj887a11a2004-07-05 17:26:47 +000054/* Global settings for the VEX library. These are the
sewardj35421a32004-07-05 13:12:34 +000055 only library-wide globals. */
56
57/* Are we started yet? */
58extern Bool vex_initdone;
59
60/* failure exit function */
sewardj2b515872004-07-05 20:50:45 +000061__attribute__ ((noreturn))
sewardj35421a32004-07-05 13:12:34 +000062extern void (*vex_failure_exit) ( void );
63
64/* logging output function */
sewardj58277842005-02-07 03:11:17 +000065extern void (*vex_log_bytes) ( HChar*, Int nbytes );
sewardj35421a32004-07-05 13:12:34 +000066
67/* debug paranoia level */
68extern Int vex_debuglevel;
69
sewardjf48ac192004-10-29 00:41:29 +000070/* trace flags */
71extern Int vex_traceflags;
sewardj35421a32004-07-05 13:12:34 +000072
73/* Are we supporting valgrind checking? */
74extern Bool vex_valgrind_support;
75
sewardj08613742004-10-25 13:01:45 +000076/* Optimiser/front-end control */
77extern VexControl vex_control;
sewardj35421a32004-07-05 13:12:34 +000078
79
sewardjf48ac192004-10-29 00:41:29 +000080/* vex_traceflags values */
81#define VEX_TRACE_FE (1 << 7) /* show conversion into IR */
82#define VEX_TRACE_OPT1 (1 << 6) /* show after initial opt */
83#define VEX_TRACE_INST (1 << 5) /* show after instrumentation */
84#define VEX_TRACE_OPT2 (1 << 4) /* show after second opt */
85#define VEX_TRACE_TREES (1 << 3) /* show after tree building */
86#define VEX_TRACE_VCODE (1 << 2) /* show selected insns */
87#define VEX_TRACE_RCODE (1 << 1) /* show after reg-alloc */
88#define VEX_TRACE_ASM (1 << 0) /* show final assembly */
89
90
sewardj887a11a2004-07-05 17:26:47 +000091#endif /* ndef __VEX_GLOBALS_H */
sewardj35421a32004-07-05 13:12:34 +000092
93/*---------------------------------------------------------------*/
sewardj887a11a2004-07-05 17:26:47 +000094/*--- end vex_globals.h ---*/
sewardj35421a32004-07-05 13:12:34 +000095/*---------------------------------------------------------------*/