#include <unordered_map> #include <string> int main() { std::unordered_map< int, std::string > ht; ht[ 42 ] = "foo"; }
Breakpoint 1, main () at t.cpp:5 (gdb) n (gdb) p ht $1 = std::unordered_map with 0 elements (gdb) n (gdb) p ht $2 = std::unordered_map with 1 elements = { [42] = Traceback (most recent call last): File "/local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/share/gcc-4.5.2/python/libstdcxx/v6/printers.py", line 549, in to_string return self.val['_M_dataplus']['_M_p'].lazy_string (length = len) AttributeError: 'gdb.Value' object has no attribute 'lazy_string' -- Summary: broken python pretty printer for unordered_map. Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at agmk dot net GCC build triplet: x86_64-gnu-linux GCC host triplet: x86_64-gnu-linux GCC target triplet: x86_64-gnu-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45403