<div dir="ltr"><div class="gmail_default"><span style="font-family:tahoma,sans-serif">Thank you,Micah.</span></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">This way sounds good, Do you mean writing a function to trace the value and insert a callinst to call this function in the entry of the program ?</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">How can I insert a function writing by myself? Is there any code examples?</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">-Jin Huang</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/3 Jin Huang <span dir="ltr"><<a href="mailto:54jin.huang@gmail.com" target="_blank">54jin.huang@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Thank you , James. </div><div class="gmail_default" style="font-family:tahoma,sans-serif">
<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
But this way needs to determine whether the instruction is a LOAD/STORE ,and if I want to preserve the operations on these variables for further dynamic symbolic execution usage(just like KLEE ,but it's a static analysis ,not dynamic),I had to backtrace instructions ,this may be not very efficient if the operation is very complex! </div>
<span class="HOEnZb"><font color="#888888">
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">-Jin Huang</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">2014/1/3 Jin Huang <span dir="ltr"><<a href="mailto:54jin.huang@gmail.com" target="_blank">54jin.huang@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Thank You ! John and Swarup. I have already downloaded the code!</div>

<div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/3 Sahoo, Swarup Kumar <span dir="ltr"><<a href="mailto:ssahoo2@illinois.edu" target="_blank">ssahoo2@illinois.edu</a>></span><div>

<div><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div bgcolor="#FFFFFF">
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hi Jin Huang,<br>
<br>
The updated Giri code is available at <a href="https://github.com/liuml07/giri." target="_blank">
https://github.com/liuml07/giri</a>. This will give you an idea of how to instrument the program to trace different values. You can modify the code to achieve your goals.<br>
<br>
-Swarup.<br>
<br>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> Criswell, John T<br>
<b>Sent:</b> Thursday, January 02, 2014 2:12 PM<br>
<b>To:</b> Jin Huang; <a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a>; Sahoo, Swarup Kumar<br>
<b>Subject:</b> Re: [LLVMdev] Tracing values in llvm IR<br>
</font><br>
</div><div><div>
<div></div>
<div>
<div>On 1/1/14 11:39 PM, Jin Huang wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:tahoma,sans-serif">Hi, everyone.</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">I want to writing a Pass to get the variable value while the program is running ,the basic idea is to insert an STL map in the program ,and get every value and address a program use ,but whether
 it's possible to do this by transforming the llvm IR?</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">I didn't find any useful functions to get a variable's address in LLVM IR .It seems that the IR is an SSA form and we can not get a value's address in compiling time.Is that right? But how can
 I dynamically get the variable's value in run time by writing a Pass ?</div>
</div>
</blockquote>
<br>
The giri project does dynamic tracing of values stored to and loaded from memory.  It stores the trace of memory accesses on disk because they get very large very quickly.  You can either reuse the Giri code or modify it to suit your purposes.<br>



<br>
Swarup, is there a place where people can download the updated Giri code that your Google Summer of Code student worked on?<br>
<br>
-- John T.<br>
<br>
<blockquote type="cite">
<div dir="ltr"></div>
<br>
<fieldset></fieldset> <br>
<pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</div>
</div></div></div>
</div>
</div>

</blockquote></div></div></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>