Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 452960 - gdb can't single step on powerpc
Summary: gdb can't single step on powerpc
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 9
Hardware: powerpc
OS: Linux
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-06-26 09:10 UTC by Benjamin Herrenschmidt
Modified: 2009-07-15 08:24 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-07-15 08:24:09 UTC

Attachments (Terms of Use)

Description Benjamin Herrenschmidt 2008-06-26 09:10:28 UTC
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/
(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 08:21:00 UTC
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 13:37:55 UTC
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 12:15:31 UTC
* Fri Jul 25 2008 Jan Kratochvil <> - 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 12:16:59 UTC
gdb-6.8-13.fc9 has been submitted as an update for Fedora 9

Comment 5 Fedora Update System 2008-07-30 20:07:16 UTC
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:

Comment 6 Fedora Update System 2008-08-04 05:20:27 UTC
gdb-6.8-17.fc9 has been submitted as an update for Fedora 9

Comment 7 Benjamin Herrenschmidt 2008-08-04 05:51:46 UTC
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 23:53:08 UTC
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-10 01:47:41 UTC
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 08:24:09 UTC
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.