For me, it seems it hangs 100% of the times I try to print a reference variable.
I have reference to a class, which include other classes. I can print the members of the class, but not the class itself.
(gdb) p metrics.dim
$1 = {x = 106, y = 0}
(gdb) p metrics
$2 = (SystemText::SystemTextLabelMetrics &) @0xe1b18000: {text = {<std::__1::__basic_string_common<true>> = {<No data fields>},
__r_ = {<std::__1::__libcpp_compressed_pair_imp<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, std::__1::allocator<char>, 2u>> = {<std::__1::allocator<char>> = {<No data fields>}, __first_ = {{__l = {__cap_ = 1818579724, __size_ = 7627621, __data_ = 0x0}, __s = {
{__size_ = 12 '\f', __lx = 12 '\f'}, __data_ = "Select\000\000\000\000"}, __r = {__words = {1818579724, 7627621, 0}}}}}, <No data fields>}, static npos = 4294967295}, fontName = {<std::__1::__basic_string_common<true>> = {<No data fields>},
__r_ = {<std::__1::__libcpp_compressed_pair_imp<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, std::__1::allocator<char>, 2u>> = {<std::__1::allocator<char>> = {<No data fields>}, __first_ = {{__l = {__cap_ = 33, __size_ = 20,
__data_ = 0xe1abfc80 "DigitalSansEF-Medium"}, __s = {{__size_ = 33 '!', __lx = 33 '!'},
Works fine to "p metrics.dim" but if I try to "p metrics" the console hangs after printing the above (looks incomplete), and gdb starts using 100% cpu.
Also happened when trying to print a const std::string&, which makes me suspect the problem is the reference?