public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names
@ 2020-07-20 22:42 andrew.burgess at embecosm dot com
2020-07-20 22:43 ` [Bug symtab/26270] " andrew.burgess at embecosm dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: andrew.burgess at embecosm dot com @ 2020-07-20 22:42 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26270] Disassembler no longer showing demangled symbol names
2020-07-20 22:42 [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names andrew.burgess at embecosm dot com
@ 2020-07-20 22:43 ` andrew.burgess at embecosm dot com
2020-07-23 14:56 ` tromey at sourceware dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: andrew.burgess at embecosm dot com @ 2020-07-20 22:43 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26270] Disassembler no longer showing demangled symbol names
2020-07-20 22:42 [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names andrew.burgess at embecosm dot com
2020-07-20 22:43 ` [Bug symtab/26270] " andrew.burgess at embecosm dot com
@ 2020-07-23 14:56 ` tromey at sourceware dot org
2020-07-23 15:17 ` tromey at sourceware dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-07-23 14:56 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26270] Disassembler no longer showing demangled symbol names
2020-07-20 22:42 [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names andrew.burgess at embecosm dot com
2020-07-20 22:43 ` [Bug symtab/26270] " andrew.burgess at embecosm dot com
2020-07-23 14:56 ` tromey at sourceware dot org
@ 2020-07-23 15:17 ` tromey at sourceware dot org
2020-07-23 16:11 ` tromey at sourceware dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-07-23 15:17 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26270] Disassembler no longer showing demangled symbol names
2020-07-20 22:42 [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names andrew.burgess at embecosm dot com
` (2 preceding siblings ...)
2020-07-23 15:17 ` tromey at sourceware dot org
@ 2020-07-23 16:11 ` tromey at sourceware dot org
2020-07-23 16:47 ` tromey at sourceware dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-07-23 16:11 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26270] Disassembler no longer showing demangled symbol names
2020-07-20 22:42 [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names andrew.burgess at embecosm dot com
` (3 preceding siblings ...)
2020-07-23 16:11 ` tromey at sourceware dot org
@ 2020-07-23 16:47 ` tromey at sourceware dot org
2020-07-28 17:51 ` cvs-commit at gcc dot gnu.org
2020-07-28 17:53 ` tromey at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-07-23 16:47 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26270] Disassembler no longer showing demangled symbol names
2020-07-20 22:42 [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names andrew.burgess at embecosm dot com
` (4 preceding siblings ...)
2020-07-23 16:47 ` tromey at sourceware dot org
@ 2020-07-28 17:51 ` cvs-commit at gcc dot gnu.org
2020-07-28 17:53 ` tromey at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-28 17:51 UTC (permalink / raw)
To: gdb-prs
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 <tromey@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f75a069335831a4f375923b5ab815ce0b6b2ebdf
commit f75a069335831a4f375923b5ab815ce0b6b2ebdf
Author: Andrew Burgess <andrew.burgess@embecosm.com>
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 <tromey@adacore.com>
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 <andrew.burgess@embecosm.com>
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/26270] Disassembler no longer showing demangled symbol names
2020-07-20 22:42 [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names andrew.burgess at embecosm dot com
` (5 preceding siblings ...)
2020-07-28 17:51 ` cvs-commit at gcc dot gnu.org
@ 2020-07-28 17:53 ` tromey at sourceware dot org
6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2020-07-28 17:53 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-07-28 17:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 22:42 [Bug symtab/26270] New: Disassembler no longer showing demangled symbol names andrew.burgess at embecosm dot com
2020-07-20 22:43 ` [Bug symtab/26270] " andrew.burgess at embecosm dot com
2020-07-23 14:56 ` tromey at sourceware dot org
2020-07-23 15:17 ` tromey at sourceware dot org
2020-07-23 16:11 ` tromey at sourceware dot org
2020-07-23 16:47 ` tromey at sourceware dot org
2020-07-28 17:51 ` cvs-commit at gcc dot gnu.org
2020-07-28 17:53 ` tromey at sourceware dot org
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).