type summary for stl container is broken?

Answered

Hi there,

 

I'm using CLion (2016.2.3) on Mac (10.13.6). I found lldb unable to display the correct information of any stl containers like std::vector, std::map, etc. Please see screenshot below. Obviously the sizes are not 0. But the debugger shows the wrong information.

My clang version is 

Apple LLVM version 9.1.0 (clang-902.0.39.2)

Target: x86_64-apple-darwin17.7.0

Thread model: posix

InstalledDir: /Library/Developer/CommandLineTools/usr/bin

The bundled lldb shows the following version info 

(lldb) version
lldb-350.99.0

I understand if I add "--stdlibc++" compilation options. The debugger can work as expected. However, as the runtime library is a little bit out of date and lacks of some c++11 features such as emplace() method as I commented above. It couldn't be an option for me.

 

Could someone please help look into the issue and let me know why this happens? Thanks

 

0
1 comment

Hi! Please update CLion to the latest stable version - CLion 2018.2. It bundles LLDB v6.0 and has a fix for unordered_map (https://youtrack.jetbrains.com/issue/CPP-4845). As for the problems with other STL containers, please follow https://youtrack.jetbrains.com/issue/CPP-10235 and the related ones.

0

Please sign in to leave a comment.