mc_include.h revision 44acd3e8526899deb041d11df690f69dc071fe2c
1
2/*--------------------------------------------------------------------*/
3/*--- A header file for all parts of the MemCheck tool.            ---*/
4/*---                                                 mc_include.h ---*/
5/*--------------------------------------------------------------------*/
6
7/*
8   This file is part of MemCheck, a heavyweight Valgrind tool for
9   detecting memory errors.
10
11   Copyright (C) 2000-2005 Julian Seward
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
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
36#ifndef __MC_INCLUDE_H
37#define __MC_INCLUDE_H
38
39#include "mac_shared.h"
40
41#define MC_(str)    VGAPPEND(vgMemCheck_,str)
42
43/*------------------------------------------------------------*/
44/*--- Command line options                                 ---*/
45/*------------------------------------------------------------*/
46
47/* When instrumenting, omit some checks if tell-tale literals for
48   inlined strlen() are visible in the basic block.  default: YES */
49extern Bool MC_(clo_avoid_strlen_errors);
50
51
52/*------------------------------------------------------------*/
53/*--- Functions                                            ---*/
54/*------------------------------------------------------------*/
55
56/* Functions defined in mc_main.c */
57extern VGA_REGPARM(1) void MC_(helperc_complain_undef) ( HWord );
58extern void MC_(helperc_value_check8_fail) ( void );
59extern void MC_(helperc_value_check4_fail) ( void );
60extern void MC_(helperc_value_check1_fail) ( void );
61extern void MC_(helperc_value_check0_fail) ( void );
62
63extern VGA_REGPARM(1) void MC_(helperc_STOREV8) ( Addr, ULong );
64extern VGA_REGPARM(2) void MC_(helperc_STOREV4) ( Addr, UWord );
65extern VGA_REGPARM(2) void MC_(helperc_STOREV2) ( Addr, UWord );
66extern VGA_REGPARM(2) void MC_(helperc_STOREV1) ( Addr, UWord );
67
68extern VGA_REGPARM(1) UWord MC_(helperc_LOADV1)  ( Addr );
69extern VGA_REGPARM(1) UWord MC_(helperc_LOADV2)  ( Addr );
70extern VGA_REGPARM(1) UWord MC_(helperc_LOADV4)  ( Addr );
71extern VGA_REGPARM(1) ULong MC_(helperc_LOADV8)  ( Addr );
72
73extern void MC_(helperc_MAKE_STACK_UNINIT) ( Addr base, UWord len );
74
75/* Functions defined in mc_translate.c */
76extern IRBB* MC_(instrument) ( IRBB* bb_in, VexGuestLayout* layout,
77                               IRType gWordTy, IRType hWordTy );
78
79#endif
80
81/*--------------------------------------------------------------------*/
82/*--- end                                                          ---*/
83/*--------------------------------------------------------------------*/
84
85