This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/81932] Template arguments of type unsigned generate incorrect debugging information


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.

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