2 /*--------------------------------------------------------------------*/
3 /*--- Ptrcheck: a pointer-use checker. ---*/
4 /*--- Exports for stack and global access checking. ---*/
6 /*--------------------------------------------------------------------*/
9 This file is part of Ptrcheck, a Valgrind tool for checking pointer
12 Copyright (C) 2008-2017 OpenWorks Ltd
15 This program is free software; you can redistribute it and/or
16 modify it under the terms of the GNU General Public License as
17 published by the Free Software Foundation; either version 2 of the
18 License, or (at your option) any later version.
20 This program is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 General Public License for more details.
25 You should have received a copy of the GNU General Public License
26 along with this program; if not, see <http://www.gnu.org/licenses/>.
28 The GNU General Public License is contained in the file COPYING.
35 void sg_pre_clo_init ( void );
36 void sg_post_clo_init ( void );
37 void sg_fini(Int exitcode
);
39 void sg_die_mem_stack ( Addr old_SP
, SizeT len
);
40 void sg_pre_thread_ll_create ( ThreadId parent
, ThreadId child
);
41 void sg_pre_thread_first_insn ( ThreadId tid
);
43 void sg_new_mem_mmap( Addr a
, SizeT len
,
44 Bool rr
, Bool ww
, Bool xx
, ULong di_handle
);
45 void sg_new_mem_startup( Addr a
, SizeT len
,
46 Bool rr
, Bool ww
, Bool xx
, ULong di_handle
);
47 void sg_die_mem_munmap ( Addr a
, SizeT len
);
49 /* These really ought to be moved elsewhere, so that we don't have to
50 include this file in h_main.c. See comments in sg_main.c and
51 h_main.c for what this is about. */
53 struct _SGEnv
; /* abstract export */
55 struct _SGEnv
* sg_instrument_init ( IRTemp (*newIRTemp_cb
)(IRType
,void*),
56 void* newIRTemp_opaque
);
58 void sg_instrument_fini ( struct _SGEnv
* env
);
60 void sg_instrument_IRStmt ( /*MOD*/struct _SGEnv
* env
,
63 const VexGuestLayout
* layout
,
64 IRType gWordTy
, IRType hWordTy
);
66 void sg_instrument_final_jump ( /*MOD*/struct _SGEnv
* env
,
70 const VexGuestLayout
* layout
,
71 IRType gWordTy
, IRType hWordTy
);
74 /*--------------------------------------------------------------------*/
75 /*--- end sg_main.h ---*/
76 /*--------------------------------------------------------------------*/