public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/12707] physname regression: set print demangle off
Date: Fri, 24 Apr 2020 21:36:03 +0000	[thread overview]
Message-ID: <bug-12707-4717-c6q1zYkHiN@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-12707-4717@http.sourceware.org/bugzilla/>

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

--- Comment #11 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bcfe6157ca288efed127c5efe21ad7924e0d98cf

commit bcfe6157ca288efed127c5efe21ad7924e0d98cf
Author: Tom Tromey <tom@tromey.com>
Date:   Fri Apr 24 15:35:01 2020 -0600

    Use the linkage name if it exists

    The DWARF reader has had some odd code since the "physname" patches landed.

    In particular, these patches caused PR symtab/12707; namely, they made
    it so "set print demangle off" no longer works.

    This patch attempts to fix the problem.  It arranges to store the
    linkage name on the symbol if it exists, and it changes the DWARF
    reader so that the demangled name is no longer (usually) stored in the
    symbol's "linkage name" field.

    c-linkage-name.exp needed a tweak, because it started working
    correctly.  This conforms to what I think ought to happen, so this
    seems like an improvement here.

    compile-object-load.c needed a small change to use
    symbol_matches_search_name rather than directly examining the linkage
    name.  Looking directly at the name does the wrong thing for C++.

    There is still some name-related confusion in the DWARF reader:

    * "physname" often refers to the logical name and not what I would
      consider to be the "physical" name;

    * dwarf2_full_name, dwarf2_name, and dwarf2_physname all exist and
      return different strings -- but this seems like at least one name
      too many.  For example, Fortran requires dwarf2_full_name, but other
      languages do not.

    * To my surprise, dwarf2_physname prefers the form emitted by the
      demangler over the one that it computes.  This seems backward to me,
      given that the partial symbol reader prefers the opposite, and it
      seems to me that this choice may perform better as well.

    I didn't attempt to clean up these things.  It would be good to do,
    but whenever I contemplate it I get caught up in dreams of truly
    rewriting the DWARF reader instead.

    gdb/ChangeLog
    2020-04-24  Tom Tromey  <tom@tromey.com>

            PR symtab/12707:
            * dwarf2/read.c (add_partial_symbol): Use the linkage name if it
            exists.
            (new_symbol): Likewise.
            * compile/compile-object-load.c (get_out_value_type): Use
            symbol_matches_search_name.

    gdb/testsuite/ChangeLog
    2020-04-24  Tom Tromey  <tom@tromey.com>

            PR symtab/12707:
            * gdb.python/py-symbol.exp: Update expected results for
            linkage_name test.
            * gdb.cp/print-demangle.exp: New file.
            * gdb.base/c-linkage-name.exp: Fix test.
            * gdb.guile/scm-symbol.exp: Update expected results for
            linkage_name test.

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

  parent reply	other threads:[~2020-04-24 21:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 14:58 [Bug symtab/12707] New: " jan.kratochvil at redhat dot com
2013-01-14 14:31 ` [Bug symtab/12707] " tromey at redhat dot com
2013-01-18 14:28 ` tromey at redhat dot com
2013-02-01 21:35 ` tromey at redhat dot com
2013-02-08 13:35 ` tromey at redhat dot com
2013-07-30  0:10 ` b.r.longbons at gmail dot com
2013-10-19 18:38 ` jan.kratochvil at redhat dot com
2013-10-19 19:40 ` dje at google dot com
2013-11-21 19:03 ` tromey at redhat dot com
2014-06-13 19:34 ` tromey at redhat dot com
2014-10-10 11:09 ` hgmnxact at gmail dot com
2014-11-15  0:07 ` dje at google dot com
2020-03-25 19:24 ` tromey at sourceware dot org
2020-04-24 21:36 ` cvs-commit at gcc dot gnu.org [this message]
2020-04-24 21:39 ` 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-12707-4717-c6q1zYkHiN@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).