Created by: Simorfo
Last patch worked fine for single step execution in normal mode. But it does not work when dynamorio uses at the same time sandboxing. Because sandboxing and single step both use special exit, there was a confusion.
When a basic block is built, sandboxing is inserted before mangling, which is used to modify special exit reason. But, sandboxing adds another cti (not a meta app) in case there was a self-modification in the basic block.
So, this patch checks that only the last app instruction at single step address will be mangled