njn | c953984 | 2002-10-02 13:26:35 +0000 | [diff] [blame] | 1 | |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 2 | /*--------------------------------------------------------------------*/ |
nethercote | 137bc55 | 2003-11-14 17:47:54 +0000 | [diff] [blame] | 3 | /*--- A header file for all parts of the MemCheck tool. ---*/ |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 4 | /*--- mc_include.h ---*/ |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 5 | /*--------------------------------------------------------------------*/ |
| 6 | |
| 7 | /* |
nethercote | 137bc55 | 2003-11-14 17:47:54 +0000 | [diff] [blame] | 8 | This file is part of MemCheck, a heavyweight Valgrind tool for |
njn | c953984 | 2002-10-02 13:26:35 +0000 | [diff] [blame] | 9 | detecting memory errors. |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 10 | |
njn | 5361242 | 2005-03-12 16:22:54 +0000 | [diff] [blame] | 11 | Copyright (C) 2000-2005 Julian Seward |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 12 | jseward@acm.org |
| 13 | |
| 14 | This program is free software; you can redistribute it and/or |
| 15 | modify it under the terms of the GNU General Public License as |
| 16 | published by the Free Software Foundation; either version 2 of the |
| 17 | License, or (at your option) any later version. |
| 18 | |
| 19 | This program is distributed in the hope that it will be useful, but |
| 20 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | General Public License for more details. |
| 23 | |
| 24 | You should have received a copy of the GNU General Public License |
| 25 | along with this program; if not, write to the Free Software |
| 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
| 27 | 02111-1307, USA. |
| 28 | |
| 29 | The GNU General Public License is contained in the file COPYING. |
| 30 | */ |
| 31 | |
njn | 43c799e | 2003-04-08 00:08:52 +0000 | [diff] [blame] | 32 | /* Note: this header should contain declarations that are for use by |
| 33 | Memcheck only -- declarations shared with Addrcheck go in mac_shared.h. |
| 34 | */ |
| 35 | |
njn25 | cac76cb | 2002-09-23 11:21:57 +0000 | [diff] [blame] | 36 | #ifndef __MC_INCLUDE_H |
| 37 | #define __MC_INCLUDE_H |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 38 | |
njn | 43c799e | 2003-04-08 00:08:52 +0000 | [diff] [blame] | 39 | #include "mac_shared.h" |
njn | 43c799e | 2003-04-08 00:08:52 +0000 | [diff] [blame] | 40 | |
njn | 44acd3e | 2005-05-13 21:39:45 +0000 | [diff] [blame] | 41 | #define MC_(str) VGAPPEND(vgMemCheck_,str) |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 42 | |
| 43 | /*------------------------------------------------------------*/ |
njn | 43c799e | 2003-04-08 00:08:52 +0000 | [diff] [blame] | 44 | /*--- Command line options ---*/ |
| 45 | /*------------------------------------------------------------*/ |
| 46 | |
sewardj | f3418c0 | 2005-11-08 14:10:24 +0000 | [diff] [blame] | 47 | /* There are no memcheck-specific ones, only mac-specific |
| 48 | ones (those shared by both memcheck and addrcheck). */ |
njn | 43c799e | 2003-04-08 00:08:52 +0000 | [diff] [blame] | 49 | |
| 50 | |
| 51 | /*------------------------------------------------------------*/ |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 52 | /*--- Functions ---*/ |
| 53 | /*------------------------------------------------------------*/ |
| 54 | |
njn | 66fe05a | 2003-07-22 09:12:33 +0000 | [diff] [blame] | 55 | /* Functions defined in mc_main.c */ |
njn | af839f5 | 2005-06-23 03:27:57 +0000 | [diff] [blame] | 56 | extern VG_REGPARM(1) void MC_(helperc_complain_undef) ( HWord ); |
sewardj | 11bcc4e | 2005-04-23 22:38:38 +0000 | [diff] [blame] | 57 | extern void MC_(helperc_value_check8_fail) ( void ); |
sewardj | 9544807 | 2004-11-22 20:19:51 +0000 | [diff] [blame] | 58 | extern void MC_(helperc_value_check4_fail) ( void ); |
| 59 | extern void MC_(helperc_value_check1_fail) ( void ); |
| 60 | extern void MC_(helperc_value_check0_fail) ( void ); |
| 61 | |
sewardj | 8cf88b7 | 2005-07-08 01:29:33 +0000 | [diff] [blame] | 62 | extern VG_REGPARM(1) void MC_(helperc_STOREV8be) ( Addr, ULong ); |
sewardj | 2e59585 | 2005-06-30 23:33:37 +0000 | [diff] [blame] | 63 | extern VG_REGPARM(1) void MC_(helperc_STOREV8le) ( Addr, ULong ); |
sewardj | 8cf88b7 | 2005-07-08 01:29:33 +0000 | [diff] [blame] | 64 | extern VG_REGPARM(2) void MC_(helperc_STOREV4be) ( Addr, UWord ); |
sewardj | 2e59585 | 2005-06-30 23:33:37 +0000 | [diff] [blame] | 65 | extern VG_REGPARM(2) void MC_(helperc_STOREV4le) ( Addr, UWord ); |
sewardj | 8cf88b7 | 2005-07-08 01:29:33 +0000 | [diff] [blame] | 66 | extern VG_REGPARM(2) void MC_(helperc_STOREV2be) ( Addr, UWord ); |
sewardj | 2e59585 | 2005-06-30 23:33:37 +0000 | [diff] [blame] | 67 | extern VG_REGPARM(2) void MC_(helperc_STOREV2le) ( Addr, UWord ); |
sewardj | 8cf88b7 | 2005-07-08 01:29:33 +0000 | [diff] [blame] | 68 | extern VG_REGPARM(2) void MC_(helperc_STOREV1) ( Addr, UWord ); |
sewardj | 9544807 | 2004-11-22 20:19:51 +0000 | [diff] [blame] | 69 | |
sewardj | 8cf88b7 | 2005-07-08 01:29:33 +0000 | [diff] [blame] | 70 | extern VG_REGPARM(1) ULong MC_(helperc_LOADV8be) ( Addr ); |
| 71 | extern VG_REGPARM(1) ULong MC_(helperc_LOADV8le) ( Addr ); |
| 72 | extern VG_REGPARM(1) UWord MC_(helperc_LOADV4be) ( Addr ); |
| 73 | extern VG_REGPARM(1) UWord MC_(helperc_LOADV4le) ( Addr ); |
| 74 | extern VG_REGPARM(1) UWord MC_(helperc_LOADV2be) ( Addr ); |
| 75 | extern VG_REGPARM(1) UWord MC_(helperc_LOADV2le) ( Addr ); |
| 76 | extern VG_REGPARM(1) UWord MC_(helperc_LOADV1) ( Addr ); |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 77 | |
sewardj | 826ec49 | 2005-05-12 18:05:00 +0000 | [diff] [blame] | 78 | extern void MC_(helperc_MAKE_STACK_UNINIT) ( Addr base, UWord len ); |
| 79 | |
njn | 51d827b | 2005-05-09 01:02:08 +0000 | [diff] [blame] | 80 | /* Functions defined in mc_translate.c */ |
sewardj | 4ba057c | 2005-10-18 12:04:18 +0000 | [diff] [blame] | 81 | extern |
| 82 | IRBB* MC_(instrument) ( IRBB* bb_in, VexGuestLayout* layout, |
| 83 | Addr64 orig_addr_noredir, VexGuestExtents* vge, |
| 84 | IRType gWordTy, IRType hWordTy ); |
sewardj | 8d61eb1 | 2005-07-08 09:46:53 +0000 | [diff] [blame] | 85 | |
| 86 | #endif /* ndef __MC_INCLUDE_H */ |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 87 | |
| 88 | /*--------------------------------------------------------------------*/ |
nethercote | 8b76fe5 | 2004-11-08 19:20:09 +0000 | [diff] [blame] | 89 | /*--- end ---*/ |
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 90 | /*--------------------------------------------------------------------*/ |
| 91 | |