bart | 09dc13f | 2009-02-14 15:13:31 +0000 | [diff] [blame] | 1 | /* |
bart | 86562bd | 2009-02-16 19:43:56 +0000 | [diff] [blame] | 2 | This file is part of drd, a thread error detector. |
bart | 09dc13f | 2009-02-14 15:13:31 +0000 | [diff] [blame] | 3 | |
bart | d4bab99 | 2013-10-04 05:55:30 +0000 | [diff] [blame] | 4 | Copyright (C) 2006-2013 Bart Van Assche <bvanassche@acm.org>. |
bart | 09dc13f | 2009-02-14 15:13:31 +0000 | [diff] [blame] | 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 | |
| 38 | Bool DRD_(get_check_stack_accesses)(void); |
| 39 | void DRD_(set_check_stack_accesses)(const Bool c); |
bart | f98a569 | 2009-05-03 17:17:37 +0000 | [diff] [blame] | 40 | Bool DRD_(get_first_race_only)(void); |
| 41 | void DRD_(set_first_race_only)(const Bool fro); |
bart | 1335ecc | 2009-02-14 16:10:53 +0000 | [diff] [blame] | 42 | IRSB* DRD_(instrument)(VgCallbackClosure* const closure, |
| 43 | IRSB* const bb_in, |
| 44 | VexGuestLayout* const layout, |
bart | 31b983d | 2010-02-21 14:52:59 +0000 | [diff] [blame] | 45 | VexGuestExtents* const vge, |
florian | ca503be | 2012-10-07 21:59:42 +0000 | [diff] [blame] | 46 | VexArchInfo* const archinfo_host, |
bart | 1335ecc | 2009-02-14 16:10:53 +0000 | [diff] [blame] | 47 | IRType const gWordTy, |
| 48 | IRType const hWordTy); |
| 49 | void DRD_(trace_mem_access)(const Addr addr, const SizeT size, |
bart | 7826acb | 2011-12-11 18:49:39 +0000 | [diff] [blame] | 50 | const BmAccessTypeT access_type, |
bart | 42f3263 | 2011-12-13 11:12:05 +0000 | [diff] [blame] | 51 | const HWord stored_value_hi, |
| 52 | const HWord stored_value_lo); |
bart | 99edb29 | 2009-02-15 15:59:20 +0000 | [diff] [blame] | 53 | VG_REGPARM(2) void DRD_(trace_load)(Addr addr, SizeT size); |
| 54 | VG_REGPARM(2) void DRD_(trace_store)(Addr addr, SizeT size); |
bart | fdaa018 | 2009-03-10 09:25:32 +0000 | [diff] [blame] | 55 | void DRD_(clean_memory)(const Addr a1, const SizeT len); |
bart | 09dc13f | 2009-02-14 15:13:31 +0000 | [diff] [blame] | 56 | |
| 57 | |
| 58 | #endif // __DRD_LOAD_STORE_H |