[LLVMdev] JIT compilation and debuggen

Taco H. in den Bosch taco.indenbosch at xs4all.nl
Thu Apr 2 04:50:41 PDT 2009


Hello everyone,

I have recently discovered the LLVM project and have to say that it looks
impressively interesting so far. Kudos to all developers for the good work.

However, I am afraid I have a few newbie questions that I have been unable
to resolve browsing the documentation.

I am evaluating the use of LLVM with respect to a feasibility study for a
project. 

For this project I need to be able to generate code on the fly and execute
it. I have been able to do this with LLVM through JITting based on the
Fibonacci sample.

Another thing that I need to be able to do is debug the executing code,
stepping through it, inspecting call stack and data, and setting
breakpoints. It is unclear to me whether or not LLVM supports this
currently.

(1) I have been unable to add stop points to the generated code. I would
have expected to use

DbgStopPoint::Create(BasicBlock *)

but there is no such function.

(2) I see a Debugger classs with stepping functions, and an InferiorProcess
class with stepping functions and the ability to add breakpoints, but I see
no way to connect these classes to the ExecutionEngine that is used to run
the generated function through "runFunction".

(3) Although I see stepping and breakpoint functions I do not see a way to
respond to a breakpoint hit (via a callback or otherwise).

Unfortunately there seems to be no sample or tutorial for working with the
debugger functionality of the C++ API of LLVM.

If anyone could shed some light on these questions, I would be grateful.

With kind regards,
Taco.


-- 
View this message in context: http://www.nabble.com/JIT-compilation-and-debuggen-tp22846119p22846119.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list