Debuging RPMs - Mailing list pgadmin-hackers

From Adam H. Pendleton
Subject Debuging RPMs
Date
Msg-id 3F9535DB.2070400@fmonkey.net
Whole thread Raw
Responses Re: Debuging RPMs  (Jean-Michel POURE <jm@poure.com>)
List pgadmin-hackers
To start off let me just say how well the pgAdmin3 RPMs build and
install on all my RH systems now!  Good work!!  I've run into a problem,
however, and I don't know if it's something that I am doing wrong, or if
there is a problem with the way the RPMs are built.  When trying to
debug the pgadmin3 exectuable that gets installed with the RPM (this is
on RedHat), gdb reports that there are now debug symbols in the executable.

[fmonkey@ahplinux fmonkey]$ gdb pgadmin3
GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(no debugging symbols found)...Using host libthread_db library
"/lib/tls/libthread_db.so.1".
(no debugging symbols found)...
(gdb)

There is a debuginfo package installed:

[fmonkey@ahplinux fmonkey]$ rpm -qa pgadmin3*
pgadmin3-1.1.0-cvs20031014
pgadmin3-debuginfo-1.1.0-cvs20031014
[fmonkey@ahplinux fmonkey]$

and the debuginfo file exists:

[fmonkey@ahplinux fmonkey]$ ls -l /usr/lib/debug/usr/bin/pgadmin3.debug
-rwxr-xr-x    1 root     root      1284116 Oct 21 09:00
/usr/lib/debug/usr/bin/pgadmin3.debug
[fmonkey@ahplinux fmonkey]$

Running gdb, specifying the symbol file explicitly doesn't change the
behavior.  Loooking at the SPEC file, I see that 'configure' is run with
the '--enable-debug' option, but that later int he SPEC file, the
following command is run:

strip --strip-debug %{buildroot}/%{_bindir}/%{name}

Removing this command from the SPEC file allows the RPM to build with
the proper debug information.  I don't know how the old RH systems work,
but on mine, the /usr/bin/pgadmin3 file gets stripped, and all the debug
information gets stored in a separate file, so we get the benefit of the
stripped executable, but the advantage of being able to distribute a
pgadmin3-debuginfo RPM for debugging users.

ahp








pgadmin-hackers by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: CVS compile error
Next
From: "Hiroshi Saito"
Date:
Subject: font problem of the calendar