Bug 20912

Summary: gdb does not recognise old executables.
Product: Base System Reporter: marka <marka>
Component: binAssignee: Marcel Moolenaar <marcel>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   

Description marka 2000-08-29 02:40:01 UTC
	gdb does not recognise old executables.

% file /usr/local/lib/netscape/communicator-4.75.bin
/usr/local/lib/netscape/communicator-4.75.bin: FreeBSD/i386 compact demand paged dynamically linked executable
% gdb /usr/local/lib/netscape/communicator-4.75.bin
GNU gdb 4.18
Copyright 1998 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-unknown-freebsd"...

"/usr/local/lib/netscape/communicator-4.75.bin": not in executable format: File format not recognized

(gdb) quit
%

How-To-Repeat: 
	Install netscape 4.75:
	Try to use gdb to look at the netscape executable.
Comment 1 Bruce Evans 2000-08-29 04:36:53 UTC
On Tue, 29 Aug 2000 marka@nominum.com wrote:

> >Description:
> 
> 	gdb does not recognise old executables.
> 
> % file /usr/local/lib/netscape/communicator-4.75.bin
> /usr/local/lib/netscape/communicator-4.75.bin: FreeBSD/i386 compact demand paged dynamically linked executable
> % gdb /usr/local/lib/netscape/communicator-4.75.bin
> ...
> "/usr/local/lib/netscape/communicator-4.75.bin": not in executable format: File format not recognized

The fix for this should be to use "gdb -aout" or "OBJFORMAT=aout gdb",
but this never worked right (/usr/libexec/aout/gdb was never built),
and was completely broken by bitrot in the a.out support in gdb-4.18.
I have a version of /usr/libexec/aout/gdb built on 26 Aug 1999 from
older sources (checked out with cvs -D '1 May 1999'?).  This still
seems to work.

Bruce
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-29 10:10:03 UTC
Responsible Changed
From-To: freebsd-bugs->obrien

I imagine that David will want to look at this while he's 
busy with the upgrade to gdb-5.0.
Comment 3 David E. O'Brien freebsd_committer freebsd_triage 2001-09-10 17:25:48 UTC
Responsible Changed
From-To: obrien->freebsd-bugs

I am not the maintainer.
Comment 4 Sheldon Hearn freebsd_committer freebsd_triage 2002-01-30 13:29:22 UTC
Responsible Changed
From-To: freebsd-bugs->mp

Over to maintainer.
Comment 5 Sheldon Hearn 2002-01-30 13:32:05 UTC
Hi Bruce,

Do you have any plans to commit the patches you said worked for you in
addressing debugging aout binaries as complained about in PR gnu/20912?

Ciao,
Sheldon.
Comment 6 Bruce Evans 2002-01-31 15:38:16 UTC
On Wed, 30 Jan 2002, Sheldon Hearn wrote:

> Do you have any plans to commit the patches you said worked for you in
> addressing debugging aout binaries as complained about in PR gnu/20912?

I never had patches; I only had a checkout method.  It no longer works,
due to changes in system headers (mainly <sys/user.h>).  However, the
old gdb binary still works:

-r-xr-xr-x  1 root  wheel  1147168 Aug 26  1999 /usr/libexec/aout/gdb

Perhaps it can be copied from a FreeBSD distribution or snapshot made
a little earlier in 1999.

Bruce
Comment 7 Sheldon Hearn 2002-02-05 09:55:12 UTC
On Fri, 01 Feb 2002 02:38:16 +1100, Bruce Evans wrote:

> I never had patches; I only had a checkout method.  It no longer works,
> due to changes in system headers (mainly <sys/user.h>).  However, the
> old gdb binary still works:
> 
> -r-xr-xr-x  1 root  wheel  1147168 Aug 26  1999 /usr/libexec/aout/gdb
> 
> Perhaps it can be copied from a FreeBSD distribution or snapshot made
> a little earlier in 1999.

Sounds like a job for a port and an FAQ entry.

Care to make that binary available for download? :-)

Ciao,
Sheldon.
Comment 8 Bruce Evans 2002-02-05 17:49:06 UTC
> > I never had patches; I only had a checkout method.  It no longer works,
> > due to changes in system headers (mainly <sys/user.h>).  However, the
> > old gdb binary still works:
> >
> > -r-xr-xr-x  1 root  wheel  1147168 Aug 26  1999 /usr/libexec/aout/gdb
> >
> > Perhaps it can be copied from a FreeBSD distribution or snapshot made
> > a little earlier in 1999.
>
> Sounds like a job for a port and an FAQ entry.
>
> Care to make that binary available for download? :-)

No; binaries from releases should be tried first.

Bruce
Comment 9 Marcel Moolenaar freebsd_committer freebsd_triage 2004-07-17 02:21:10 UTC
Responsible Changed
From-To: mp->marcel

I'm on GDB at the moment, so I'll take this while I'm at it. Given 
the age of the defect, this may probably be closed. However, it 
relates to 4.1, which is still on our current stable branch. The 
best course of action is to see if I can actually reproduce it 
with an up-to-date -stable box. If not, then this may have aged to 
much...
Comment 10 Mark Linimon freebsd_committer freebsd_triage 2008-01-26 04:12:37 UTC
State Changed
From-To: open->closed

By now surely this PR is OBE; we haven't had a.out support for a long time.