Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: lldb prints std::vector variables as if they had size 0. Given the following reproducer: // test.cpp #include <stdio.h> #include <vector> int main () { std::vector<int> v (1, 2); std::vector<int>::iterator it(v.begin()); return 0; } When printing the variable "v" with lldb, it should show size=1 and the value of the elements inside the vector (in this case, "[0] = 2"). Instead, lldb prints a vector with size 0 and no elements. Version-Release number of selected component (if applicable): * llvm-toolset-14.0-lldb-14.0.0-1 * llvm-toolset-14.0-python3-lldb-14.0.0-1 How reproducible: 100% Steps to Reproduce: 1. g++ -g test.cpp 2. lldb -b -o 'breakpoint set --file test.cpp --line 7' -o run -o 'p v' -- a.out Actual results: (lldb) p v (std::vector<int, std::allocator<> >) $0 = size=0 {} Expected results: (lldb) p v (std::vector<int, std::allocator<> >) $0 = size=1 { [0] = 2 } Additional info: Found by this testcase https://src.fedoraproject.org/rpms/lldb/blob/rawhide/f/tests/python-embedded-interpreter Tested with llvm-toolset-13.0-lldb-13.0.1-1, using the same binary (no recompiled), in the same system/environment, and the issue does not reproduce.
Created attachment 2164187 [details] My security Show me