<div dir="ltr">Make sense. Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-05 3:20 GMT+08:00 Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes the debug info does get bigger. But this is better than having the compiler omit the "std::string" definition so that you can't view stuff from the STL.<br>
<span class="HOEnZb"><font color="#888888"><br>
Greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Nov 24, 2015, at 7:22 PM, 陶征霖 via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Also I found that the size of my program binary increases from 140M to 180M after -fno-limit-debug-info is added. Seems a lot of debug info is added?<br>
><br>
> 2015-11-25 10:24 GMT+08:00 陶征霖 <<a href="mailto:zhenglin.taozl@gmail.com">zhenglin.taozl@gmail.com</a>>:<br>
> Hi Pavel,<br>
><br>
> Thanks for your reply. Seems lldb not finding the variable in the first place.<br>
><br>
> * thread #1: tid = 154, 0x0000000000400e5e a.out`main + 94 at t.cpp:5, name = 'a.out', stop reason = breakpoint 1.1<br>
>     frame #0: 0x0000000000400e5e a.out`main + 94 at t.cpp:5<br>
>    2       using namespace std;<br>
>    3       int main() {<br>
>    4          string s = "aa";<br>
> -> 5          cout << s;<br>
>    6       }<br>
> (lldb) frame variable --raw-output s<br>
> (std::__1::string) s = {}<br>
><br>
> I added -fno-limit-debug-info in my test, and it works now. But why?<br>
><br>
> Thanks,<br>
> Zhenglin<br>
><br>
><br>
><br>
> 2015-11-24 19:21 GMT+08:00 Pavel Labath <<a href="mailto:labath@google.com">labath@google.com</a>>:<br>
> HI,<br>
><br>
> a couple of random shots in the dark:<br>
><br>
> - could you paste the output of "frame variable --raw-output s"? (This<br>
> disables lldb's type formatters. The goal is to see if the problem is<br>
> in the formatter, or in lldb not finding the variable in the first<br>
> place).<br>
><br>
> - could you compile your test executable with -fno-limit-debug-info<br>
> and see if that helps?<br>
><br>
> pl<br>
><br>
><br>
> On 23 November 2015 at 02:15, 陶征霖 via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br>
> ><br>
> > ---------- Forwarded message ----------<br>
> > From: 陶征霖 <<a href="mailto:zhenglin.taozl@gmail.com">zhenglin.taozl@gmail.com</a>><br>
> > Date: 2015-11-20 23:10 GMT+08:00<br>
> > Subject: lldb doesn't work on centos7<br>
> > To: <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> ><br>
> ><br>
> > Hi,<br>
> ><br>
> > I build llvm+clang+lldb 3.7.0 from source code on centos7, the build command<br>
> > is "cmake -DCMAKE_BUILD_TYPE=Release<br>
> > -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DLLVM_LIBDIR_SUFFIX=64", there is<br>
> > no error during building process.<br>
> ><br>
> > And then I compile following c++ code using command "clang++ -std=c++11<br>
> > -stdlib=libc++ -lc++abi -g t.cpp":<br>
> > // t.cpp<br>
> > #include <iostream><br>
> > using namespace std;<br>
> > int main() {<br>
> >    string s = "aa";<br>
> >    cout << s;<br>
> > }<br>
> > Try lldb to debug a.out, found that I can't print string s which shows<br>
> > empty:<br>
> > lldb a.out<br>
> > (lldb) target create "a.out"<br>
> > Current executable set to 'a.out' (x86_64).<br>
> > (lldb) l<br>
> >    4    int main() {<br>
> >    5       string s = "aa";<br>
> >    6       cout << s;<br>
> >    7    }<br>
> > (lldb) b 6<br>
> > Breakpoint 1: where = a.out`main + 94 at t.cpp:6, address =<br>
> > 0x0000000000400e5e<br>
> > (lldb) r<br>
> > Process 150 launched: '/root/a.out' (x86_64)<br>
> > Process 150 stopped<br>
> > * thread #1: tid = 150, 0x0000000000400e5e a.out`main + 94 at t.cpp:6, name<br>
> > = 'a.out', stop reason = breakpoint 1.1<br>
> >     frame #0: 0x0000000000400e5e a.out`main + 94 at t.cpp:6<br>
> >    3    using namespace std;<br>
> >    4    int main() {<br>
> >    5       string s = "aa";<br>
> > -> 6       cout << s;<br>
> >    7    }<br>
> > (lldb) p s<br>
> > (std::__1::string) $0 = {}<br>
> ><br>
> > Could you please help point out what's wrong in my env? Thanks.<br>
> ><br>
> > Thanks,<br>
> > Zhenglin<br>
> ><br>
> > _______________________________________________<br>
> > lldb-dev mailing list<br>
> > <a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a><br>
> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
> ><br>
> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>陶征霖<br>Pivotal</div></div></div>
</div>