<div dir="ltr"><font face="verdana,sans-serif">Hello,<br><br>First, VMKit is compiled using LLVM tools. You probably need to compile LLVM in debug mode before compiling VMKit in debug mode. I do this using the commands:<br>

<br><span style="font-family:courier new,monospace">svn co <a href="http://llvm.org/svn/llvm-project/llvm/trunk">http://llvm.org/svn/llvm-project/llvm/trunk</a> llvm</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">cd llvm/tools</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">svn co <a href="http://llvm.org/svn/llvm-project/cfe/trunk">http://llvm.org/svn/llvm-project/cfe/trunk</a> clang</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">cd ../projects</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">svn co <a href="http://llvm.org/svn/llvm-project/compiler-rt/trunk">http://llvm.org/svn/llvm-project/compiler-rt/trunk</a> compiler-rt</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">cd ..</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">./configure --disable-optimized --enable-assertions --enable-debug-runtime --enable-debug-symbols --enable-jit --enable-threads --enable-pthreads --enable-pic --enable-targets=x86,cpp</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">make -j12 ENABLE_OPTIMIZED=0 BUILD_EXAMPLES=0 ENABLE_DOCS=0</span><br style="font-family:courier new,monospace"><br>This might take a long time to compile.<br>Next, you get vmkit, patch it, configure it for debug mode then compile it:<br>

<br><span style="font-family:courier new,monospace">svn co <a href="http://llvm.org/svn/llvm-project/vmkit/trunk">http://llvm.org/svn/llvm-project/vmkit/trunk</a> vmkit</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">cd vmkit</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">patch -p0 < </span></font><font style="font-family:courier new,monospace" face="verdana,sans-serif">/path/to</font><font style="font-family:courier new,monospace" face="verdana,sans-serif">/vmkit-debug.patch<br>

./configure --with-llvmsrc=/path/to/llvm --with-llvmobj=/</font><font style="font-family:courier new,monospace" face="verdana,sans-serif">path/to</font><font style="font-family:courier new,monospace" face="verdana,sans-serif">/llvm --with-gnu-classpath-libs=/</font><font style="font-family:courier new,monospace" face="verdana,sans-serif">path/to</font><font face="verdana,sans-serif"><span style="font-family:courier new,monospace">/classpath/lib --with-gnu-classpath-glibj=/usr/local/classpath/share/classpath/glibj.zip</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">make -j12</span><br style="font-family:courier new,monospace"><br>The patch modifies configure files and makefiles and source files. So patch a verbatim copy of VMKit and do run configure <b style="font-family:verdana,sans-serif">after</b><span style="font-family:verdana,sans-serif"> patching.</span><br style="font-family:verdana,sans-serif">

</font><div dir="ltr"><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">If you have issues feel free to ask.</span><br style="font-family:verdana,sans-serif"><br style="font-family:verdana,sans-serif"><span style="font-family:verdana,sans-serif">Cordially.</span><br style="color:rgb(0,0,0);font-family:verdana,sans-serif">

<br style="color:rgb(0,0,0);font-family:verdana,sans-serif"><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">Koutheir ATTOUCHI.</span><br><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">LinkedIn profile: </span><a style="font-family:verdana,sans-serif" href="http://www.linkedin.com/in/koutheirattouchi" target="_blank">http://www.linkedin.com/in/koutheirattouchi</a><br style="color:rgb(0,0,0);font-family:verdana,sans-serif">

<span style="font-family:verdana,sans-serif">Blog: </span><a style="font-family:verdana,sans-serif" href="http://koutheir.blogspot.com" target="_blank">http://koutheir.blogspot.com</a><br style="font-family:verdana,sans-serif">

<br style="font-family:verdana,sans-serif"></div><br>
<br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 9:13 AM, Wei Tang <span dir="ltr"><<a href="mailto:tangwei.ict@gmail.com" target="_blank">tangwei.ict@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Thanks a lot for help! <br><br>Regards!<span class="HOEnZb"><font color="#888888"><br>wei</font></span><div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 3:01 PM, Koutheir Attouchi <span dir="ltr"><<a href="mailto:koutheir@gmail.com" target="_blank">koutheir@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>I'll send you the patch soon. If you have specific questions then post them on the mailing list. I advise you to read the code (at least the headers) before debugging.</p>


