blob: f820555839345ec0ab816e4eb13b2b84a4d065c6 [file] [log] [blame]
bart09dc13f2009-02-14 15:13:31 +00001/*
2 This file is part of drd, a data race detector.
3
4 Copyright (C) 2006-2009 Bart Van Assche <bart.vanassche@gmail.com>.
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307, USA.
20
21 The GNU General Public License is contained in the file COPYING.
22*/
23
24
25/*
26 * Functions related to instrumentation of loads and stores.
27 */
28
29
30#ifndef __DRD_LOAD_STORE_H
31#define __DRD_LOAD_STORE_H
32
33
34#include <libvex.h> /* IRSB */
35#include <pub_tool_tooliface.h> /* VgCallbackClosure */
36
37
38Bool DRD_(get_check_stack_accesses)(void);
39void DRD_(set_check_stack_accesses)(const Bool c);
40IRSB* drd_instrument(VgCallbackClosure* const closure,
41 IRSB* const bb_in,
42 VexGuestLayout* const layout,
43 VexGuestExtents* const vge,
44 IRType const gWordTy,
45 IRType const hWordTy);
46void drd_trace_mem_access(const Addr addr, const SizeT size,
47 const BmAccessTypeT access_type);
48VG_REGPARM(2) void drd_trace_load(Addr addr, SizeT size);
49VG_REGPARM(2) void drd_trace_store(Addr addr, SizeT size);
50
51
52#endif // __DRD_LOAD_STORE_H