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