[lldb-dev] Navigating STL types

Mehdi Amini via lldb-dev lldb-dev at lists.llvm.org
Mon Jan 23 16:07:23 PST 2017


Yes, this is a problem with our STL, we are forcing inlining and we need to fix this on libc++ side, it is scheduled, but we haven’t come to it yet.

— 
Mehdi

> On Jan 23, 2017, at 3:58 PM, Andreas Yankopolus via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 
> 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 at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170123/32224ae4/attachment.html>


More information about the lldb-dev mailing list