[lldb-dev] Fwd: lldb doesn't work on centos7
陶征霖 via lldb-dev
lldb-dev at lists.llvm.org
Sun Nov 22 18:15:57 PST 2015
---------- Forwarded message ----------
From: 陶征霖 <zhenglin.taozl at gmail.com>
Date: 2015-11-20 23:10 GMT+08:00
Subject: lldb doesn't work on centos7
To: llvm-dev at lists.llvm.org
Hi,
I build llvm+clang+lldb 3.7.0 from source code on centos7, the build
command is "cmake -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DLLVM_LIBDIR_SUFFIX=64", there is
no error during building process.
And then I compile following c++ code using command "clang++ -std=c++11
-stdlib=libc++ -lc++abi -g t.cpp":
// t.cpp
#include <iostream>
using namespace std;
int main() {
string s = "aa";
cout << s;
}
Try lldb to debug a.out, found that I can't print string s which shows
empty:
lldb a.out
(lldb) target create "a.out"
Current executable set to 'a.out' (x86_64).
(lldb) l
4 int main() {
5 string s = "aa";
6 cout << s;
7 }
(lldb) b 6
Breakpoint 1: where = a.out`main + 94 at t.cpp:6, address =
0x0000000000400e5e
(lldb) r
Process 150 launched: '/root/a.out' (x86_64)
Process 150 stopped
* thread #1: tid = 150, 0x0000000000400e5e a.out`main + 94 at t.cpp:6, name
= 'a.out', stop reason = breakpoint 1.1
frame #0: 0x0000000000400e5e a.out`main + 94 at t.cpp:6
3 using namespace std;
4 int main() {
5 string s = "aa";
-> 6 cout << s;
7 }
(lldb) p s
(std::__1::string) $0 = {}
Could you please help point out what's wrong in my env? Thanks.
Thanks,
Zhenglin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151123/9a2a49d2/attachment.html>
More information about the lldb-dev
mailing list