Sounds like the compiler omitted the type info for std::string. Try "-glldb" in your compiler flags. This tunes debug info for LLDB. A lot of compilers will try to omit types from debug info if the type doesn't originate in the current executable. std::string would be one of those classes. If that flag doesn't work, then you might try -fno-limit-debug-info.
Let me know if that helps! > On Jul 18, 2019, at 5:45 PM, Bob Eastbrook <baconeater...@gmail.com> wrote: > > Thanks for the info. "frame var --raw msg" is empty on my Fedora 30 > system, but populated correctly on Ubuntu 19.04. E.g., on Fedora 30: > > (lldb) frame var --raw msg > (std::string) msg = {} > > I compiled with "clang++ -g main.cpp". Nothing fancy. Installed > Clang with "dnf install clang". Again, nothing fancy. > > I'm a LLVM newb. Can you point me in the right direction? > > > > > On Fri, Jul 12, 2019 at 1:56 PM Greg Clayton <clayb...@gmail.com> wrote: >> >> We have a summary provider for std::string that is built into LLDB that must >> not be working with the C++ runtime you are using. The current summary >> string that is used is in >> source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp in >> LoadLibStdcppFormatters: >> >> lldb::TypeSummaryImplSP std_string_summary_sp( >> new StringSummaryFormat(stl_summary_flags, "${var._M_dataplus._M_p}")); >> >> So do a "frame var --raw msg" and see what the members of your std::string >> look like. I am guessing you won't see "_M_dataplus" or "_M_p" in there. The >> "${var" means your std::string variable, and we are trying to access >> "msg._M_dataplus._M_p" to see what the string looks like. >> >> >> On Jun 24, 2019, at 10:26 PM, Bob Eastbrook via lldb-dev >> <lldb-dev@lists.llvm.org> wrote: >> >> With Clang 8.0.0 and libstd++ 9.1.1 on Fedora 30 x86_64, I get this >> error from LLDB when trying to see the value of a string: >> >> "error: summary string parsing error" >> >> The code is simply: >> >> std::string msg{"foo bar baz"}; >> >> With libcxx 8.0.0, instead of the above error, I simply see "??" when >> inspecting the msg variable. >> >> All of the above works fine for me in Ubuntu 19.04. I only have the >> problem with Fedora 30. Tried in both CLion and VS Code. >> >> How should I troubleshoot this? Could I be missing a package? >> _______________________________________________ >> lldb-dev mailing list >> lldb-dev@lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev >> >> _______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev