🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #224

GDB on the Sun386i :-( :-(

#224
From: P{r Emanuelsson
Date: Wed, 02 Aug 1989 22:14
34 lines
1990 bytes
As you all know, the Sun386i uses COFF. Since GDB has COFF support I thought
I would just write some config files to get it running. I did that. Alas,
I then discovered that GDB wants the debugging info in SDB format!

<Hack, slash, define SDB_DEBUGGING_INFO in GCC and recompile>

Well it doesn't work. GCC does the right thing; the symbol table looks
terrific. SUN's assembler does the right thing. GDB drops core.

The problem is that SUN's ld DOES NOT do the right thing; it strips off
aux entries in the symbol table for entries like ".bf" (begin function) etc.
And the line number information that GDB expects is in the aux entries.
Thus, GDB gets a ".bf" but no information where the function begins. Lose, lose.

Has anyone else had any progress? I can think of several possibilities:

- SUN has a bugfix for ld. (probability towards infinity...)
- Fix GDB's COFF support so that it recognizes DBX-style stabs and doesn't
  rely on ".bf", ".ef" etc. I.e. DBX format COFF files (not SDB).
- Use COFF encapsulation (I'm not sure if GDB supports this out-of-the-box,
  but if it does, please tell me)

Dbx is unusable, since SUN's cc puts out insane function prologues and dbx
wants them. This is fine, because then we have to fix GDB to get debugging
support. But how?

Any suggestions greatly appreciated!

      /Pell
--
"Don't think; let the machine do it for you!"
                                   -- E. C. Berkeley
Dept. of Electrical Engineering	                         pell@isy.liu.se
University of Linkoping, Sweden	                    ...!uunet!isy.liu.se!pell
Technical Details
Message-ID: <8908022214.AA24613@rainier.isy.liu.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ISY.LIU.SE!pell

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ISY.LIU.SE!pell
From: pell@ISY.LIU.SE (P{r Emanuelsson)
Newsgroups: gnu.gdb.bug
Subject: GDB on the Sun386i :-( :-(
Message-ID: <8908022214.AA24613@rainier.isy.liu.se>
Date: 2 Aug 89 22:14:10 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 34