This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information
- From: "ryxi at stu dot xidian.edu.cn" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 Aug 2017 04:25:28 +0000
- Subject: [Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information
- Auto-submitted: auto-generated
- References: <bug-81932-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81932
--- Comment #24 from Xi Ruoyao <ryxi at stu dot xidian.edu.cn> ---
(In reply to Paul Smith from comment #23)
> The lookup_type() was just to show the problem more clearly: I don't do that
> in my actual Python code. This part (or something similar) is what I use:
>
> class tv(gdb.Function):
> def __init__(self):
> gdb.Function.__init__(self, "tv")
> def invoke(self, vector):
> gdb.write("depth: %d\n" % (vector['tree']['_depth']))
>
> and when I run this I get:
>
> warning: RTTI symbol not found for class 'TreeVector<Pod, 2u>::Tree'
>
> In other words, it's not that I'm trying to look up that type myself: that's
> the type that GDB is trying to look up when it tries to evaluate the
> variable of type "TreeVector<Pod, 2>::Tree" in my program.
Yes. GDB does following:
(1) Find the mangled name of the vtable of tv.
(2) Demangle the name, to be 'vtable for TreeVector<Pod, 2u>::Tree'.
(3) Skip 'vtable for ' and get 'TreeVector<Pod, 2u>::Tree'.
(4) Lookup this symbol.