*BSD News Article 37247


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!news.sprintlink.net!EU.net!uunet!newsflash.concordia.ca!news.mcgill.ca!homer.cs.mcgill.ca!sarrazip
From: sarrazip@cs.mcgill.ca (Pierre SARRAZIN)
Newsgroups: comp.os.386bsd.questions
Subject: gdb 4.11 doesn't recognize executable under FreeBSD 1.1.5.1
Date: 29 Oct 1994 21:31:37 GMT
Organization: SOCS, McGill University, Montreal, Canada
Lines: 40
Distribution: world
Message-ID: <38uevp$n37@homer.cs.mcgill.ca>
NNTP-Posting-Host: marge.cs.mcgill.ca

Hi. Since I've moved from FreeBSD 1.0.2 to FreeBSD 1.1.5.1, gdb 4.11
doesn't recognize the executable files that I want to debug. I guess
this is somehow due to the shared libraries.

Here is a sample session:

----------------------------------------------------------------------
/tmp % uname -a
FreeBSD pitonneux 1.1.5.1(RELEASE) GENERICAH#0 i386
/tmp % cat foo.cc
#include <iostream.h>

int main ()
{
    cout << "Hello, world.\n";
    return 0;
}
/tmp % g++ -v
gcc version 2.4.5
/tmp % g++ -g -o foo foo.cc
/tmp % ./foo
Hello, world.
/tmp % gdb foo
GDB is free software and you are welcome to 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.
GDB 4.11 (i386-unknown-bsd), Copyright 1993 Free Software Foundation, Inc...

"/usr/real_tmp/foo": not in executable format: File format not recognized.

(gdb) 
----------------------------------------------------------------------

/tmp is a symlink to /usr/real_tmp. I built gdb 4.11 under FreeBSD 1.0.2.

gdb doesn't seem to have a switch to tell it do deal with shared
libraries. Should I build a newer version of gdb?

-- 
Pierre Sarrazin <sarrazip@cs.mcgill.ca>