Bug 1596490

Summary: gdb cannot read .gnu_debugdata sections because gdb lacks LZMA support
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: gdbAssignee: Sergio Durigan Junior <sergiodj>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: jan.kratochvil, jreiser, keiths, kevinb, pmuldoon, sergiodj
Target Milestone: ---   
Target Release: ---   
Hardware: armv7hl   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-30 00:36:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Reiser 2018-06-29 06:26:16 UTC
Description of problem: gdb-8.0.1-36.fc27.armv7hl is significantly less useful for debugging because it was configured --without-lzma, and thus gdb cannot read .gnu_debugdata sections in compiled binary executable files.



Version-Release number of selected component (if applicable):
GNU gdb (GDB) 8.0.50.20171229-git


How reproducible: every time


Steps to Reproduce:
1. dnf debuginfo-install openssl-libs-1.1.0h-3.fc27.armv7hl
2. gdb /lib/libcrypto.so.1.1
3.

Actual results:
Reading symbols from /lib/libcrypto.so.1.1...
warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time
(no debugging symbols found)...done.


Expected results: debuginfo symbols are found and used by gdb


Additional info:
(gdb) show configuration
This GDB was configured as follows:
   configure --host=armv7l-unknown-linux-gnueabihf --target=armv7l-unknown-linux-gnueabihf
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --without-expat
             --with-gdb-datadir=/usr/local/share/gdb (relocatable)
             --with-jit-reader-dir=/usr/local/lib/gdb (relocatable)
             --without-libunwind-ia64
             --without-lzma
             --without-guile
             --with-separate-debug-dir=/usr/local/lib/debug (relocatable)
             --without-babeltrace

Comment 1 Sergio Durigan Junior 2018-06-29 22:18:54 UTC
Thanks for the report.

This doesn't seem correct, because GDB is configured with LZMA support on Fedora (since 2012).  Take a look at:

https://src.fedoraproject.org/rpms/gdb/blob/f27/f/gdb.spec#_1313

What seems strange is that you mention you're using gdb-8.0.1-36.fc27, but then on "Version-Release number of selected component" you mention you're using an upstream build, 8.0.50.20171229-git.

You can see that gdb-8.0.1-36.fc27 was linked against liblzma.so:

https://kojipkgs.fedoraproject.org//packages/gdb/8.0.1/36.fc27/data/logs/armv7hl/build.log

(Look for "lzma" in the log above)

I also cannot reproduce your example here:

$ gdb -q /lib/libcrypto.so.1.1
Reading symbols from /lib/libcrypto.so.1.1...Reading symbols from /usr/lib/debug/usr/lib/libcrypto.so.1.1.0h-1.1.0h-3.fc27.arm.debug...done.
done.

Are you sure you're using Fedora GDB for this?

Comment 2 John Reiser 2018-06-30 00:36:08 UTC
You are right, the versions are different.  I apologize for my error and hasty report.

I was confused by a local build found in $PATH as part of investigating https://bugzilla.redhat.com/show_bug.cgi?id=1526617 .

Comment 3 Sergio Durigan Junior 2018-06-30 01:39:17 UTC
No problem, glad we were able to sort this out!