blob: 4de9f5297e7fabbd745f13ea141d7d1f83900ef4 [file] [log] [blame]
njnc9539842002-10-02 13:26:35 +00001
njn25e49d8e72002-09-23 09:36:25 +00002/*--------------------------------------------------------------------*/
nethercote137bc552003-11-14 17:47:54 +00003/*--- A header file for all parts of the MemCheck tool. ---*/
njn25cac76cb2002-09-23 11:21:57 +00004/*--- mc_include.h ---*/
njn25e49d8e72002-09-23 09:36:25 +00005/*--------------------------------------------------------------------*/
6
7/*
nethercote137bc552003-11-14 17:47:54 +00008 This file is part of MemCheck, a heavyweight Valgrind tool for
njnc9539842002-10-02 13:26:35 +00009 detecting memory errors.
njn25e49d8e72002-09-23 09:36:25 +000010
njn53612422005-03-12 16:22:54 +000011 Copyright (C) 2000-2005 Julian Seward
njn25e49d8e72002-09-23 09:36:25 +000012 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
njn43c799e2003-04-08 00:08:52 +000032/* 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
njn25cac76cb2002-09-23 11:21:57 +000036#ifndef __MC_INCLUDE_H
37#define __MC_INCLUDE_H
njn25e49d8e72002-09-23 09:36:25 +000038
njn43c799e2003-04-08 00:08:52 +000039#include "mac_shared.h"
njn43c799e2003-04-08 00:08:52 +000040
njn44acd3e2005-05-13 21:39:45 +000041#define MC_(str) VGAPPEND(vgMemCheck_,str)
njn25e49d8e72002-09-23 09:36:25 +000042
43/*------------------------------------------------------------*/
njn43c799e2003-04-08 00:08:52 +000044/*--- Command line options ---*/
45/*------------------------------------------------------------*/
46
sewardjf3418c02005-11-08 14:10:24 +000047/* There are no memcheck-specific ones, only mac-specific
48 ones (those shared by both memcheck and addrcheck). */
njn43c799e2003-04-08 00:08:52 +000049
50
51/*------------------------------------------------------------*/
njn25e49d8e72002-09-23 09:36:25 +000052/*--- Functions ---*/
53/*------------------------------------------------------------*/
54
njn66fe05a2003-07-22 09:12:33 +000055/* Functions defined in mc_main.c */
njnaf839f52005-06-23 03:27:57 +000056extern VG_REGPARM(1) void MC_(helperc_complain_undef) ( HWord );
sewardj11bcc4e2005-04-23 22:38:38 +000057extern void MC_(helperc_value_check8_fail) ( void );
sewardj95448072004-11-22 20:19:51 +000058extern void MC_(helperc_value_check4_fail) ( void );
59extern void MC_(helperc_value_check1_fail) ( void );
60extern void MC_(helperc_value_check0_fail) ( void );
61
sewardj8cf88b72005-07-08 01:29:33 +000062extern VG_REGPARM(1) void MC_(helperc_STOREV8be) ( Addr, ULong );
sewardj2e595852005-06-30 23:33:37 +000063extern VG_REGPARM(1) void MC_(helperc_STOREV8le) ( Addr, ULong );
sewardj8cf88b72005-07-08 01:29:33 +000064extern VG_REGPARM(2) void MC_(helperc_STOREV4be) ( Addr, UWord );
sewardj2e595852005-06-30 23:33:37 +000065extern VG_REGPARM(2) void MC_(helperc_STOREV4le) ( Addr, UWord );
sewardj8cf88b72005-07-08 01:29:33 +000066extern VG_REGPARM(2) void MC_(helperc_STOREV2be) ( Addr, UWord );
sewardj2e595852005-06-30 23:33:37 +000067extern VG_REGPARM(2) void MC_(helperc_STOREV2le) ( Addr, UWord );
sewardj8cf88b72005-07-08 01:29:33 +000068extern VG_REGPARM(2) void MC_(helperc_STOREV1) ( Addr, UWord );
sewardj95448072004-11-22 20:19:51 +000069
sewardj8cf88b72005-07-08 01:29:33 +000070extern VG_REGPARM(1) ULong MC_(helperc_LOADV8be) ( Addr );
71extern VG_REGPARM(1) ULong MC_(helperc_LOADV8le) ( Addr );
72extern VG_REGPARM(1) UWord MC_(helperc_LOADV4be) ( Addr );
73extern VG_REGPARM(1) UWord MC_(helperc_LOADV4le) ( Addr );
74extern VG_REGPARM(1) UWord MC_(helperc_LOADV2be) ( Addr );
75extern VG_REGPARM(1) UWord MC_(helperc_LOADV2le) ( Addr );
76extern VG_REGPARM(1) UWord MC_(helperc_LOADV1) ( Addr );
njn25e49d8e72002-09-23 09:36:25 +000077
sewardj826ec492005-05-12 18:05:00 +000078extern void MC_(helperc_MAKE_STACK_UNINIT) ( Addr base, UWord len );
79
njn51d827b2005-05-09 01:02:08 +000080/* Functions defined in mc_translate.c */
sewardj4ba057c2005-10-18 12:04:18 +000081extern
sewardj461df9c2006-01-17 02:06:39 +000082IRBB* MC_(instrument) ( VgCallbackClosure* closure,
83 IRBB* bb_in,
84 VexGuestLayout* layout,
85 VexGuestExtents* vge,
sewardj4ba057c2005-10-18 12:04:18 +000086 IRType gWordTy, IRType hWordTy );
sewardj8d61eb12005-07-08 09:46:53 +000087
88#endif /* ndef __MC_INCLUDE_H */
njn25e49d8e72002-09-23 09:36:25 +000089
90/*--------------------------------------------------------------------*/
nethercote8b76fe52004-11-08 19:20:09 +000091/*--- end ---*/
njn25e49d8e72002-09-23 09:36:25 +000092/*--------------------------------------------------------------------*/
93