This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

warning: RTTI issue trying to look up template with default

I've filed FYI:

While trying to access one of my types, I am getting "warning: RTTI
symbol not found for class ...".

This is because one of the template parameters has a default value, and
the type is found if you omit the default value but not if you include
it.  And, the printer seems to want to include it.

Attached to that bug is a file tvtest.cpp.  To reproduce the problem:

$ g++ -Wall -ggdb3 -o tvtest tvtest.cpp

$ gdb tvtest
(gdb) br 49
Breakpoint 1 at 0x989: file tvtest.cpp, line 49.

(gdb) run
Breakpoint 1, main (argc=1, argv=0x7fffffffe638) at tvtest.cpp:52
52          return iim.container.tree->_depth;

(gdb) p iim.container.tree->_depth
warning: RTTI symbol not found for class 'TreeVector<IntKeyMap<long, 1000>::ValueWrapper>::Tree'
$1 = 3

(gdb) python print str(gdb.parse_and_eval("iim")["container"]["tree"].type)
TreeVector<IntKeyMap<long>::ValueWrapper>::Tree *

Note that the type of the container is
TreeVector<IntKeyMap<long>::ValueWrapper>::Tree (without the default
template argument) but when I try to use GDB to examine the contents of
that type, GDB tries to lookup TreeVector<IntKeyMap<long,
1000>::ValueWrapper>::Tree (with the default argument) and fails.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]