Bug 137478 - Broken debugging of ld.so
Summary: Broken debugging of ld.so
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact:
URL:
Whiteboard: bzcl34nup
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-28 18:41 UTC by Elena Zannoni
Modified: 2008-08-02 23:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-07 00:02:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Elena Zannoni 2004-10-28 18:41:15 UTC
Description of problem:

<foo> elena: btw, somebody broke gdb since it is now unable to debug
ld.so.  probably happened as part of making pies work
<elena> foo: where? rhel3/rhel4/both? platforms?
<elena> foo: when. pie has been in there since last summer
<foo> elena: fc3 and therefore probably rhel4.  haven't tested rhel3
<elena> foo: there was a bug report for that on ppc
<foo> elena: well, there have been more changes.  I think it's not too
long.
<foo> elena: anyway, it makes debugging glibc extremely difficult at times
<elena> foo: ok, i have seen weird bug reports lately. Some section
reordering and some abi changes broke gdb on ppc, but i wonder about
other platforms
<foo> elena: this is x86.  if you just build glibc, then start gdb on
ld.so, try putting a breakpoint in "dl_main".
<foo> elena: gdb will add the breakpoint but will never stop
<foo> elena: ld.so is a special program.  it's relocatable, but it's
not a PIE
<foo> elena: the address looks perfectly fine
<foo> (gdb) b dl_main
<foo> Breakpoint 1 at 0x1592: file rtld.c, line 812.
<foo> (gdb) r --library-path . /bin/cat
<foo> Starting program:
/home/drepper-local/glibc-build/ld-20041026/elf/ld.so --library-path .
/bin/cat
<foo> Breakpoint 1 at 0xf6feb592: file rtld.c, line 812.
<elena> foo: but it is not reached, which I found odd, or more likely
gdb doesn't recognize the signal as at a valid breakpoint location
<foo> f6fea000-f7000000 r-xp 00000000 03:08 2413888   
/home/drepper-local/glibc-build/ld-20041026/elf/ld.so
<foo> elena: and 0xf6feb592-0xf6fea000==0x1592
<elena> ah
<foo> elena: and in ld.so:
<foo> 00001580 <dl_main>:
<foo>     1580:       55                      push   %ebp
<foo>     1581:       89 e5                   mov    %esp,%ebp
<foo>     1583:       57                      push   %edi
<foo>     1584:       56                      push   %esi
<foo>     1585:       53                      push   %ebx
<foo>     1586:       e8 00 00 00 00          call   158b <dl_main+0xb>
<foo>     158b:       5b                      pop    %ebx
<foo>     158c:       81 c3 69 5a 01 00       add    $0x15a69,%ebx
<foo>     1592:       8d 83 18 9a fe ff       lea 0xfffe9a18(%ebx),%eax
<foo> elena: so, gdb found the end of the prologue
<elena> foo: so the reloc looks correct
<foo> elena: yep
<elena> i wonder if the internal gdb breakpoint structure is just not
updated to reflect the relocated addr, so when it stops there it
doesn't find any bp to match it with

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Poelstra 2008-04-04 18:34:04 UTC
Based on the date this bug was created, it appears to have been reported against
rawhide during the development of a Fedora release that is no longer maintained.
 In order to refocus our efforts as a project we are flagging all of the open
bugs for releases which are no longer maintained.  If this bug remains in
NEEDINFO thirty (30) days from now, we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or rawhide),
please change this bug to the respective version and change the status to
ASSIGNED.  (If you're unable to change the bug's version or status, add a
comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled these
issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't
happen again.

Comment 2 Bug Zapper 2008-05-07 00:02:30 UTC
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp


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