Open wtdcode opened 2 weeks ago
The basic idea would be allowing users to injecting any piece of code into the jit-ted code. In unicorn, we called it as hooks. I also once added support for internal dynamic hooks.
Basically, we can call some functions before&after every opcode (not need to do it if no hooks installed). This can be done in the LLVM IR level.
Is it possible to jump out from the JIT-ed code? Say, implementing a custom
inspector
and jit-ed code can call the inspector so that users can trace everything.