<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 05/08/2015 10:10 AM, David Blaikie
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAENS6EuA1YLp8RBd2OPWoGCriKzF-h2H3YUNd4+OMQN8BTfqTw@mail.gmail.com"
      type="cite">
      <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 moz-do-not-send="true"
                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>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Personally, I would love to see this restored since it's a very
    useful tool, but I don't have the expertise or time to assist with
    anything other than reviews.  <br>
    <blockquote
cite="mid:CAENS6EuA1YLp8RBd2OPWoGCriKzF-h2H3YUNd4+OMQN8BTfqTw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><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 moz-do-not-send="true"
                href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> 
                     <a moz-do-not-send="true"
                href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
              <a moz-do-not-send="true"
                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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>