Bug 505774

Summary: debuginfo rpm useless after gcc 4.4.0-8 change
Product: [Fedora] Fedora Reporter: Mamoru TASAKA <mtasaka>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ffesti, jakub, jnovy, pmatilai, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-16 11:47:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
prelink-dwarf3.patch
none
debugedit-dwarf3.patch none

Description Mamoru TASAKA 2009-06-13 17:36:55 UTC
Description of problem:
After gcc-4.4.0-8 change:
-------------------------------------------
* Fri Jun 12 2009 Jakub Jelinek <jakub> 4.4.0-8 
- update from gcc-4_4-branch 
  - PRs c++/40381, libfortran/40330 
- add -mcrc32 support on ix86 
- support -gdwarf-3 and default to it, emit DW_OP_call_frame_cfa 
- fix up ix86 padding for branch mispredicts 
- improve .debug_loc generation 
--------------------------------------------
rpm cannot create debuginfo rpm correctly.

For example:
http://koji.fedoraproject.org/koji/buildinfo?buildID=106022
i586 build log says:
--------------------------------------------
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id /builddir/build/BUILD/jd-2.4.1-svn2883_trunk
extracting debug info from /builddir/build/BUILDROOT/jd-2.4.1-0.1.svn2883_trunk.fc12.i386/usr/bin/jd
/usr/lib/rpm/debugedit: /builddir/build/BUILDROOT/jd-2.4.1-0.1.svn2883_trunk.fc12.i386/usr/bin/jd: Unknown debugging section .debug_pubtypes
/usr/lib/rpm/debugedit: /builddir/build/BUILDROOT/jd-2.4.1-0.1.svn2883_trunk.fc12.i386/usr/bin/jd: DWARF version 3 unhandled
+ /usr/lib/rpm/check-buildroot
---------------------------------------------
and the created debuginfo rpm
http://koji.fedoraproject.org/koji/rpminfo?rpmID=1275099
does not have any debug information.

Version-Release number of selected component (if applicable):
rpm-4.7.0-6.fc12.i586
gcc-4.4.0-8.i586

How reproducible:
100%

Comment 1 Jakub Jelinek 2009-06-13 18:03:43 UTC
I'm working on a prelink patch to handle all the recent DWARF3 stuff, and as debugedit is based on prelink's dwarf2 adjustment code, I guess most of it will apply to debugedit as well.

Comment 2 Jakub Jelinek 2009-06-13 20:01:29 UTC
Created attachment 347759 [details]
prelink-dwarf3.patch

So far only lightly tested prelink patch.  debugedit.c needs similar changes.

Comment 3 Jakub Jelinek 2009-06-13 20:24:42 UTC
Created attachment 347764 [details]
debugedit-dwarf3.patch

Totally untested debugedit.c patch.

Comment 4 Ville Skyttä 2009-06-15 15:28:07 UTC
Would be nice to have this fixed as soon as possible to avoid mass rebuilds due to broken debuginfos and to make it easier to track ones that are results of packaging bugs...

Comment 5 Panu Matilainen 2009-06-16 11:47:30 UTC
Jakub's patch from comment #3 now built into rpm-4.7.0-7.fc12 (and applied upstream too) so this should be fixed as soon as the new version hits the builders.