<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.xapple-style-span
{mso-style-name:x_apple-style-span;}
span.xapple-converted-space
{mso-style-name:x_apple-converted-space;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Chip,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">You made my day with the build system patch! It looks good to me, however, I’m not an expert on the SWIG scripts..so maybe someone else who is more familiar
with the old source/Interpreter/Makefile can take a look too?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">After applying it, I noticed a small problem on Linux with the generation of the _lldb.so symlink. On Ubuntu 11.10 (with GNU Make 3.81) I did a clean out-of-tree
build and ended up with the following files:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Consolas;color:#1F497D">[OK] build/Debug+Asserts/lib/liblldb.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Consolas;color:#1F497D">[BROKEN] build/Debug+Asserts/lib/python2.7/site-packages/lldb/_lldb.so --> ../../liblldb.so<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">To fix the problem, either the symlink needs to point 3 (instead of 2) directories up, or the it needs to be located one directory up.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">However, to keep PYTHONPATH simple, I recommend the latter option, since the former would require adding two directories to the PYTHONPATH (“site-packages”
as well as “lldb”). I am attaching a patch (can be applied on top of yours) that places the _lldb.so symlink in “site-packages” instead of “lldb”.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Otherwise, your patch looks great. I can confirm no test regressions on Linux (but a couple of fixes!). I tried it out on Mac OS X too, and noticed no build
problems on 10.8.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Dan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<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;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Charles Davis [mailto:cdavis5x@gmail.com]
<br>
<b>Sent:</b> Sunday, October 14, 2012 3:30 PM<br>
<b>To:</b> Malea, Daniel<br>
<b>Cc:</b> Kyung su Kim; lldb-dev@cs.uiuc.edu<br>
<b>Subject:</b> Re: [lldb-dev] Hello, I have Questions, about lldb:(<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Oct 14, 2012, at 11:21 AM, Malea, Daniel wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The instructions posted on the build page are slightly out-of-date. LLDB trunk builds against LLVM and Clang trunk, and not a pinned revision as the docs mention.
If you’re using older revisions, you should update all your working copies to trunk.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The error you’re seeing with importing _lldb is due to a problem in one of the Makefiles. Python requires an _lldb.so symlink (pointing to liblldb.so) on the
PYTHONPATH in order for the import to work correctly. I am working on a cross-platform way to generate it with the Makefiles,</span><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal">I have a patch for you right now.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">I originally wrote this patch so I could build with Makefiles on Darwin. (For the record, I have commit access, so I can commit this once approved).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'll note that with this change, the liblldbInterpreter.a Makefile is *radically* simpler.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Summary of changes:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Stop assuming that "Darwin" means "being built by Xcode". There's a slight chance this could break Xcode builds, but I carefully reworked the argument parsing in the scripts so that Xcode builds don't need to change. Apple devs: if this
patch breaks Xcode builds, feel free to scream loudly at me so I can go fix it. ;)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Use the finish script to install, too.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Make swig auto-generate dependencies if DISABLE_AUTO_DEPENDENCIES is off (like before).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Ask python where to put site-specific files using the distutils.sysconfig.get_python_lib() function. (Tests' Makefile was changed to do this, too.) This is what you're "supposed" to do, but I avoided doing that when I first wrote the
Makefile because I thought that not all python installs would have it. I hope I was wrong...<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Fix out-of-tree builds. For out-of-tree builds, you have to pass to the edit-swig-python-wrapper-file.py script the directory where swig put the LLDBWrapPython.cpp file, or it won't be able to find it. The Makefiles were doing this before
Filipe went in and started this.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Completely eliminate duplication of logic between Makefile and Xcode builds. Radically simplify the Interpreter Makefile; now there aren't two versions of the same rule (one of which wasn't even being maintained!).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I've tested this patch with several self-host builds of Clang, and I have had no trouble building, installing, or running LLDB.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Chip<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best of luck,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Dan</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span class="xapple-converted-space"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span></span><a href="mailto:lldb-dev-bounces@cs.uiuc.edu"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">lldb-dev-bounces@cs.uiuc.edu</span></a><span class="xapple-converted-space"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span></span><a href="mailto:[mailto:lldb-dev-bounces@cs.uiuc.edu]"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">[mailto:lldb-dev-bounces@cs.uiuc.edu]</span></a><span class="xapple-converted-space"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span></span><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">On
Behalf Of<span class="xapple-converted-space"> </span></span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Kyung su Kim<br>
<b>Sent:</b><span class="xapple-converted-space"> </span>Saturday, October 13, 2012 6:20 PM<br>
<b>To:</b><span class="xapple-converted-space"> </span></span><a href="mailto:lldb-dev@cs.uiuc.edu"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">lldb-dev@cs.uiuc.edu</span></a><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br>
<b>Subject:</b><span class="xapple-converted-space"> </span>[lldb-dev] Hello, I have Questions, about lldb:(</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Hello<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">I'm a university student in korea<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">I have a project in my school, that related dissembleing arm machine code<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">( I'll use python script language to my project)<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">so I found this llvm project and i tried to build llvm <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">but I faced some problems.. <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">(my compilation enviroment is Ubuntu Linux 10.x )<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">I saw <a href="http://lldb.llvm.org/build.html">http://lldb.llvm.org/build.html</a> , and worked step by step<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">first problem is that the llvm_revision doesn't update,.. <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">typed as I saw in manual "<span style="font-size:13.5pt;font-family:"Courier New"">svn update -r 127682" ,doesn't work properly..</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">the result is as below..<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">-----------------------------------------------<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">root@kaspyx:~/llvm/tools# grep -m 1 llvm_revision lldb/scripts/<a href="http://build-llvm.pl">build-llvm.pl</a><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">our $llvm_revision = "127600";<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">----------------------------------------------<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">it looks some guess.. but i wonder why llvm_revision version doesn't update is..<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">why the revision is 127600?? i want update to 127682.. <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">it's my guess...<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">most of all, lldb doesn't work..<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">i compiled llvm, lldb, clang... step by step, referenced manual..<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">but lldb.py doesn't work..<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">There are compiled binaries in my directory.. ( like "lldb", "lldb.py" ..etc)<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">but When I typed for using lldb python library, I saw error strings<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">-----------------------------------------<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">root@kaspyx:~/build2/Debug+Asserts/bin# python lldb.py<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">Traceback (most recent call last):<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> File "lldb.py", line 25, in <module><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> _lldb = swig_import_helper()<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> File "lldb.py", line 17, in swig_import_helper<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> import _lldb<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">ImportError: No module named _lldb<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">-----------------------------------------<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">I couldn't find _lldb module.. ,<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">problems are looks relate llvm_revision.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">I don't know what should i do..<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal">am i compiled properly??<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal">thanks ....<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>