<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 3/6/13 4:39 AM, Vardhan Varma wrote:<br>
    </div>
    <blockquote
cite="mid:CAGmJaJRC0XfoWe3G+1c5TYSzZfXdDqqNQv1iDvg=5b7nO69xPw@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">
        <div><br>
        </div>
        Hi,
        <div>  This is my first post on this forum so please use soft
          batons (-;</div>
        <div><br>
        </div>
        <div>  I'm wondering if there is feature already  in LLVM or
          clang to embed</div>
        <div>  variable tracing instructions in the compiled output, so
          that on execution</div>
        <div>  of the program, a dump of various variables values over
          time is generated.</div>
        <div><br>
        </div>
        <div>  It's a little like the old unix program ctrace[1], but
          using LLVM, instead</div>
        <div style="">  of rewriting C !</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>[1] <a moz-do-not-send="true"
            href="http://docs.oracle.com/cd/E24457_01/html/E22003/ctrace.1.html">http://docs.oracle.com/cd/E24457_01/html/E22003/ctrace.1.html</a><br
            clear="all">
          <div>
            <div style="">Thanx in advance,</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    No, I don't believe there is a tool quite like that in LLVM. 
    However, we have a research prototype dynamic backwards slicing tool
    called Giri written with LLVM.  Giri instruments a program to record
    all basic block and loads/store executions in a trace file and can
    then use this trace to find all LLVM IR instructions that were
    executed in that execution of the program.<br>
    <br>
    You could probably enhance Giri with additional features to do what
    you describe.<br>
    <br>
    If you'd like a copy of Giri, please email the list.<br>
    <br>
    -- John T.<br>
    <br>
    <br>
    <blockquote
cite="mid:CAGmJaJRC0XfoWe3G+1c5TYSzZfXdDqqNQv1iDvg=5b7nO69xPw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div style=""><br>
            </div>
            <div dir="ltr">--Vardhan<br>
              <br>
            </div>
          </div>
        </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>