Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caen!uwm.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!coolidge From: coolidge@cs.uiuc.edu (John Coolidge) Newsgroups: comp.unix.aux Subject: Re: gcc with -g option produces unreadable(via sdb or gdb) symbols Message-ID: <1991May3.002500.9508@m.cs.uiuc.edu> Date: 3 May 91 00:25:00 GMT References: <1991May2.212222.26246@ddtg.com> Sender: news@m.cs.uiuc.edu (News Database (admin-Mike Schwager)) Reply-To: coolidge@cs.uiuc.edu Distribution: na Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL Lines: 28 Nntp-Posting-Host: julius.cs.uiuc.edu taylor@ddtg.com (Brad Taylor) writes: > We have been experiencing some problems in our evaluation of the Apple port >of gcc. When our code is compiled using the "-g" option, the symbol table >info seems to get corrupted. The messages are something like this: >When using sdb..."Warning: '' not compiled with -g option" This is because gcc by default produces COFF-format dbx stabs information (i.e. a hack) that isn't understandable by sdb. Gcc can be hacked to produce sdb output (if you use A/UX's as rather than gas), but I haven't tested it in quite a while. >When using gdb..."main is not a function" Haven't seen this one. Try running nm over the file that has main in it and looking for debugging symbols; also, take a look at the assembly output gcc produces for that file and see what's being output around main. I'm not that much of an expert at the innards of gcc's debugger output routines, but I can take a look and see if I can figure out what's going wrong... --John -------------------------------------------------------------------------- John L. Coolidge Internet:coolidge@cs.uiuc.edu UUCP:uiucdcs!coolidge Of course I don't speak for the U of I (or anyone else except myself) Copyright 1991 John L. Coolidge. Copying allowed if (and only if) attributed. You may redistribute this article if and only if your recipients may as well.