🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Tony Li Wed, 15 Nov 1989 06:50
GDB 3.4 - Incompatibility with Sun's cc
#316
Author: Tony Li
Date: Wed, 15 Nov 1989 06:50
29 lines
1106 bytes
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
GDB 3.4 - Incompatibility with Sun's cc
#317
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads