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
This commit is contained in:
Julian Seward 2010-01-06 10:22:25 +00:00
parent 5c21cd2532
commit 5d80fe2bdc

View File

@ -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);
}