Could I get some debug info at the byte code level? I am writing a
passer and if will be nice if I can know which line in the source an
instruction (or value) corresponds to.
I found DebugInfo.cpp may be useful. Could you tell me which function
I should call inorder to know the source file name and the line number
for a particular instruction?
I found DebugInfo.cpp may be useful. Could you tell me which function
I should call inorder to know the source file name and the line number
for a particular instruction?
Which version of LLVM?
There was a major change between 2.6 and 2.7 so my answer depends on that.
Could I get some debug info at the byte code level? I am writing a
passer and if will be nice if I can know which line in the source an
instruction (or value) corresponds to.
SAFECode has an example of using debug info for LLVM 2.6 in lib/DebugInstrumentation/DebugInstrumentation.cpp. Mainline SAFECode also works with LLVM 2.7, but the debug info usage may not be working quite right yet.
2010/5/18 Zheng Wang <jason.wangz <at> gmail.com>:
>
> I found DebugInfo.cpp may be useful. Could you tell me which function
> I should call inorder to know the source file name and the line number
> for a particular instruction?
>