<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Andy,<br>
      So I figured out the python issue. Host::GetLLDBPath() is broken.
      It was failing for me because I am building in Release mode. It
      only works in Debug mode by luck :) The problem is lines 1035+ in
      source/Host/common/Host.cpp. llvm::Twine should only be used for
      temporary objects! See
      <a class="moz-txt-link-freetext" href="http://llvm.org/docs/ProgrammersManual.html#dss-twine">http://llvm.org/docs/ProgrammersManual.html#dss-twine</a><br>
      <br>
      I have attached a patch this fixes the issue. I haven't found time
      to investigate my other issue yet.<br>
      <br>
      Thanks!<br>
      -Kal<br>
      <br>
      Am 8/6/13 4:29 PM, schrieb Kaylor, Andrew:<br>
    </div>
    <blockquote
cite="mid:0983E6C011D2DC4188F8761B533492DE5640CAA7@ORSMSX104.amr.corp.intel.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <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;}
/* 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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
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.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@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]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hmm… 
            I’ve never seen the -P option print the wrong path.  Looking
            at the code (in Host::GetLLDBPath) it doesn’t even look
            possible for it to print what you’re seeing.<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">On
            the other hand, the second directory you mention should be
            the correct one.  If you set PYTHONPATH to that does “python
            -c ‘import lldb’” work?<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">-Andy<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"><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"">
            Kal Conley [<a class="moz-txt-link-freetext" href="mailto:kcconley@gmail.com">mailto:kcconley@gmail.com</a>]
            <br>
            <b>Sent:</b> Tuesday, August 06, 2013 2:00 AM<br>
            <b>To:</b> Kaylor, Andrew<br>
            <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
            <b>Subject:</b> Re: [lldb-dev] lldb problems on linux<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <div>
            <p class="MsoNormal">Hi Andy,<br>
              I tried<br>
              export PYTHONPATH=`$llvm/build/Debug+Asserts/bin/lldb -P`<br>
              but it didn't work for me. If I run `build/bin/lldb -P` it
              outputs "build/lib7/site-packages" which doesn't exist.<br>
              There is a directory build/lib/python-2.7/site-packages
              but if I set the PYTHONPATH to this directory I get the
              same errors.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal">I can import lldb; in python
              successfully though.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal">Any other ideas?<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal">-Kal<o:p></o:p></p>
          </div>
        </div>
        <div>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
          <div>
            <p class="MsoNormal">2013/8/5 Kaylor, Andrew <<a
                moz-do-not-send="true"
                href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>><o:p></o:p></p>
            <div>
              <div>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi
                    Kal,</span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">For
                    the second problem, you need to set the PYTHONPATH
                    environment variable.  Try this:</span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-indent:.5in"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">export
                    PYTHONPATH=`$llvm/build/Debug+Asserts/bin/lldb -P`</span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regarding
                    the source information, I would start by using the
                    following command within lldb (after you have
                    created the target you want to debug):</span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-indent:.5in"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">target
                    modules dump sections</span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If
                    you don’t see debug sections in that list, then
                    that’s the problem.  If you do, try enabling DWARF
                    logging (‘log enable dwarf all’) and see if anything
                    obvious turns up in the output when you try to set a
                    breakpoint.</span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-Andy</span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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"">
                    <a moz-do-not-send="true"
                      href="mailto:lldb-dev-bounces@cs.uiuc.edu"
                      target="_blank">lldb-dev-bounces@cs.uiuc.edu</a>
                    [mailto:<a moz-do-not-send="true"
                      href="mailto:lldb-dev-bounces@cs.uiuc.edu"
                      target="_blank">lldb-dev-bounces@cs.uiuc.edu</a>]
                    <b>On Behalf Of </b>Kal Conley<br>
                    <b>Sent:</b> Sunday, August 04, 2013 11:27 AM<br>
                    <b>To:</b> <a moz-do-not-send="true"
                      href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a></span><o:p></o:p></p>
                <div>
                  <p class="MsoNormal"><br>
                    <b>Subject:</b> [lldb-dev] lldb problems on linux<o:p></o:p></p>
                </div>
                <p class="MsoNormal"
                  style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                <div>
                  <div>
                    <div>
                      <div>
                        <p class="MsoNormal"
                          style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
                      </div>
                      <div>
                        <div>
                          <p class="MsoNormal"
                            style="mso-margin-top-alt:auto;margin-bottom:12.0pt">I
                            recently build lldb from trunk (revision
                            187708) and source-level debugging isn't
                            working for me. It seems its not loading any
                            source information. What is the best way to
                            troubleshoot this?<o:p></o:p></p>
                        </div>
                      </div>
                    </div>
                    <div>
                      <div>
                        <p class="MsoNormal"
                          style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Also
                          make check-lldb doesn't work on Linux when
                          building with CMake. I just get error:<br>
                          <br>
                          This script requires lldb.py to be in either
                          /home/user/tools/llvm_3.4~svn187708/tools/lldb/build/Debug/LLDB.framework/Resources/Python,
                          /home/user/tools/llvm_3.4~svn187708/tools/lldb/build/Release/LLDB.framework/Resources/Python,
                          or
/home/user/tools/llvm_3.4~svn187708/tools/lldb/build/BuildAndIntegration/LLDB.framework/Resources/Python<o:p></o:p></p>
                      </div>
                    </div>
                  </div>
                  <div>
                    <div>
                      <div>
                        <p class="MsoNormal"
                          style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I
                          get the same error with lldb-3.3.<o:p></o:p></p>
                      </div>
                      <div>
                        <p class="MsoNormal"
                          style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
                      </div>
                      <p class="MsoNormal"
                        style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks!<o:p></o:p></p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>