Debuging RPMs

From: "Adam H(dot) Pendleton" <fmonkey(at)fmonkey(dot)net>
To: Jean-Michel POURE <jm(at)poure(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Debuging RPMs
Date: 2003-10-21 13:34:19
Message-ID: 3F9535DB.2070400@fmonkey.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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(at)ahplinux fmonkey]$ rpm -qa pgadmin3*
pgadmin3-1.1.0-cvs20031014
pgadmin3-debuginfo-1.1.0-cvs20031014
[fmonkey(at)ahplinux fmonkey]$

and the debuginfo file exists:

[fmonkey(at)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(at)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

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Hiroshi Saito 2003-10-21 16:18:24 font problem of the calendar
Previous Message Jean-Michel POURE 2003-10-21 13:10:35 Re: CVS compile error