Support for self modifying code on unfriendly platforms (x86, amd64)
via the use of self-checking translations. (Friendly platforms which
have icache-invalidation instructions we can observe, such as ppc32,
are already handled correctly.) This should finally fix the
longstanding problem of V incorrectly handling calls of statically
nested functions (a gcc extension), and more generally make it a lot
easier to use V to debug dynamic code generation systems.
Since self-checking is a large performance overhead, there is some
control via a command line flag:
--smc-support=none
Don't make any translations self-checking.
--smc-support=stack
Add checking code for translations taken from segments which
have the SF_GROWDOWN flag set -- stacks, basically.
This is the default. It should make gcc nested functions and
GNU Ada work correctly with no intervention from the user.
--smc-support=all
Make all translations self-checking. This is expensive and
you want to do this if you're debugging a JIT compiler or
some such.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4122 a5019735-40e9-0310-863c-91ae7b9d1cf9
6 files changed