<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
There's no general way to do this, but if you control the IR, it's
pretty easy to insert a call to a trace function at the beginning
and end of each function. You could also write a pass to do the
same thing.<br>
<br>
basic steps:<br>
- add a function declaration to the module for your trace function
(i.e. "puts")<br>
- insert calls to that function using constant strings as arguments
(so the address is fixed)<br>
- provide a definition for your trace function (i.e. linking)<br>
<br>
Philip<br>
<br>
<div class="moz-cite-prefix">On 05/08/2014 05:53 PM, Sri wrote:<br>
</div>
<blockquote cite="mid:536C271B.3050803@gmail.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<link href="chrome://translator/skin/floatingPanel.css"
type="text/css" rel="stylesheet">
Hi All<br>
Is there any way to identify which LLVM function is
currently executing in the program. It would be nice to know or
print what is the corresponding LLVM function is executing/<br>
<br>
<br>
Thanks<br>
<br>
Regards <br>
Sri.<br>
<div style="bottom: auto; left: 467px; right: auto; top: 38px;
display: none;" class="translator-theme-default"
id="translator-floating-panel"> </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>