Bug 1283746 - gdb fails to print the signature of a function
Summary: gdb fails to print the signature of a function
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-19 17:30 UTC by Andreas Schneider
Modified: 2016-12-20 16:06 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 16:06:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
1.c.gz (54.86 KB, application/octet-stream)
2015-11-19 18:12 UTC, Jan Kratochvil
no flags Details

Description Andreas Schneider 2015-11-19 17:30:21 UTC
Description of problem:

In Samba we use gdb to get the signature of a function to detect if the ABI changed. gdb in Fedora 23 fails to print the function signature.

Actual results:
gdb bin/default/librpc/libndr.so

GNU gdb (GDB) Fedora 7.10-29.fc23
(gdb) p ndr_print_uid_t
$1 = {<text variable, no debug info>} 0xa0a0 <ndr_print_uid_t>


Expected results:
gdb bin/default/librpc/libndr.so

GNU gdb (GDB) 7.9.1
(gdb) p ndr_print_uid_t
$1 = {void (struct ndr_print *, const char *, uid_t)} 0xde5d <ndr_print_uid_t>

Comment 1 Jan Kratochvil 2015-11-19 18:10:37 UTC
It is a problem of GCC, not GDB.  Although I do not see what's wrong there.

$ rpm -qf /usr/lib/debug/usr/lib64/libndr.so.0.0.5.debug
samba-debuginfo-4.3.0-3.fc23.x86_64
$ readelf -wi /usr/lib/debug/usr/lib64/libndr.so.0.0.5.debug|grep ndr_print_uid_t
$ readelf -Wa /usr/lib/debug/usr/lib64/libndr.so.0.0.5.debug|grep ndr_print_uid_t
   398: 000000000000a0c0     7 FUNC    GLOBAL DEFAULT   12 ndr_print_uid_t

Comment 2 Jan Kratochvil 2015-11-19 18:12:50 UTC
Created attachment 1096843 [details]
1.c.gz

gcc -o 1.o -O2 -g 1.c -c

$ readelf -wi 1.o|grep ndr_print_uid_t
$ readelf -Wa 1.o|grep ndr_print_uid_t
   154: 0000000000002a70     5 FUNC    GLOBAL DEFAULT    1 ndr_print_uid_t

__attribute__((visibility("default"))) void ndr_print_uid_t(struct ndr_print *ndr, const char *name, uid_t u)
{
 ndr_print_dlong(ndr, name, u);
}

Various other functions are present in DWARF there.

Comment 3 Andreas Schneider 2015-11-24 14:08:03 UTC
Is someone looking into the issue?

Comment 4 Jakub Jelinek 2015-12-09 16:45:10 UTC
This is IPA-ICF in the works, I don't think it is possible to do anything with this for GCC 5.x, and for GCC 6.x it is already quite late too.  See 
http://gcc.gnu.org/PR63572 and
http://gcc.gnu.org/PR65797 .
First of all, it isn't clear what to emit in this case, what DWARF extensions we will need, and only once something is agreed on, it needs to be implemented in GCC and GDB.

Comment 5 Jakub Jelinek 2015-12-09 16:45:51 UTC
You can always use -fno-ipa-icf to avoid the identical code folding optimization.

Comment 6 Fedora End Of Life 2016-11-24 13:35:21 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2016-12-20 16:06:37 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.