sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 1 | |
| 2 | /*---------------------------------------------------------------*/ |
| 3 | /*--- ---*/ |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 4 | /*--- This file (vex_globals.h) is ---*/ |
sewardj | dbcfae7 | 2005-08-02 11:14:04 +0000 | [diff] [blame] | 5 | /*--- Copyright (C) OpenWorks LLP. All rights reserved. ---*/ |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 6 | /*--- ---*/ |
| 7 | /*---------------------------------------------------------------*/ |
| 8 | |
sewardj | f8ed9d8 | 2004-11-12 17:40:23 +0000 | [diff] [blame] | 9 | /* |
| 10 | This file is part of LibVEX, a library for dynamic binary |
| 11 | instrumentation and translation. |
| 12 | |
sewardj | a33e9a4 | 2006-06-05 23:13:19 +0000 | [diff] [blame^] | 13 | Copyright (C) 2004-2006 OpenWorks LLP. All rights reserved. |
sewardj | f8ed9d8 | 2004-11-12 17:40:23 +0000 | [diff] [blame] | 14 | |
sewardj | 7bd6ffe | 2005-08-03 16:07:36 +0000 | [diff] [blame] | 15 | This library is made available under a dual licensing scheme. |
sewardj | f8ed9d8 | 2004-11-12 17:40:23 +0000 | [diff] [blame] | 16 | |
sewardj | 7bd6ffe | 2005-08-03 16:07:36 +0000 | [diff] [blame] | 17 | 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. |
sewardj | f8ed9d8 | 2004-11-12 17:40:23 +0000 | [diff] [blame] | 40 | |
| 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. |
sewardj | f8ed9d8 | 2004-11-12 17:40:23 +0000 | [diff] [blame] | 45 | */ |
| 46 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 47 | #ifndef __VEX_GLOBALS_H |
| 48 | #define __VEX_GLOBALS_H |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 49 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 50 | #include "libvex_basictypes.h" |
sewardj | 0861374 | 2004-10-25 13:01:45 +0000 | [diff] [blame] | 51 | #include "libvex.h" |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 52 | |
| 53 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 54 | /* Global settings for the VEX library. These are the |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 55 | only library-wide globals. */ |
| 56 | |
| 57 | /* Are we started yet? */ |
| 58 | extern Bool vex_initdone; |
| 59 | |
| 60 | /* failure exit function */ |
sewardj | 2b51587 | 2004-07-05 20:50:45 +0000 | [diff] [blame] | 61 | __attribute__ ((noreturn)) |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 62 | extern void (*vex_failure_exit) ( void ); |
| 63 | |
| 64 | /* logging output function */ |
sewardj | 5827784 | 2005-02-07 03:11:17 +0000 | [diff] [blame] | 65 | extern void (*vex_log_bytes) ( HChar*, Int nbytes ); |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 66 | |
| 67 | /* debug paranoia level */ |
| 68 | extern Int vex_debuglevel; |
| 69 | |
sewardj | f48ac19 | 2004-10-29 00:41:29 +0000 | [diff] [blame] | 70 | /* trace flags */ |
| 71 | extern Int vex_traceflags; |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 72 | |
| 73 | /* Are we supporting valgrind checking? */ |
| 74 | extern Bool vex_valgrind_support; |
| 75 | |
sewardj | 0861374 | 2004-10-25 13:01:45 +0000 | [diff] [blame] | 76 | /* Optimiser/front-end control */ |
| 77 | extern VexControl vex_control; |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 78 | |
| 79 | |
sewardj | f48ac19 | 2004-10-29 00:41:29 +0000 | [diff] [blame] | 80 | /* 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 | |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 91 | #endif /* ndef __VEX_GLOBALS_H */ |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 92 | |
| 93 | /*---------------------------------------------------------------*/ |
sewardj | 887a11a | 2004-07-05 17:26:47 +0000 | [diff] [blame] | 94 | /*--- end vex_globals.h ---*/ |
sewardj | 35421a3 | 2004-07-05 13:12:34 +0000 | [diff] [blame] | 95 | /*---------------------------------------------------------------*/ |