This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/22013] New: Default value in template argument list breaks RTTI lookup
- From: "psmith at gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 25 Aug 2017 20:20:54 +0000
- Subject: [Bug c++/22013] New: Default value in template argument list breaks RTTI lookup
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22013
Bug ID: 22013
Summary: Default value in template argument list breaks RTTI
lookup
Product: gdb
Version: 8.0
Status: NEW
Severity: normal
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: psmith at gnu dot org
Target Milestone: ---
Created attachment 10370
--> https://sourceware.org/bugzilla/attachment.cgi?id=10370&action=edit
Source file for reproducer
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 Python type seems to want to include it.
Attached find 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.
--
You are receiving this mail because:
You are on the CC list for the bug.