Ran into a problem when adding a new architecture to radare2. It has a variable instruction length, and going backwards in visual mode put me at incorrect addresses (not aligned with opcodes). After digging in radare2 code, I figured that if minimum/maximum instruction lengths were not available (that's the case with Python's analysis plugin), radare2 would not attempt to find the previous opcode, instead jumping back by a default value of 4 bytes.
This PR adds support for implementing the archinfo callback in Python.
Ran into a problem when adding a new architecture to radare2. It has a variable instruction length, and going backwards in visual mode put me at incorrect addresses (not aligned with opcodes). After digging in radare2 code, I figured that if minimum/maximum instruction lengths were not available (that's the case with Python's analysis plugin), radare2 would not attempt to find the previous opcode, instead jumping back by a default value of 4 bytes.
This PR adds support for implementing the archinfo callback in Python.