[gnu.gdb.bug] GDB on the Sun386i :

pell@ISY.LIU.SE (P{r Emanuelsson) (08/03/89)

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