This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug c++/16843] GDB relies on the mangled name of a subprogram to be a prefix of the enclosing class name


https://sourceware.org/bugzilla/show_bug.cgi?id=16843

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com

--- Comment #3 from Tom Tromey <tromey at redhat dot com> ---
(In reply to David Blaikie from comment #0)

> If GDB doesn't rely on this assumption and can handle some differences
> between naming (for example GCC always uses "long int" even though c++filt
> demangles this as "long", 'x' versus (char)120, etc, etc... ) then it's just
> missing a case to handle the bug reported against GCC.

gdb doesn't rely on this.
Instead it does name canonicalization.

> In this case, "ptype f" will give a declaration of foo<1> because the
> difference in mangled names (foo<'\001'> versus foo<'\x01'>) but other
> examples ('long int' versus 'long') don't exhibit this problem.

This is a bit curious since I was under the impression that gdb
demangled the linkage name, canonicalized it, and then used that name.
So, barring cases where "physname" must be computed, I thought gdb
wouldn't be using the name in the debuginfo.

But, no big deal, some part of my understanding must be wrong.
Probably a bug in the canonicalization code.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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