🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51006

Symbol table size increase with GCC 2.3.3 on SunOS 4.1.3

#51006
From: Gary Ansok
Date: Sun, 11 Jul 1993 07:57
41 lines
2603 bytes
We've been experimenting with switching from the Sun C compiler to the
GNU compiler on our project.  Right now, we're using GCC 2.3.3 (on
Sparc 2's running SunOS 4.1.3).

However, I've been having trouble debugging our largest application.
We have two debuggers available: ups and dbx/xdbx.  ups doesn't like
gcc-compiled programs at all; it steps through the program OK, but as
soon as I try to examine a variable, the debugger crashes with some kind
of internal parse error.  If I can get dbx running, it seems to work fine,
but I can't get dbx to run this program except on the server with the
largest swap space -- on all the other machines dbx runs out of memory
trying to read the symbol table.

I've done a little investigation, and I think these are both due to
the fact that the type records GCC puts in the symbol table are slightly
different from the ones the Sun C compiler puts in.  ups won't read the
GCC records at all.  The dbx problem seems to be because the Sun loader
doesn't remove redundant type information from GCC modules as it does
from Sun-compiled modules.  When a program includes a hundred or so
modules, most of which include the Motif/X header files (which define
a lot of types), you can see that there's a lot of redundant type
information in there.

My questions are these:

1)  Is there a GNU loader that will remove the extra type information?
    How do I tell GCC to use that instead of the Sun loader?

2)  Will upgrading to the latest version of GCC help?  Will that output
    type records understandable to ups and the Sun loader?

3)  If dbx runs out of memory trying to read a bloated symbol table,
    is gdb (which we don't have at present) likely to do any better?

4)  Does anyone have (or is it possible to write) a post-processor to
    remove the extra type information?

Thanks in advance for any help you can give me on this.

-- Gary Ansok
ansok@alumni.caltech.edu
Technical Details
Message-ID: <21oh4cINNiv0@gap.caltech.edu>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!uunet!news.claremont.edu!nntp-server.caltech.edu!ansok

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,653926de5c467ad7,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-07-11 02:13:37 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!uunet!news.claremont.edu!nntp-server.caltech.edu!ansok
From: ansok@cco.caltech.edu (Gary Ansok)
Newsgroups: gnu.gcc.help
Subject: Symbol table size increase with GCC 2.3.3 on SunOS 4.1.3
Date: 11 Jul 1993 07:57:00 GMT
Organization: California Institute of Technology, Pasadena
Lines: 41
Distribution: world
Message-ID: <21oh4cINNiv0@gap.caltech.edu>
NNTP-Posting-Host: alumni.caltech.edu