🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #317

GDB 3.4 - Incompatibility with Sun's cc

#317
From: Michael Tiemann
Date: Wed, 15 Nov 1989 08:59
39 lines
1568 bytes
   Date: Tue, 14 Nov 89 22:50:31 PST
   From: tli%sargas.usc.edu@usc.edu (Tony Li)


   Configuration: Sun 4/60 (Sparcstation 1), SunOS 4.0.3c, gdb 3.4, 
	   gcc 1.36

   Problem: gdb does not seem to treat binaries generated by SunOS cc the
	   same as binaries from gcc.  

   Reproduce by:  Compile the following program with both SunOS cc and
	   gcc:
		   main () {
			   printf ("Hello world.\n");
		   }

	   Next, debug the resulting binaries, executing the following
	   commands in each case:

		   break main	
		   run
		   next

	   For the gcc compiled binary, after giving the 'next' command,
	   the printf executes and the next statement is the final line
	   of the program.  For the SunOS cc compiled binary, giving the
	   'next' command produces:

		   (gdb) next
		   0x4084 in etext ()

   Tony

This problem has to do with dynamic linking, which GDB does not
understand.  Compile with -Bstatic using SunCC and then see what you
get.

Michael
Technical Details
Message-ID: <8911150859.AA14136@lurch.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!shelby!agate!helios.ee.lbl.gov!hellgate.utah.edu!cs.utexas.edu!tut.cis.ohio-state.edu!LURCH.STANFORD.EDU!tiemann
References: <8911150650.AA01006@sargas.usc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!shelby!agate!helios.ee.lbl.gov!hellgate.utah.edu!cs.utexas.edu!tut.cis.ohio-state.edu!LURCH.STANFORD.EDU!tiemann
From: tiemann@LURCH.STANFORD.EDU (Michael Tiemann)
Newsgroups: gnu.gdb.bug
Subject: GDB 3.4 - Incompatibility with Sun's cc
Message-ID: <8911150859.AA14136@lurch.Stanford.EDU>
Date: 15 Nov 89 08:59:42 GMT
References: <8911150650.AA01006@sargas.usc.edu>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: tiemann@lurch.stanford.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 39