🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49613

How does one debug g++ code?

#49613
From: Alan S. Mazer
Date: Fri, 14 Jan 1994 17:06
30 lines
1769 bytes
I've got some C++ code I compiled (presumably with g++) using gcc.  If I use
the normal Sun libraries with gcc, gcc fails with

	ld: Undefined symbol 
	    __lib_version 
	collect2: ld returned 2 exit status
	*** Error code 1
	make: Fatal error: Command failed for target `aesop'

so I use the /usr/lib stuff to compile with gcc.  But when I start Sun's
unbundled dbx it says

	warning: Couldn't find '_baseaddr'. Your application is probably
	    linked with an old "crt0.o"

The /usr/ucb/dbx says

	/usr/ucb/dbx: internal error: unexpected value 38 at line 2620 in
	    file ../common/object.c

and exits.

Why not use gdb?  It won't stop at the breakpoint that I set.  It says it's
setting the breakpoint then blithely ignores it.  So how does one debug g++
code?  If I'm missing something, I'd sure like to know what it is.
-- 
 
-- Alan                        # Mountain Dew and doughnuts...
   ..!ames!elroy!alan          # because breakfast is the most important meal
   alan@elroy.jpl.nasa.gov     # of the day.
Technical Details
Message-ID: <2h6jeo$pf7@elroy.jpl.nasa.gov>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!news.claremont.edu!nntp-server.caltech.edu!elroy.jpl.nasa.gov!alan

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,834e04b73cefe87e,start
X-Google-Attributes: gid11318c,public
X-Google-Thread: 11ee14,834e04b73cefe87e,start
X-Google-Attributes: gid11ee14,public
X-Google-ArrivalTime: 1994-01-14 12:28:20 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!news.claremont.edu!nntp-server.caltech.edu!elroy.jpl.nasa.gov!alan
From: alan@elroy.jpl.nasa.gov (Alan S. Mazer)
Newsgroups: gnu.gcc.help,jpl.general
Subject: How does one debug g++ code?
Date: 14 Jan 1994 17:06:32 GMT
Organization: Image Analysis Systems Group, JPL
Lines: 30
Distribution: jpl
Message-ID: <2h6jeo$pf7@elroy.jpl.nasa.gov>
NNTP-Posting-Host: 137.78.80.135