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.
On Apr 2, 2009, at 4:50 AM, Taco H. in den Bosch wrote:> > 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.See InsertStopPoint() and others from DebugInfo.h - Devang> > > (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. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Apr 2, 2009, at 4:50 AMPDT, Taco H. in den Bosch wrote:> > 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.This is not entirely an LLVM issue; it would need cooperation from your debugger. gdb, for example, has no such support. I suggest looking at this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-March/021255.html and its continuation in April: http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-April/021421.html> (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. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reasonably Related Threads
- [LLVMdev] Heads Up: libLLVMCore.a and loadable modules
- [LLVMdev] Heads Up: libLLVMCore.a and loadable modules
- [LLVMdev] JIT compiled intrinsics calls is call to null pointer
- How quickly are RHEL errata released as CentOS errata ?
- [LLVMdev] Heads Up: libLLVMCore.a and loadable modules