Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!USC.EDU!tli%sargas.usc.edu From: tli%sargas.usc.edu@USC.EDU (Tony Li) Newsgroups: gnu.gdb.bug Subject: GDB 3.4 - Incompatibility with Sun's cc Message-ID: <8911150650.AA01006@sargas.usc.edu> Date: 15 Nov 89 06:50:31 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 29 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