[Bug symtab/26270] New: Disassembler no longer showing demangled symbol names

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/26270] New: Disassembler no longer showing demangled symbol names

Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26270

            Bug ID: 26270
           Summary: Disassembler no longer showing demangled symbol names
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: andrew.burgess at embecosm dot com
  Target Milestone: ---

Created attachment 12714
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12714&action=edit
Test case.

After commit:

      commit bcfe6157ca288efed127c5efe21ad7924e0d98cf (refs/bisect/bad)
      Date:   Fri Apr 24 15:35:01 2020 -0600

          Use the linkage name if it exists

The disassembler no longer demangles function names in its output.  So
we see things like this:

      (gdb) disassemble tree_insert
      Dump of assembler code for function _Z11tree_insertP4nodei:
        ....

Instead of this:

      (gdb) disassemble tree_insert
      Dump of assembler code for function tree_insert(node*, int):
        ....

This is because find_pc_partial_function now returns the linkage name
rather than the demangled name.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/26270] Disassembler no longer showing demangled symbol names

Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26270

Andrew Burgess <andrew.burgess at embecosm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.1

--- Comment #1 from Andrew Burgess <andrew.burgess at embecosm dot com> ---
I've added 10.1 milestone for this bug as this is a regression from previous
releases.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/26270] Disassembler no longer showing demangled symbol names

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26270

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
           Assignee|unassigned at sourceware dot org   |tromey at sourceware dot org

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/26270] Disassembler no longer showing demangled symbol names

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26270

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
The test needed "set print asm-demangle on".
That doesn't affect the current output, but will after
the bug is fixed.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/26270] Disassembler no longer showing demangled symbol names

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26270

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
https://sourceware.org/pipermail/gdb-patches/2020-July/170791.html

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/26270] Disassembler no longer showing demangled symbol names

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26270

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
*** Bug 17992 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/26270] Disassembler no longer showing demangled symbol names

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26270

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <[hidden email]>:

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

commit f75a069335831a4f375923b5ab815ce0b6b2ebdf
Author: Andrew Burgess <[hidden email]>
Date:   Tue Jul 28 11:48:15 2020 -0600

    Demangle function names when disassembling

    Andrew Burgess pointed out a regression, which he described in
    PR symtab/26270:

    ================
    After commit:

      commit bcfe6157ca288efed127c5efe21ad7924e0d98cf (refs/bisect/bad)
      Date:   Fri Apr 24 15:35:01 2020 -0600

          Use the linkage name if it exists

    The disassembler no longer demangles function names in its output.  So
    we see things like this:

      (gdb) disassemble tree_insert
      Dump of assembler code for function _Z11tree_insertP4nodei:
        ....

    Instead of this:

      (gdb) disassemble tree_insert
      Dump of assembler code for function tree_insert(node*, int):
        ....

    This is because find_pc_partial_function now returns the linkage name
    rather than the demangled name.
    ================

    This patch fixes the problem by introducing a new "overload" of
    find_pc_partial_function, which returns the general_symbol_info rather
    than simply the name.  This lets the disassemble command choose which
    name to show.

    Regression tested on x86-64 Fedora 32.

    gdb/ChangeLog
    2020-07-28  Tom Tromey  <[hidden email]>

            PR symtab/26270:
            * symtab.h (find_pc_partial_function_sym): Declare.
            * cli/cli-cmds.c (disassemble_command): Use
            find_pc_partial_function_sym.  Check asm_demangle.
            * blockframe.c (cache_pc_function_sym): New global.
            (cache_pc_function_name): Remove.
            (clear_pc_function_cache): Update.
            (find_pc_partial_function_sym): New function, from
            find_pc_partial_function.
            (find_pc_partial_function): Rewrite using
            find_pc_partial_function_sym.

    gdb/testsuite/ChangeLog
    2020-07-28  Andrew Burgess  <[hidden email]>

            PR symtab/26270:
            * gdb.cp/disasm-func-name.cc: New file.
            * gdb.cp/disasm-func-name.exp: New file.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug symtab/26270] Disassembler no longer showing demangled symbol names

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26270

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.

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