[lldb-dev] Fwd: Re: Trivial call for non JIT enabled target

Aidan Dodds aidan at codeplay.com
Tue Apr 15 07:53:30 PDT 2014


Hi,

I am working on a target that will not support JIT, however I want to 
support function calling from expressions.

I have managed to get this working by adding a CALL instruction 
interpreter to IRInterpreter.cpp where a CALL instruction
executes a ThreadPlanCallFunction.  I have function arguments handled 
correctly, however getting back the
return value has been tricky.

ThreadPlanCallFunction expects a ClangASTType (describing the return 
type) which is passed to the ABI which actually extracts it.
Since the functions I want to call have not been JIT compiled I have no 
clang context to reference.

It seems this could be useful for other targets that don't support JIT 
too so I would like to find a clean way to implement
this that I can submit it upstream.  Can anyone point me towards a clean 
approach?

Thanks,
Aidan



More information about the lldb-dev mailing list