Hi,
We wanted to be able to call functions while debugging for Hexagon however this is only possible from lldb currently when there is JIT support.
Currently LLDB supports emulation via IR interpreting and executing on target via JIT however The IR interpretation is limited and cannot currently make function calls.
We have extended the IR interpreter so that it can execute a function call on target, via register manipulation. This is the same method
that is used by GDB for calling a function. This involved handling the Call IR instruction, passing arguments to a new thread plan and collecting any return values and
passing them back into the IR interpreter.
Several interfaces to the ABI were extended to allow more detailed information about arguments and return values when setting up a trivial call. See "ABI::PrepareTrivialCall".
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?