From: Julian Seward Date: Wed, 6 Jan 2010 10:22:25 +0000 (+0000) Subject: Pass sys_cacheflush along to VG_(discard_translations), so we have X-Git-Tag: svn/VALGRIND_3_6_0~406 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d80fe2bdc3c389622aadd9b9265f9779964afdb;p=thirdparty%2Fvalgrind.git Pass sys_cacheflush along to VG_(discard_translations), so we have transparent zero-cost self-modifying code support on ARM. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11018 --- diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c index c566edcd1c..88ed10a76a 100644 --- a/coregrind/m_syswrap/syswrap-arm-linux.c +++ b/coregrind/m_syswrap/syswrap-arm-linux.c @@ -51,6 +51,7 @@ #include "pub_core_syswrap.h" #include "pub_core_tooliface.h" #include "pub_core_stacks.h" // VG_(register_stack) +#include "pub_core_transtab.h" // VG_(discard_translations) #include "priv_types_n_macros.h" #include "priv_syswrap-generic.h" /* for decls of generic wrappers */ @@ -1214,6 +1215,10 @@ PRE(sys_cacheflush) { PRINT("cacheflush (%lx, %#lx, %#lx)",ARG1,ARG2,ARG3); PRE_REG_READ3(long, "cacheflush", void*, addrlow,void*, addrhigh,int, flags); + VG_(discard_translations)( (Addr64)ARG1, + ((ULong)ARG2) - ((ULong)ARG1) + 1ULL/*paranoia*/, + "PRE(sys_cacheflush)" ); + SET_STATUS_Success(0); }