<font color="#000000"><font face="verdana,sans-serif">Hi Nadev,<br></font></font><div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif"><br>
</font></div><div><font face="verdana, sans-serif">The module is really big and i would like the dump to happen in a file instead of stdout. Is that possible?<br></font><div class="gmail_quote">On Sat, Jun 25, 2011 at 3:37 PM, Rotem, Nadav <span dir="ltr"><<a href="mailto:nadav.rotem@intel.com" target="_blank">nadav.rotem@intel.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Ankit, <u></u><u></u></span></p>



<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">From within GDB you can run the following command:<u></u><u></u></span></p>



<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">“call m->dump()”<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">This will print the module in the bitcode in a textual format. <u></u><u></u></span></p>



<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><u></u> <u></u></span></p>



<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a>] <b>On Behalf Of </b>Ankit Sethia<br>



<b>Sent:</b> Saturday, June 25, 2011 20:56<br><b>To:</b> <a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a><br><b>Subject:</b> [LLVMdev] dump a module from inside GDB to a file<u></u><u></u></span></p>



</div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal"><span style="color:black">Hi All,<br clear="all"></span><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">



<span>I changed the CFG of a big function using a pass that runs on a function, I am having trouble debugging it. Is there someway to dump a module to a file from inside gdb? I have access to the Module pointer. Let me know if anything else is needed.<br clear="all">



<br>-- <br>Ankit</span><u></u><u></u></p></div></div></div></div><font face="monospace">---------------------------------------------------------------------<br>
Intel Israel (74) Limited<br>
<br>
This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</font></div></blockquote></div><br><br clear="all"><br>-- <br>Ankit<br>
</div>