https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932

--- Comment #3 from Paul Smith <psmith at gnu dot org> ---
Created attachment 42030
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42030&action=edit
tv.py

Test case attached.  To run it:

$ gcc -ggdb3 -o tvtest tvtest.cpp

$ gdb tvtest -ex 'br 28' -ex 'source tv.py' -ex 'run' -ex 'p $tv(tv)'
  ...
Reading symbols from tvtest...done.
Breakpoint 1 at 0x400804: file tvtest.cpp, line 28.
Starting program: /home/psmith/src/gcc/tvtest 

Breakpoint 1, main (argc=1, argv=0x7fffffffe758) at tvtest.cpp:28
28          return tv.tree->_depth;
vector: TreeVector<int, 2>
tree: TreeVector<int, 2>::Tree *
warning: RTTI symbol not found for class 'TreeVector<int, 2u>::Tree'
depth: 3
Python Exception <class 'gdb.error'> No type named TreeVector<int, 2u>::Tree.: 
Error occurred in Python convenience function: No type named TreeVector<int,
2u>::Tree.
(gdb) 


If you build with GCC 6.2 instead, it will work fine.

Note, I'm not sure whether the old type containing "2u" is right and the new
one is wrong or vice versa, but there's definitely a problem in that in the new
one we see "2" in the type but something in the debug symbols is still looking
for "2u" as evidenced by the RTTI symbol warning.

Reply via email to