rainbow
rainbow copied to clipboard
Speed improvement: disassembly caching
Currently, each instruction is hooked and passed to capstone for disassembly and analysis of used registers for tracing.
Speed could greatly be improved by caching the results and using capstone for blocks instead of individual instructions (for example during the block hook, cached in some dictionary).
Two problems to manage:
- Self-modifying code: how to efficiently check and invalidate a cached block
- when to stop disassembling a block