<span><font color="#888888">
<p>Koutheir Attouchi.</p></font></span><div><div>
<div class="gmail_quote">On Jun 13, 2012 4:32 AM, "Wei Tang" <<a href="mailto:tangwei.ict@gmail.com" target="_blank">tangwei.ict@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Would you send me the patch? I hope to understand more details by debugging instead of  just reading source code.<div>Thanks in advance!   <div><br></div><div>Regards!</div><div>tangwei<br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 9:52 AM, Koutheir Attouchi <span dir="ltr"><<a href="mailto:koutheir@gmail.com" target="_blank">koutheir@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font face="verdana,sans-serif">Officially, VMKit does not support debug builds. But I can make a patch that makes it work in debug build. However, my modifications are not yet committed and I qualify them to be in beta stage. If you don't need debugging, stick with the trunk version. If you really need it, I can send you a patch that enables debugging.</font><br style="font-family:verdana,sans-serif">






<div dir="ltr"><br style="font-family:verdana,sans-serif"><span style="font-family:verdana,sans-serif">Koutheir ATTOUCHI.</span><br><span style="font-family:verdana,sans-serif">LinkedIn profile: </span><a style="font-family:verdana,sans-serif" href="http://www.linkedin.com/in/koutheirattouchi" target="_blank">http://www.linkedin.com/in/koutheirattouchi</a><br style="font-family:verdana,sans-serif">






<span style="font-family:verdana,sans-serif">Blog: </span><a style="font-family:verdana,sans-serif" href="http://koutheir.blogspot.com" target="_blank">http://koutheir.blogspot.com</a><br style="font-family:verdana,sans-serif">






<br style="font-family:verdana,sans-serif"></div><br>
<br><br><div class="gmail_quote"><div><div>On Wed, Jun 13, 2012 at 3:29 AM, Wei Tang <span dir="ltr"><<a href="mailto:tangwei.ict@gmail.com" target="_blank">tangwei.ict@gmail.com</a>></span> wrote:<br></div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>

Hi, <div>  Does vmkit support debug build now?  I can build successfully with "make ENABLE_OPTIMIZED=1", but failed with "make". </div><div>Following is error message for your reference.  </div><div><br>







</div><div>llvm[0]: Constructing LLVMBuild project information.<div>make[1]: Entering directory `/wsp/cmplr/vmkit/vmkit/obj-debug/lib/vmkit/StaticGCPass'</div><div>llvm[1]: Compiling StaticGCPass.cpp for Debug+Asserts build (PIC)</div>







<div>llvm[1]: Linking Debug+Asserts Loadable Module StaticGCPass.so</div><div>make[1]: *** No rule to make target `/wsp/cmplr/vmkit/vmkit/obj-debug/lib/vmkit/StaticGCPass/Debug+Asserts/StaticGCPass.ll', needed by `/wsp/cmplr/vmkit/vmkit/obj-debug/lib/vmkit/StaticGCPass/Debug+Asserts/StaticGCPass.bc'.  Stop.</div>







<div>make[1]: Leaving directory `/wsp/cmplr/vmkit/vmkit/obj-debug/lib/vmkit/StaticGCPass'</div><div>make: *** [all] Error 1</div><div><br></div><div>my configure line: </div><div>../configure --with-llvmsrc=/wsp/cmplr/vmkit/llvm --with-llvmobj=/wsp/cmplr/vmkit/llvm/obj --with-gnu-classpath-glibj=/wsp/cmplr/vmkit/classpath-0.97.2/lib/glibj.zip  --with-gnu-classpath-libs=/wsp/cmplr/vmkit/classpath-0.97.2/lib</div>






<span><font color="#888888">
<div><br></div>-- <br>Best Regards <br>wei
</font></span></div>
<br></div></div>_______________________________________________<br>
vmkit-commits mailing list<br>
<a href="mailto:vmkit-commits@cs.uiuc.edu" target="_blank">vmkit-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
vmkit-commits mailing list<br>
<a href="mailto:vmkit-commits@cs.uiuc.edu" target="_blank">vmkit-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards <br>tangwei<br>
</div></div>
<br>_______________________________________________<br>
vmkit-commits mailing list<br>
<a href="mailto:vmkit-commits@cs.uiuc.edu" target="_blank">vmkit-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits</a><br>
<br></blockquote></div>
</div></div><br>_______________________________________________<br>
vmkit-commits mailing list<br>
<a href="mailto:vmkit-commits@cs.uiuc.edu" target="_blank">vmkit-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Best Regards <br>tangwei<br>
</div></div><br>_______________________________________________<br>
vmkit-commits mailing list<br>
<a href="mailto:vmkit-commits@cs.uiuc.edu">vmkit-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits</a><br>
<br></blockquote></div><br></div>