public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/16843] GDB relies on the mangled name of a subprogram to be a prefix of the enclosing class name
Date: Wed, 25 Jun 2014 20:00:00 -0000	[thread overview]
Message-ID: <bug-16843-4717-XADrdVIMKa@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-16843-4717@http.sourceware.org/bugzilla/>

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.


  parent reply	other threads:[~2014-06-25 20:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-14 22:20 [Bug c++/16843] New: " dblaikie at gmail dot com
2014-04-15 11:06 ` [Bug c++/16843] " gbenson at redhat dot com
2014-04-15 11:16 ` gbenson at redhat dot com
2014-04-15 20:43 ` dblaikie at gmail dot com
2014-06-25 20:00 ` tromey at redhat dot com [this message]
2022-10-21 17:54 ` tromey at sourceware dot org
2022-10-21 20:24 ` dblaikie at gmail dot com
2024-04-10  9:59 ` tromey at sourceware dot org
2024-04-18 22:08 ` tromey at sourceware dot org
2024-05-14 20:00 ` cvs-commit at gcc dot gnu.org
2024-05-14 20:01 ` tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-16843-4717-XADrdVIMKa@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).