How can I navigate STL types using their overloaded operators and member
functions (e.g., “[]” and “.first()” for vectors) ? For example, take a C++
source file with:
std::vector<std::string> v;
v.push_back("foo”);
Breaking after this statement in lldb and typing "p v[0]" would be reasonably
expected to return "foo", but it gives a symbol lookup error. Similarly, “p
v.first()” gives an error that there’s no member named “first”. I’m seeing this
issue with clang/llvm 3.9 and 4.0 nightlies on Ubuntu 16.10 and with Apple’s
versions on MacOS Sierra.
Internet rumor (e.g., this discussion
<http://stackoverflow.com/questions/39680320/printing-debugging-libc-stl-with-xcode-lldb/39731933>)
says this is aggressive inlining of STL code. I’m compiling in clang++ with
“-O0 -g -glldb”.
In comparison, gdb prints the value of v[0] just fine when compiled with gdb.
What am I doing wrong?
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev