Bug 452960 - gdb can't single step on powerpc
gdb can't single step on powerpc
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
powerpc Linux
low Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-06-26 05:10 EDT by Benjamin Herrenschmidt
Modified: 2009-07-15 04:24 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-15 04:24:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Benjamin Herrenschmidt 2008-06-26 05:10:28 EDT
Description of problem:
building a program with -g and -O0 (or any other optimisation level) on fc9 and
trying to single step (using "next") in gdb falls over when reaching a library call

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

#include <stdio.h>

int main(void)
        printf("Whagamackooo !\n");
        printf("Whagamackooo !\n");
        printf("Whagamackooo !\n");
        printf("Whagamackooo !\n");

        return 0;

I build it:

gcc -g -O0 -o toto toto.c

(tried with gcc 4.3 from fc9 and 4.1.3 from ubuntu gutsy, this is 32
bits, and the result is the same)

I start gdb ./toto

I do break main followed by run, it stops where expected:

benh@bimini:~/toto$ gdb toto
GNU gdb Fedora (6.8-1.fc9)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ppc-redhat-linux-gnu"...
(gdb) break main
Breakpoint 1 at 0x10000470: file toto.c, line 5.
(gdb) run
Starting program: /home/benh/toto/toto

Breakpoint 1, main () at toto.c:5
5               printf("Whagamackooo !\n");

Now I attempt to single step over the printf statements (ie, "next"
command) and it falls over:

(gdb) n
0x10000810 in call___do_global_ctors_aux ()
(gdb) n
Single stepping until exit from function call___do_global_ctors_aux,
which has no line number information.
0x0ffc5dcc in _dl_runtime_resolve () from /lib/ld.so.1
(gdb) n
Single stepping until exit from function _dl_runtime_resolve,
which has no line number information.
_IO_puts (str=<value optimized out>) at ioputs.c:34
34      {


According to Ulrich Weigand, this is due to gdb not understanding the new
"secure PLT" stubs (a binutils change ?). This can be worked around at build
time with -mbss-plt but that's impractical. The proper solution is to update to
a new upstream version of gdb which fixes that.

Unfortunately, the fix isn't easily backported as it involves multiple changes
in gdb and the bfd code.
Comment 1 Jan Kratochvil 2008-07-14 04:21:00 EDT
This scratch build works for me for your testcase:
Just I have only accessible ppc Rawhide, not ppc F9, and Rawhide kernel crashes
too much with the gdb testsuite
It would be best even if you can supply testsuite results for both 6.8-11.fc9
and 6.8-12.fc9 by:
rpmbuild --rebuild --with testsuite gdb-X.src.rpm 2>&1|tee log-X
Comment 2 Jan Kratochvil 2008-07-16 09:37:55 EDT
The backport from Comment 1 has regressions on unix/-m64/-fPIE/-pie at least on
gdb.arch/altivec-abi.exp , tested on RHEL-5.2, reasigning back.
Comment 3 Jan Kratochvil 2008-07-25 08:15:31 EDT
* Fri Jul 25 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8-13
- Fix powerpc recent secure PLTs handling (shared library calls) (BZ 452960).

Now I did not find any regression on ppc64-debugging-{,PIE-}{ppc64,ppc}.
(Tested on RHEL-5.3.)
Comment 4 Fedora Update System 2008-07-25 08:16:59 EDT
gdb-6.8-13.fc9 has been submitted as an update for Fedora 9
Comment 5 Fedora Update System 2008-07-30 16:07:16 EDT
gdb-6.8-13.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gdb'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-6843
Comment 6 Fedora Update System 2008-08-04 01:20:27 EDT
gdb-6.8-17.fc9 has been submitted as an update for Fedora 9
Comment 7 Benjamin Herrenschmidt 2008-08-04 01:51:46 EDT
Thanks !

I busted my fc9 install on the bimini box... I need to fix that up and I'll be able to test.
Comment 8 Fedora Update System 2008-08-07 19:53:08 EDT
gdb-6.8-17.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Bug Zapper 2009-06-09 21:47:41 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  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 WONTFIX if it remains open with a Fedora 
'version' of '9'.

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 prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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.

The process we are following is described here: 
Comment 10 Bug Zapper 2009-07-15 04:24:09 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 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.

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.