For Hexagon we want to be able to call functions during debugging, however currently lldb only supports this when there is JIT support. Although emulation using IR interpretation is an alternative, it is currently limited in that it can't make function calls.
In this patch we have extended the IR interpreter so that it can execute a function call on the target using register manipulation. Which is the same method GDB uses for calling a function. To do this we need to handle the Call IR instruction, passing arguments to a new thread plan and collecting any return values to pass back into the IR interpreter. The new thread plan is needed to call an alternative ABI interface of "ABI::PerpareTrivialCall()", allowing more detailed information about arguments and return values.
Currently the expression evaluator checks if an expression can be interpreted and if it can it uses the IR interpreter, if it can't then it tries to JIT the expression and run it on target. It seems however that for targets that can JIT, it would be better to use that when executing a function call since its presumably much more robust. Perhaps this should be used exclusively for targets that cannot JIT?
I'd appreciate any feedback since this change touches a few important files.
This is not 64-bit clean. Usually lldb::addr_t is the right container for a raw pointer from the inferior.