<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 7, 2015 at 11:29 PM, Peter Mackay <span dir="ltr"><<a href="mailto:mackay.pete+llvm@gmail.com" target="_blank">mackay.pete+llvm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm working on a binary translator project that emits an .ll file. I'm<br>
trying to debug it in Visual Studio and would like to be able to step<br>
through and see my generated .ll file in the debugger.<br>
<br>
Does LLVM support debug information corresponding to an input .ll<br>
file?</blockquote><div><br>For a brief time we had a "DebugIR" pass that would add debug info to unannotated IR so your debugger could step through at the IR level (rather than, say, the C++ level, etc). It bitrotted quickly & was removed due to lack of ownership/maintenance.<br><br>- David<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> My hunch is "no, as it expects debug info to come from Clang."<br>
<br>
I assemble it using:<br>
<br>
llc -filetype=obj -O0 -mtriple=x86_64-pc-windows-msvc -o=output.obj input.ll<br>
<br>
I've ran objdump on the file as follows:<br>
<br>
llvm-objdump -section-headers output.obj<br>
<br>
and see the following output:<br>
<br>
output.obj: file format COFF-x86-64<br>
<br>
Sections:<br>
Idx Name Size Address Type<br>
0 .text 00000012 0000000000000000 TEXT<br>
1 .data 00000000 0000000000000000 DATA<br>
2 .bss 00000000 0000000000000000 BSS<br>
3 .drectve 00000018 0000000000000000<br>
4 .xdata 00000008 0000000000000000 DATA<br>
5 .pdata 0000000c 0000000000000000 DATA<br>
<br>
I don't think there's debugging information there, as the .text<br>
section is very small.<br>
<br>
Thanks,<br>
Peter<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div></div>